CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Can not run OpenFOAM in parallel in clusters, help!

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By sail

Reply
 
LinkBack Thread Tools Display Modes
Old   April 10, 2013, 16:49
Default Can not run OpenFOAM in parallel in clusters, help!
  #1
Member
 
Ping
Join Date: Dec 2011
Posts: 63
Rep Power: 5
ripperjack is on a distinguished road
Hi guys,

I am trying to run openfoam in a cluster.
I use the following script to run icoFoam in parallel using 16 CPUs. I can get the simulation running, but it seems that the openfoam does not run in "real parallel", instead, the case is run by 16 times.
Code:
#! /bin/csh
#BSUB -W 5
#BSUB -n 16
#BSUB -R "em64t span[ptile=1]" 
source /XXXX/foam171.csh
blockMesh
reconstructPar
mpiexec_hydra icoFoam
reconstructPar
#BSUB -o /foamo.%J
#BUSB -e /foame.%J
I met this problem before. That is, if you run openfoam in a local parallel case, for example, using
Code:
mpirun -n 16 icoFoam
it will run the case 16 times instead of running in parallel with 16 CPUs. You should add -parallel option as
Code:
mpirun -n 16 icoFoam -parallel
which will run with 16 CPUs in parallel.
Now I am using the cluster, I can not use "mpirun" command, I must use "mpiexec_hydra" instead, so how can I add something like "-parallel" into mpiexec_hydra command, which will let openfoam perform correct parallel calculation??
Many thanks!
ripperjack is offline   Reply With Quote

Old   April 11, 2013, 13:54
Default
  #2
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 8
sail is on a distinguished road
Quote:
Originally Posted by ripperjack View Post
Hi guys,

I am trying to run openfoam in a cluster.
I use the following script to run icoFoam in parallel using 16 CPUs. I can get the simulation running, but it seems that the openfoam does not run in "real parallel", instead, the case is run by 16 times.
Code:
#! /bin/csh
#BSUB -W 5
#BSUB -n 16
#BSUB -R "em64t span[ptile=1]" 
source /XXXX/foam171.csh
blockMesh
reconstructPar
mpiexec_hydra icoFoam
reconstructPar
#BSUB -o /foamo.%J
#BUSB -e /foame.%J
I met this problem before. That is, if you run openfoam in a local parallel case, for example, using
Code:
mpirun -n 16 icoFoam
it will run the case 16 times instead of running in parallel with 16 CPUs. You should add -parallel option as
Code:
mpirun -n 16 icoFoam -parallel
which will run with 16 CPUs in parallel.
Now I am using the cluster, I can not use "mpirun" command, I must use "mpiexec_hydra" instead, so how can I add something like "-parallel" into mpiexec_hydra command, which will let openfoam perform correct parallel calculation??
Many thanks!
http://wiki.mpich.org/mpich/index.ph...rocess_Manager

have you tried the -n 16 switch?

mpiexec_hydra -n 16 icoFoam

I'm not sure it will work though

have you tried the man or help file?


mpiexec_hydra --help
wyldckat likes this.
__________________
http://www.leadingedge.it/
Naval architecture and CFD consultancy
sail is offline   Reply With Quote

Old   April 14, 2013, 15:23
Default
  #3
Senior Member
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin,Ireland
Posts: 570
Rep Power: 19
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi,

Just my thoughts:

Quote:
Originally Posted by ripperjack View Post
Now I am using the cluster, I can not use "mpirun" command, I must use "mpiexec_hydra" instead, so how can I add something like "-parallel" into mpiexec_hydra command, which will let openfoam perform correct parallel calculation??
As far as I know, the "-parallel" option is for the OpenFOAM application to let it know that it is running is parallel, and is not an mpirun option.

So have you tried:
Code:
mpiexec_hydra -n 16 icoFoam -parallel
Philip
bigphil is offline   Reply With Quote

Old   April 15, 2013, 12:39
Default
  #4
Member
 
Ping
Join Date: Dec 2011
Posts: 63
Rep Power: 5
ripperjack is on a distinguished road
Quote:
Originally Posted by sail View Post
http://wiki.mpich.org/mpich/index.ph...rocess_Manager

have you tried the -n 16 switch?

mpiexec_hydra -n 16 icoFoam

I'm not sure it will work though

have you tried the man or help file?


mpiexec_hydra --help
Hi Sail,

Thanks for your reply! I have try "mpiexec_hydra -n 16 icoFoam", I got the following error message:
Code:
which: invalid option -- n
Usage: which [options] [--] programname [...]
Options: --version, -[vV] Print version and exit successfully.
         --help,          Print this help and exit successfully.
         --skip-dot       Skip directories in PATH that start with a dot.
         --skip-tilde     Skip directories in PATH that start with a tilde.
         --show-dot       Don't expand a dot to current directory in output.
         --show-tilde     Output a tilde for HOME directory for non-root.
         --tty-only       Stop processing options on the right if not on tty.
         --all, -a        Print all matches in PATH, not just the first
         --read-alias, -i Read list of aliases from stdin.
         --skip-alias     Ignore option --read-alias; don't read stdin.
         --read-functions Read shell functions from stdin.
         --skip-functions Ignore option --read-functions; don't read stdin.
Not Found: (2 mpiexec_hydra)
It seems that n is not an default option for mpiexec_hydra. And n is given by the script "#BSUB -n 16".
ripperjack is offline   Reply With Quote

Old   April 15, 2013, 12:42
Default
  #5
Member
 
Ping
Join Date: Dec 2011
Posts: 63
Rep Power: 5
ripperjack is on a distinguished road
Quote:
Originally Posted by bigphil View Post
Hi,

Just my thoughts:



As far as I know, the "-parallel" option is for the OpenFOAM application to let it know that it is running is parallel, and is not an mpirun option.

So have you tried:
Code:
mpiexec_hydra -n 16 icoFoam -parallel
Philip
Hi Philip,

I have tried it but it does not work. But you gave me a good suggestion, I am not trying to add -parallel option to icoFoam, instead of mpiexec. But still not know where should I add it.
ripperjack is offline   Reply With Quote

Old   May 6, 2014, 15:25
Default
  #6
Member
 
India
Join Date: Oct 2012
Posts: 84
Rep Power: 4
mayank.dce2k7 is on a distinguished road
Hi ripperjack,

Did you find any solution to your problem? I am facing the same problem.

Regards,
Mayank.
mayank.dce2k7 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Case running in serial, but Parallel run gives error atmcfd OpenFOAM Running, Solving & CFD 14 July 25, 2015 14:15
Parallel processing of OpenFOAM cases on multicore processor??? g.akbari OpenFOAM Running, Solving & CFD 24 May 31, 2015 17:58
Interfoam blows on parallel run danvica OpenFOAM Running, Solving & CFD 16 December 22, 2012 03:09
interDyMFoam, problems in mesh motion solutor run in parallel DLC OpenFOAM 11 December 11, 2012 03:20
parallel processing- linux clusters manoj s FLUENT 2 June 20, 2007 18:48


All times are GMT -4. The time now is 19:15.