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

OF 2.0.1 parallel running problems

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

Like Tree1Likes
  • 1 Post By moser_r

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2012, 09:56
Default OF 2.0.1 parallel running problems
  #1
New Member
 
Richard Moser
Join Date: Aug 2009
Posts: 29
Rep Power: 17
moser_r is on a distinguished road
I have been running some cases on a single processor with no problem under OF 2.0.1. With the case being quite large, I wanted to start running it in parallel on my multi-core machine, as I had been doing under OF 1.7.1. I started using the command:

mpirun -np 4 simpleFoam -parallel > log &

which is exactly what I had been using under OF 1.7.1. My log file contained the following message:

Warning: Command line arguments for program should be given
after the program name. Assuming that -parallel is a
command line argument for the program.
Missing: program name
Program simpleFoam either does not exist, is not
executable, or is an erroneous argument to mpirun.

I also tried running using foamJob (foamJob -parallel simpleFoam), but then get the following output in the log file:




--> FOAM FATAL ERROR:
bool IPstream::init(int& argc, char**& argv) : attempt to run parallel on 1 processor

From function UPstream::init(int& argc, char**& argv)
in file UPstream.C at line 80.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 Foam::UPstream::init(int&, char**&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so"
#3 Foam::ParRunControl::runPar(int&, char**&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::argList::argList(int&, char**&, bool, bool) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
#6 __libc_start_main in "/lib/libc.so.6"
#7
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/simpleFoam"
[linux1:08080] *** Process received signal ***
[linux1:08080] Signal: Aborted (6)
[linux1:08080] Signal code: (-6)
[linux1:08080] [ 0] /lib/libc.so.6(+0x33af0) [0x7fa3421cfaf0]
[linux1:08080] [ 1] /lib/libc.so.6(gsignal+0x35) [0x7fa3421cfa75]
[linux1:08080] [ 2] /lib/libc.so.6(abort+0x180) [0x7fa3421d35c0]
[linux1:08080] [ 3] /opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error5abortEv+0x241) [0x7fa34301c031]
[linux1:08080] [ 4] /opt/openfoam201/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so(_ZN4Foam8UPstream4initERiRPPc+0x450) [0x7fa341f97e30]
[linux1:08080] [ 5] /opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam13ParRunControl6runParERiRP Pc+0x15) [0x7fa343039f95]
[linux1:08080] [ 6] /opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam7argListC1ERiRPPcbb+0x29d3) [0x7fa343037f33]
[linux1:08080] [ 7] simpleFoam() [0x417b93]
[linux1:08080] [ 8] /lib/libc.so.6(__libc_start_main+0xfd) [0x7fa3421bac4d]
[linux1:08080] [ 9] simpleFoam() [0x4160e9]
[linux1:08080] *** End of error message ***
Aborted


What do I need to do differently under OF2.0.1 to get the case to run in parallel?

Many thanks

Richard
moser_r is offline   Reply With Quote

Old   January 9, 2012, 05:48
Default
  #2
New Member
 
Richard Moser
Join Date: Aug 2009
Posts: 29
Rep Power: 17
moser_r is on a distinguished road
In case it is useful to others, I have found the solution to my problem, which actually had nothing to do with OpenFOAM. I had installed a PGI Fortran compiler on the same machine, which included an MPI module. This MPI module was set-up to look in different locations on my machine. The solution was to move the line relating to OpenFOAM in my bashrc file to the end of the file (after the path statements for the PGI compiler), so the correct version of MPI was run.
milena likes this.
moser_r is offline   Reply With Quote

Old   February 28, 2012, 08:45
Default
  #3
New Member
 
Join Date: Feb 2012
Posts: 1
Rep Power: 0
Jedoch is on a distinguished road
Hi moser_r,

Fortunately I found your post. The error you described is the same which is driving me insane. Could you please tell me, what exactly you wrote in your bashrc to solve the problem?

Thank you!
Jedoch is offline   Reply With Quote

Old   March 6, 2012, 03:18
Default
  #4
New Member
 
Richard Moser
Join Date: Aug 2009
Posts: 29
Rep Power: 17
moser_r is on a distinguished road
Sorry for not replaying sooner - I have been travelling for work. My solution was to take the line relating to OpenFOAM in my bashrc file (source /opt/openfoam201/etc/bashrc) and move it to the end of the file. This sorted out the issues I had - hope it does the same for you!
moser_r is offline   Reply With Quote

Old   January 17, 2013, 12:08
Default MPI Issue on OpenFOAM 2.1
  #5
Member
 
,...
Join Date: Apr 2011
Posts: 92
Rep Power: 14
hawkeye321 is an unknown quantity at this point
Hi Foamers

I am having the same issue discussed above! The error I get is
------------------------------------------------------------
bool IPstream::init(int& argc, char**& argv) : attempt to run parallel on 1 processor

From function
UPstream::init(int& argc, char**& argv) From function
UPstream::init(int& argc, char**& argv) in file
UPstream.C in file at line UPstream.C at line 8181..


FOAM aborting
-------------------------------------------------------------
I have moved the line relating OpenFOAM to the end of bashrc file, but still have the problem! Any comments?
hawkeye321 is offline   Reply With Quote

Old   January 20, 2013, 17:11
Default
  #6
Member
 
Join Date: Jan 2011
Posts: 45
Rep Power: 15
buffi is on a distinguished road
If you want to run your case parallel, you have to decompose it first using decomposePar. You need to write a decomposeParDict that tells decomposePar how many domains you want and how the whole domain is to be split.

The error message you have seen doesn't have anything to do with the OP's problem.
buffi is offline   Reply With Quote

Old   March 4, 2014, 06:17
Default
  #7
New Member
 
Join Date: Sep 2013
Location: Germany
Posts: 18
Rep Power: 13
MangoMango is on a distinguished road
Hi,

I'm faceing the same problem. What is meant by "have found the solution to my problem, which actually had nothing to do with OpenFOAM. I had installed a PGI Fortran compiler on the same machine, which included an MPI module. This MPI module was set-up to look in different locations on my machine. The solution was to move the line relating to OpenFOAM in my bashrc file to the end of the file (after the path statements for the PGI compiler), so the correct version of MPI was run."

cheers
Alex
MangoMango is offline   Reply With Quote

Old   March 18, 2014, 09:49
Default
  #8
New Member
 
Join Date: Sep 2013
Location: Germany
Posts: 18
Rep Power: 13
MangoMango is on a distinguished road
..buffi is right. In my case it was a simple solution. I had to increase the core number in my submit script for the hpc-cluster. (the number of subdomains (decompParDict) must be exactly equal to the number of threads in mpirun - of course, but the cluster which I'm using has a different thread-manager semi-automatic)
MangoMango is offline   Reply With Quote

Old   July 22, 2022, 04:53
Default
  #9
New Member
 
MD KAWSAR SAJIB
Join Date: Jul 2022
Posts: 7
Rep Power: 4
mksajib is on a distinguished road
Quote:
Originally Posted by moser_r View Post
In case it is useful to others, I have found the solution to my problem, which actually had nothing to do with OpenFOAM. I had installed a PGI Fortran compiler on the same machine, which included an MPI module. This MPI module was set-up to look in different locations on my machine. The solution was to move the line relating to OpenFOAM in my bashrc file to the end of the file (after the path statements for the PGI compiler), so the correct version of MPI was run.
Dear Sir,
I am a new bee in OpenFoam. I am having a problem running my case in parallel and I got the same error. I read your solution but as I have mentioned I am totally new in OF and do not know how to execute your instruction. I am sharing with you my script for submitting the job in cluster. Can you please tell me where to change?
Regards

#!/bin/bash
#cd ${0%/*} || exit 1 # Run from this directory
# Submission by mksajib
# Submission script for Nic5
#SBATCH --job-name=planingSET
#SBATCH --time=48:00:00 # hh:mm:ss
#
#SBATCH --ntasks=32
#SBATCH --mem-per-cpu=2048 # megabytes
#SBATCH --partition=batch
#
#SBATCH --mail-user=mdkawsar.sajib@student.uliege.be
#SBATCH --mail-type=ALL
#
#SBATCH --comment=Prop
#
#SBATCH --output=out

module load releases/2020b # necessery to load for mpi and OF
module load OpenMPI/4.0.5-GCC-10.2.0 # Loading mpi
module load OpenFOAM/8-foss-2020b # Loading OF
source /opt/cecisw/arch/easybuild/2020b/software/OpenFOAM/8-foss-2020b/OpenFOAM-8/etc/bashrc # setting env variables


cd /home/ulg/anast/mksajib/myFiles/RBMCOR_planingSET

#rm -r processor*
#rm -r postProcessing
#rm log.decomposePar log.interPhaseChangeFoam log.reconstructPar

# decomposing the mesh
decomposePar > log.decomposePar 2>&1

# decomposePar -latestTime > log.decomposePar 2>&1
#checkMesh -parallel > log.checkMesh 2>&1
# mpirun -np 8 pimpleFoam -parallel | tee -a log.pimpleFoam
# mpirun -np 8 pimpleFoam -parallel > log.pimpleFoam 2>&1


# running the case
mpirun -np 32 interFoam -parallel > log.interFoam 2>&1

# reconstruction of case
reconstructPar > log.reconstructPar 2>&1
mksajib is offline   Reply With Quote

Old   July 27, 2022, 04:15
Default
  #10
New Member
 
Richard Moser
Join Date: Aug 2009
Posts: 29
Rep Power: 17
moser_r is on a distinguished road
In your bashrc file in your home directory, you should have a line which sources the OpenFOAM bashrc. In my case, this line was 'source /opt/openfoam201/etc/bashrc'. Yours may be different depending on which version of OF you have installed, and where you installed it. I just needed to move this line to the end of my local bashrc file, and then everything worked ok. I hope this will also be the solution for you.
moser_r is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
parallel running openFoam-1.5-dev lulo OpenFOAM 3 October 3, 2011 12:42
FV patch problems when running pisoFoam in parallel chrisb OpenFOAM Programming & Development 2 March 21, 2011 06:06
how to make parallel running? decomposePar. panda60 OpenFOAM 1 October 29, 2009 03:43
Statically Compiling OpenFOAM Issues herzfeldd OpenFOAM Installation 21 January 6, 2009 10:38
Problems in Parallel PHOENICS Zeng Phoenics 3 February 27, 2001 14:28


All times are GMT -4. The time now is 20:14.