Concurrent jobs and job multi-threading

46 views
Skip to first unread message

Suhail Alsalehi

unread,
Sep 16, 2021, 3:54:05 PM9/16/21
to Morpheus users
Hi Morpheus team,

I have three questions regarding concurrent jobs and multi-threading

1- I tried to run morpheus xml files in the GUI with multiple threads per job but there was no improvement in execution time. 
Are there any specific requirements for the XML file to utilize multithreading? 

2- How to set up the number of threads in the terminal for one job?  

 I am working on a remote cluster and have no access to a GUI so it is important that I set the number of threads in the terminal. 

I found this in the documentation but I am not sure how to implement this in the terminal. "Morpheus employs OpenMP as the workload-sharing construct. CPM computation, however, does not yet make use of OpenMP. Use the environmental variable OMP_NUM_THREADS to adjust the number of threads used." 

3- Is there an internal way to do multiple jobs at the same time (in the terminal)? 
I read a similar comment and the suggestion was to write a bash script with a loop. I was wondering if there is another way to do multiple jobs at the same time

Thanks very much for your time and help!

Best,
Suhail

Jörn Starruss

unread,
Sep 23, 2021, 5:56:24 AM9/23/21
to morpheu...@googlegroups.com

Hi Suhail

Am 16.09.21 um 21:54 schrieb Suhail Alsalehi:
Hi Morpheus team,

I have three questions regarding concurrent jobs and multi-threading

1- I tried to run morpheus xml files in the GUI with multiple threads per job but there was no improvement in execution time. 
Are there any specific requirements for the XML file to utilize multithreading?
Performance gains that can be achieved by using multiple threads very much depend on the actual model. Not all formalisms are parallelized already. I suspect that the CPM is using most of your simulation time, since this runs still single threaded only. Have a look at the performance table at the end of each simulation output to find out which processes are decisive for the actual runtime.

 

2- How to set up the number of threads in the terminal for one job?  

 I am working on a remote cluster and have no access to a GUI so it is important that I set the number of threads in the terminal. 

I found this in the documentation but I am not sure how to implement this in the terminal. "Morpheus employs OpenMP as the workload-sharing construct. CPM computation, however, does not yet make use of OpenMP. Use the environmental variable OMP_NUM_THREADS to adjust the number of threads used."
Yes, refer to your terminal's documentation to find out how to set environmental variables. Most shells would switch on 8 parallel OpenMP threads via
'export OMP_NUM_THREADS=8' .

3- Is there an internal way to do multiple jobs at the same time (in the terminal)? 
I read a similar comment and the suggestion was to write a bash script with a loop. I was wondering if there is another way to do multiple jobs at the same time

Unfortunately there is no internal way. Only the GUI has a job queue included.
On the terminal there are alternative solutions:

  * Clusters often have a batch-system installed

  * There are job queue scripts that might be useful

  * also 'make' in conjunction with a Makefile is often used in such cases

At best you find someone local support.

Best, Jörn


Thanks very much for your time and help!

Best,
Suhail

--
You received this message because you are subscribed to the Google Groups "Morpheus users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to morpheus-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/morpheus-users/15e9475a-408f-4d63-8ac3-8e5d3a54ce7en%40googlegroups.com.
-- 
--------------
Jörn Starruß
Tel +49 351 463 38554
APB 1026

Technische Universität Dresden
Zentrum für Informationsdienste und Hochleistungsrechnen (ZIH)
Abteilung Innovative Methoden des Computing

Suhail Alsalehi

unread,
Sep 28, 2021, 11:01:25 AM9/28/21
to Morpheus users
Thanks very much for the detailed reply,  Jörn! 

Suhail Alsalehi

unread,
Sep 28, 2021, 12:31:06 PM9/28/21
to Morpheus users
1,2 - Indeed, CPM takes ~80% of teh job time so threading is not very helpful in this case. 
3 - This is the option I am exploring now. 

Thanks again :) 

Reply all
Reply to author
Forward
0 new messages