MPI running along with Gurobi

0

I'm trying to make a simple c ++ code which aims to run 1 million PL (linear programming) with the gurobi optimizer using MPI parallel processing.

The problem is that when using MPI and Gurobi (student version) together, for some reason the program stops performing correctly. So, I debugged the program, I commented line by line and I noticed that the problem comes when I try to create the environment of gurobi env = new GRBEnv () ;. Below I put a part of the code. In the code, I simply play on the screen the process number, however, when I try to create the gurobi environment, the program no longer works, it does not error, but it seems to stay in standby for about 5 seconds and ends, being that the correct procedure would be to play on the screen the number of processes. In the code below, supposedly creating the gurobi environment is meaningless, since I'm not optimizing anything, but it should work anyway. The implementation of optimization will be the next step.

Has anyone seen anything like this?

#include "mpi.h"
#include "gurobi_c++.h"

void main(){ 

GRBEnv *env = 0;
// cria um ambiente para o gurobi.
env = new GRBEnv();

int NumProcs, NumId;


MPI_Init(NULL, NULL);
MPI_Comm_size(MPI_COMM_WORLD, &NumProcs);
MPI_Comm_rank(MPI_COMM_WORLD, &NumId);

cout << NumProcs;

MPI_Finalize();
}
    
asked by anonymous 27.02.2017 / 15:36

0 answers