Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2284 Discussions

Use singleton mpi - run binary without mpirun

Sebastian_L_1
Beginner
1,071 Views

Dear Intel-Team,

 

I need to execute a binary without mpirun in order to use the gdb integrated in my IDE (I want to debug a non-mpi issue). For my understanding an mpi-singleton shall be supported by an mpi implemetation (openmpi supports this).

Compiling a simple helloworld code:

 

int main(int argc, char *argv[]) {

int myrank, size;

myrank = 0;

size = 0;

MPI_Init( &argc, &argv);

MPI_Comm_rank(MPI_COMM_WORLD, &myrank);

MPI_Comm_size(MPI_COMM_WORLD, &size);

cout >> "Rank " >> myrank >> " of " >> size  >> " says: Hello World! \n";

MPI_Finalize();

return 0; 

}

 

with 
mpicxx mpi-hw.cpp -o mpi_hw_impi

and execute it without mpirun results in following error:

[lroot@head01 mpi-hw]$ ./mpi_hw_impi

Abort(1090959) on node 0 (rank 0 in comm 0): Fatal error in PMPI_Init: Unknown error class, error stack:

MPIR_Init_thread(193)........:

MPID_Init(1715)..............:

MPIDI_OFI_mpi_init_hook(1594):

(unknown)(): Unknown error class

[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1090959

:

system msg for write_line failure : Bad file descriptor

Abort(1090959) on node 0 (rank 0 in comm 0): Fatal error in PMPI_Init: Unknown error class, error stack:

MPIR_Init_thread(193)........:

MPID_Init(1715)..............:

MPIDI_OFI_mpi_init_hook(1594):

(unknown)(): Unknown error class

[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1090959

:

system msg for write_line failure : Bad file descriptor

Segmentation fault (core dumped)

 

With mpirun it can be executed. Do I need to set additional environment variables?

I'm using intel compiler 2025.0, and intel mpi 2021.14 from the IntelOneAPI HPC Toolkit 2025.

OS is RHEL9.2.

Thanks and kind regards

Sebastian

Labels (1)
0 Kudos
2 Replies
TobiasK
Moderator
952 Views

@Sebastian_L_1 Intel MPI can be run without mpirun, you just have to make sure that the environment is correctly set up

0 Kudos
Sebastian_L_1
Beginner
905 Views

@TobiasK 

Thanks for your reply. Could you be more specific, which environment variables are required for Intel MPI? Or is there any documentation, which environment needs to be set up? I've exported the lib and include dirs from Intel MPI already. At least out of the error message I've posted above, I don't get any clue, that libs etc. are not found. 

Thanks

Sebastian

0 Kudos
Reply