CPXXfinalizeMPIworkers and CPXfinalizeMPIworkers

This routine is deprecated and will be removed in a future release.

int  CPXXfinalizeMPIworkers( int nranks, int const* ranks, int argc, int const*const* argv, int abortonerror )

int  CPXfinalizeMPIworkers( int nranks, int const* ranks, int argc, int const*const* argv, int abortonerror )

Description

This routine is deprecated and will be removed in a future release.

The routine CPXXfinalizeMPIworkers/CPXfinalizeMPIworkers finalizes all MPI workers that were started for distributed parallel MIP. Also see the routine CPXXopenCPLEXremote/CPXopenCPLEXremote.

Arguments

nranks
The length of the ranks argument. If 0 (zero) then this routine does nothing. The special value -1 is supported here. If nranks is -1 then the routine will finalize all MPI workers that have a different rank than does the calling process.
ranks
The list of ranks that this routine should terminate. The length of this array is given by the nranks argument. The array may be NULL if nranks is less than 1 (one). Duplicate entries in this array are not allowed; duplicates result in undefined behavior.
argc
Length of the argv argument.
argv
Additional arguments to help CPLEX identify the MPI library used. Can be NULL if argc is 0 (zero). Usually you do not need to specify anything here because CPLEX can figure out dynamically which MPI library you are using. If CPLEX has trouble figuring out which library you use, you can specify here the same arguments you would give for CPXXopenCPLEXremote when you connect by MPI to a remote object worker. Most likely, you specify -mpiapi=, -mpilib=, or -libpath= here.
abortonerror
If set to 1 (one), CPLEX invokes MPI_Abort the first time a finalize message cannot be sent to a worker. If the value of this parameter is 0 (zero), then CPLEX continues sending finalize messages to the remaining ranks and returns a nonzero status.

Return

The routine returns 0 (zero) on success and an error code otherwise.

Example


env = CPXfinalizeMPIworkers (-1, NULL, 0, NULL, 1);

See the xdistmipex1.c example.