How to run the escript in just 1 process, instead of the mpi mode?

Asked by guan shaoheng on 2021-04-02

    I want to use MPIPool to run the DEM/FEM coupling script. (https://github.com/guanshaoheng/fem-ml-dem)

    But I found that running the RVEs of DEM in the MPI mode was much slower than the multiprocessing (python package) mode.

    This does not make sense.

    So I thought the problem may be the Escript solver has already called the MPI. Then we call the MPI again to process the DEM RVEs.

    This may be the problem, I think.

    I want to run the FEM part just on one process. Then the left processes are used for the DEM RVEs calculation.

    So I want to know how to run FEM part just on one process.

Best regards,

shguanWHU

Question information

Language:
English Edit question
Status:
Answered
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Adam Ellery (aellery) said :
#1

Hi Guan,

You can manually specify the number of OpenMP threads and MPI processes that you want escript to use with the flags -t and -p. You can also specify the number of nodes with the flag -n.

For your problem, you should get your code to run

run-escript '-t1 -p1' script.py

This will run escript on a single MPI process and OpenMP thread.

- Adam

Can you help with this problem?

Provide an answer of your own, or ask guan shaoheng for more information if necessary.

To post a message you must log in.