CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Running macros in parallel in batch mode

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By MFitl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2010, 19:48
Default Running macros in parallel in batch mode
  #1
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 17
nomad is on a distinguished road
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.
nomad is offline   Reply With Quote

Old   April 21, 2010, 13:03
Default
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 260
Rep Power: 18
Maddin is on a distinguished road
Start the server and then start the java file with "a client session".
I had the same problem... never found a other way.
Maddin is offline   Reply With Quote

Old   April 21, 2010, 14:48
Default
  #3
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 17
nomad is on a distinguished road
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.
nomad is offline   Reply With Quote

Old   April 22, 2010, 03:56
Default
  #4
New Member
 
Matthias Fitl
Join Date: Mar 2009
Location: Austria
Posts: 20
Rep Power: 17
MFitl is on a distinguished road
Quote:
Originally Posted by nomad View Post
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
Doggidog likes this.
MFitl is offline   Reply With Quote

Old   April 22, 2010, 14:14
Default
  #5
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 17
nomad is on a distinguished road
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 is offline   Reply With Quote

Old   April 22, 2010, 15:53
Default
  #6
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 17
nomad is on a distinguished road
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.
Attached Images
File Type: jpg collab parallel problem.jpg (102.6 KB, 77 views)
nomad is offline   Reply With Quote

Old   April 22, 2010, 16:50
Default
  #7
Member
 
Vinicius Girardi
Join Date: Mar 2009
Location: Sao Paulo, Brazil
Posts: 80
Rep Power: 17
Vinicius is on a distinguished road
What are your hardware configuration, mesh size and mpi version?
Vinicius is offline   Reply With Quote

Old   April 22, 2010, 19:31
Default
  #8
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 17
nomad is on a distinguished road
Hi Vinicius,

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

Thanks.
nomad is offline   Reply With Quote

Old   April 22, 2010, 22:27
Default
  #9
Member
 
Vinicius Girardi
Join Date: Mar 2009
Location: Sao Paulo, Brazil
Posts: 80
Rep Power: 17
Vinicius is on a distinguished road
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.
Vinicius is offline   Reply With Quote

Old   April 23, 2010, 13:50
Default
  #10
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 17
nomad is on a distinguished road
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.

Last edited by nomad; April 23, 2010 at 14:08. Reason: issue resolved
nomad is offline   Reply With Quote

Old   April 29, 2010, 01:41
Default
  #11
Senior Member
 
Join Date: Mar 2009
Posts: 260
Rep Power: 18
Maddin is on a distinguished road
Quote:
Originally Posted by Vinicius View Post
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?
Maddin is offline   Reply With Quote

Old   April 29, 2010, 06:00
Default
  #12
New Member
 
Matthias Fitl
Join Date: Mar 2009
Location: Austria
Posts: 20
Rep Power: 17
MFitl is on a distinguished road
Quote:
Originally Posted by Maddin View Post
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
MFitl is offline   Reply With Quote

Old   April 29, 2010, 07:16
Default
  #13
Senior Member
 
Join Date: Mar 2009
Posts: 260
Rep Power: 18
Maddin is on a distinguished road
I know... but why this difference?
Maddin is offline   Reply With Quote

Old   February 22, 2013, 09:30
Default
  #14
New Member
 
Edgar Flores
Join Date: May 2012
Location: Guadalajara, México
Posts: 1
Rep Power: 0
ericardofa is on a distinguished road
Hey nomad,

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

Thanks in advance
Regards
ericardofa is offline   Reply With Quote

Reply

Tags
batch, cpu timer, macros, parallel, wall timer


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parallel Fluent Error in Batch Mode Justin FLUENT 3 November 28, 2016 11:50
Running fluent with udf in batch mode zonexo Fluent UDF and Scheme Programming 2 March 10, 2012 08:50
DPM model in parallel batch mode Prashanth FLUENT 2 March 6, 2009 08:54
Running Job in Batch mode (EFD) Nick Sessions FloEFD, FloWorks & FloTHERM 0 April 16, 2008 17:44
problem with running UDF in batch mode James FLUENT 0 June 6, 2006 07:49


All times are GMT -4. The time now is 22:38.