How to write the hostfile for omp+mpi paralle?

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Chenjf
Posts: 2
Joined: Wed Dec 05, 2018 12:45 pm

How to write the hostfile for omp+mpi paralle?

Post 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
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

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

Post 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
Chenjf
Posts: 2
Joined: Wed Dec 05, 2018 12:45 pm

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

Post 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
Post Reply