56 const int nBlocks = 2;
57 MPI_Datatype preDatatype;
59 MPI_Aint startAddress = 0;
62 int blockLengths[nBlocks];
63 MPI_Aint displacements[nBlocks];
64 MPI_Datatype types[nBlocks];
66 for(
int i = 0; i < nBlocks; i++ ){
74 types[0] = MPI_DOUBLE;
77 MPI_Get_address( &
nVars, &address )
79 displacements[1] = address - startAddress;
83 MPI_Type_create_struct(nBlocks, blockLengths, displacements, types, &preDatatype)
92 bool memAllocNecessary
95 const int nBlocks = 2;
97 MPI_Datatype datatype = MPI_DATATYPE_NULL;
99 MPI_Aint startAddress = 0;
100 MPI_Aint address = 0;
102 int blockLengths[nBlocks];
103 MPI_Aint displacements[nBlocks];
104 MPI_Datatype types[nBlocks];
108 if( memAllocNecessary )
117 displacements[0] = 0;
118 blockLengths[0] =
nVars;
122 MPI_Get_address(
values, &address )
124 displacements[1] = address - startAddress;
125 blockLengths[1] =
nVars;
126 types[1] = MPI_DOUBLE;
129 MPI_Type_create_struct(nBlocks, blockLengths, displacements, types, &datatype)
140 MPI_Datatype preDatatype;
143 MPI_Type_commit( &preDatatype )
149 MPI_Type_free( &preDatatype )
153 MPI_Datatype datatype;
163 MPI_Type_commit( &datatype )
169 MPI_Type_free( &datatype )
180 MPI_Datatype preDatatype;
183 MPI_Type_commit( &preDatatype )
189 MPI_Type_free( &preDatatype )
193 MPI_Datatype datatype;
196 MPI_Type_commit( &datatype )
202 MPI_Type_free( &datatype )
212 MPI_Datatype preDatatype;
215 MPI_Type_commit( &preDatatype )
221 MPI_Type_free( &preDatatype )
225 MPI_Datatype datatype;
228 MPI_Type_commit( &datatype )
231 MPI_Type_commit( &datatype )
237 MPI_Type_free( &datatype )
MPI_Datatype createDatatype(bool memAllocNecessary)
MPI_Datatype createPreDatatype()
void send(UG::ParaComm *comm, int destination)
void bcast(UG::ParaComm *comm, int root)
void receive(UG::ParaComm *comm, int source)
int * indicesAmongSolvers
double objectiveFunctionValue
int getRank()
get rank of caller's thread
Base class of communicator object.
static ScipParaCommTh * comm
static const int TagSolution1
static const int TagSolution
#define DEF_PARA_COMM(para_comm, comm)
#define MPI_CALL(mpicall)
#define PARA_COMM_CALL(paracommcall)
SCIP ParaComm extension for MPI communication.
ScipParaSolution extension for MPI communication.