Page 1 of 1

How to write the hostfile for omp+mpi paralle?

Posted: Mon Dec 10, 2018 3:50 am
by Chenjf
Hello,

I want to do parallel computing in a cluster, but I don't know how to write hostfile correctly.
when I write:
***********************
cn8
cn9
***********************
in my hostfile, the listing file shows that only 2 MPI ranks and 1 OpnMP threads are set.
Both cn8 and cn9 have 24 cores. I only use MPI before. I usually write:
***********************
cn8 slots=24
cn9 slots=24
***********************
in my hostfile, and my command is:
***********************
mpirun -hostfile hostfile ./run_solver -p setup.xml &
***********************
It is OK.
How can I run my code in 2 nodes with 2 MPI and 24 OpenMP?

Did someone have an idea/tool for me?

Thanks

Re: How to write the hostfile for omp+mpi paralle?

Posted: Mon Dec 10, 2018 10:35 am
by Yvan Fournier
Hello,

Do you have a batch scheduler on your system (any medium to large system should) ? If this is the case, you should ensure the "post-install" step is done correctly (see Code_Saturne installation manual), so that the MPI launch command can use inf from the batch system/resource manager rather than a hostsfile.

If you really need to use a hostsfile, you since the syntax of a hostsfile may depend on your MPI library, you should check the documentation in the matching library.

Regards,

Yvan

Re: How to write the hostfile for omp+mpi paralle?

Posted: Tue Dec 11, 2018 10:51 am
by Chenjf
Hello,

Our system don't have a batch scheduler. I will check the documentation in the matching library. Thank you very much!

Regards,

Chenjf