CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   Running macros in parallel in batch mode (https://www.cfd-online.com/Forums/star-ccm/75267-running-macros-parallel-batch-mode.html)

nomad April 20, 2010 18:48

Running macros in parallel in batch mode
 
Hi,
I'm trying to run a simulation with a macro, with 4 cores on a local machine, in batch mode using the following:

starccm+ -np 4 -batch file.sim file.java

and I get the following error:

Warning : CPU Timer not running
Warning : Wall Timer not running
Server Error: There are no regions to solve on

It works fine using a single core in serial mode (starccm+ -batch file.sim file.java).

Any help would be appreciated.
Thanks.

Maddin April 21, 2010 12:03

Start the server and then start the java file with "a client session".
I had the same problem... never found a other way.

nomad April 21, 2010 13:48

I'm running starccm in an optimization loop. Starting it without batch mode requires me to end the starccm process after the max iteration has been reached in order for the optimization to proceed to the next run.

Is there an option to end the client and exit starccm?

Thanks.

MFitl April 22, 2010 02:56

Quote:

Originally Posted by nomad (Post 255531)
Hi,
I'm trying to run a simulation with a macro, with 4 cores on a local machine, in batch mode using the following:

starccm+ -np 4 -batch file.sim file.java

You might want to try
starccm+ -np 4 -batch file.java -collab -load file.sim
This works on our Linux machine since V3.something

CU,
Matthias

nomad April 22, 2010 13:14

Hi Matthias, that partly works. All the cores are now available for use (100% CPU usage), but only one core is being used most of the time.
Any ideas?
Thanks.

nomad April 22, 2010 14:53

1 Attachment(s)
Just to shed light on what I've been seeing with the following:

starccm+ -np 4 -batch file.java -collab -load file.sim

I've attached an iteration time plot. The one on the left is with a single core, roughly 1.2sec/iteration, while the plot on the right is with the above option, running 4 cores, 0.4sec for the fastest iteration, and 28 sec for the slowest, with the entire parallel run taking longer than in the serial case.

Any ideas on why this cycling is happening, and a way to control it?

Thanks.

Vinicius April 22, 2010 15:50

What are your hardware configuration, mesh size and mpi version?

nomad April 22, 2010 18:31

Hi Vinicius,

It's an i7-920 24G RAM, Windows XP64 SP2
mesh size 150,000 cells
MPICH2 v1.03.

Thanks.

Vinicius April 22, 2010 21:27

Maybe you are using too many cores to this small mesh and the parallelization time is higher than the calculation. It's not a rule, but I usually add a core each 250 000 cells.

nomad April 23, 2010 12:50

It seems like MPICH2 uses 1 extra process, so if I request 4 cores, it runs 5 processes and it has trouble distributing 5 processes over 4 cores. It runs well with 3 cores.

So the solution would be to use 1 core less than the total available.

Issue has been resolved.

Thanks to all who replied.

Maddin April 29, 2010 00:41

Quote:

Originally Posted by Vinicius (Post 255985)
Maybe you are using too many cores to this small mesh and the parallelization time is higher than the calculation. It's not a rule, but I usually add a core each 250 000 cells.

100.000 cells for each core, adapco said 70.000 cells core where enough.

But it's sometimes faster with collab?

MFitl April 29, 2010 05:00

Quote:

Originally Posted by Maddin (Post 256777)
100.000 cells for each core, adapco said 70.000 cells core where enough.

But it's sometimes faster with collab?

the -collab flag only enables other users to connect to the server process and therefore interact with it.

On Linux/Bash:
alias starccm+="$(which starccm+) -collab"
enables this feature constantly.

Regards,
Matthias

Maddin April 29, 2010 06:16

I know... but why this difference?

ericardofa February 22, 2013 08:30

Hey nomad,

By any chance you can post .java macro you're using?

Thanks in advance
Regards


All times are GMT -4. The time now is 13:04.