|
[Sponsors] |
August 24, 2019, 05:04 |
OpenFOAM-5 parallel problem on hpc
|
#1 | ||||
New Member
Xusong
Join Date: Aug 2019
Posts: 8
Rep Power: 7 |
Hi,guys,
I have this problem when I use OpenFOAM-5 for running in parallel on hpc. This is my script: Quote:
Quote:
like this: Quote:
Why do I get an error when I add -parallel on the command line? Quote:
Best wish! Thanks. |
|||||
August 25, 2019, 09:28 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
This looks like you are not starting the solver in parallel but n times a single-process solver.
So make sure, you start it corretly in parallel using the correct options for mpirun (and of course add the option -parallel to the solver). First test your job skript with calling something like hostname from mpirun to see, that this part works. |
|
August 26, 2019, 00:05 |
|
#3 | |
New Member
Xusong
Join Date: Aug 2019
Posts: 8
Rep Power: 7 |
Quote:
|
||
August 28, 2019, 01:50 |
|
#4 |
New Member
Aashay Tinaikar
Join Date: May 2019
Location: Boston
Posts: 19
Rep Power: 7 |
Hii Xusong,
Welcome to OpenFOAM. It is a great toolbox for CFD. I remember the first time I started a parallel run. I also missed the -parallel flag during the solver execution. "-parallel" flag indicates OpenFOAM to use the parallel version of that solver and not the serial one. If you omit that flag, OpenFOAM will run a particular solver separately on each decomposed domain. That is why you can see multiple output lines for the same time step and variable. Regarding your error on hpc, I don't have experience with #BSUB based system. However, I have been using OpenFOAM on a SLURM based HPC, and it is working perfectly fine. From the commands that you have executed and the output in the error file, it seems that you have not loaded the mpi module on your hpc. (I need to load that before running an mpi command on my hpc) Without -parallel flag, it just runs everything in serial and hence no errors. Let me know if this helps Good luck :-) |
|
August 28, 2019, 03:04 |
|
#5 | |
New Member
Xusong
Join Date: Aug 2019
Posts: 8
Rep Power: 7 |
yes,you are right ,I was wrong before,but I have loaded the mpi,like this:
Quote:
|
||
August 28, 2019, 03:35 |
|
#6 |
Senior Member
Gerry Kan
Join Date: May 2016
Posts: 376
Rep Power: 11 |
Hi Xusong:
I am not very familiar with lsf (I have use qsub and slurm), but I think some other members of this forum are already giving you suggestions. However, when I looked at your submission script, I noticed your run process is not quite complete. I don't know if you have solved them in the mean time, but here is a complete workflow for a parallel run. I am using the pitzDaily tutorial for example as you are using it as test case: Mesh and solve: blockMesh decomposePar -force [1][2] mpirun -np X simpleFoam -parallel [1] Post-processing: reconstructPar foamToVTK Note [1] - The number of processors used is defined in system/decomposeParDict. Replace X with the number of cores used Note [2] - The "-force" switch overwrites existing decomposed domains from previous runs Alternatively, if you look at the pitzDaily case directory, you will also see some additional commands like Allpre, Allrun, and Allrun-parallel. You can look into them and discover some additional scripts provided by OpenFOAM that will make your tool chain a bit less tedious. I personally don't use them, however. Hope that helps, Gerry. |
|
August 28, 2019, 03:48 |
|
#7 | ||
New Member
Xusong
Join Date: Aug 2019
Posts: 8
Rep Power: 7 |
Thank you,Gerry Kan.
And I test your script, Quote:
then ,the error occurs like this: Quote:
Thanks everyone. |
|||
August 28, 2019, 05:23 |
|
#8 |
Senior Member
Gerry Kan
Join Date: May 2016
Posts: 376
Rep Power: 11 |
Hi Xusong:
It looks like you did not build OpenFOAM correctly. Pstream is part of the OpenFOAM parallel processing. Make sure you pick up the MPI liabraries (i.e., load module ...). Also observe the difference nuances between difference compilers / MPI libraries. Gerry. |
|
August 28, 2019, 12:47 |
|
#9 | |
New Member
Aashay Tinaikar
Join Date: May 2019
Location: Boston
Posts: 19
Rep Power: 7 |
Quote:
I am not sure whether impi works for OpenFOAM. Maybe some senior members can answer that better. I have always used openMpi for executing parallel runs and it has run perfectly every time. Also, I think that it is the default method for OpenFOAM (not sure of the latest versions). Can you try to load the openMpi module in place of impi? You can ask the hpc helpdesk for that. Note: Sometimes, I use to get warnings for parallel runs on hpc, which I never got on local PC. I inquired this with my hpc help desk and he told me something on the following lines. "This error seems to be strange. Looks like mpi libraries are not properly compiled. It may be possible that you had installed OpenFOAM from one particular node cluster and the mpi libraries were compiled for that specific cluster type only. Thus if you run the job on some another cluster node, then those libraries give some warnings" Thus, maybe your help desk could also help you with some things |
||
August 28, 2019, 18:39 |
|
#10 |
Senior Member
Gerry Kan
Join Date: May 2016
Posts: 376
Rep Power: 11 |
Dear Xusong:
If you haven't read it already, perhaps the folling link would help you rebuild OpenFOAM with the Intel compiler and MPI library. https://linuxcluster.wordpress.com/2...ith-intel-mpi/ I am interested in seeing hoe it went. I have so far worked with g++ and OpenMPI, and had very little success with MPICH. Gerry. |
|
August 30, 2019, 10:23 |
|
#11 |
New Member
Xusong
Join Date: Aug 2019
Posts: 8
Rep Power: 7 |
Hi,Gerry Kan.
I think the biggest problem is the OpenMPI.I will install the OpenMPI and try to test. Thanks. |
|
August 30, 2019, 10:32 |
|
#12 |
New Member
Xusong
Join Date: Aug 2019
Posts: 8
Rep Power: 7 |
Thanks,Aashay Tinaikar
Yeah,I think you are right.And I will ask my help desk to install the OpenMPI. If it works, I will post the result. |
|
August 31, 2019, 05:12 |
|
#13 | ||||||||||
New Member
Xusong
Join Date: Aug 2019
Posts: 8
Rep Power: 7 |
Quote:
I uesd it and the hpc installed OpenFOAM-5.0 . Frist I module load the environment,and when I don't load Quote:
I also echo which mpirun , it displays Quote:
Quote:
Quote:
Quote:
Quote:
PHP Code:
Quote:
Quote:
Now it displays Quote:
|
|||||||||||
September 5, 2019, 00:39 |
|
#14 |
New Member
Aashay Tinaikar
Join Date: May 2019
Location: Boston
Posts: 19
Rep Power: 7 |
Hii Xusong,
Your problem might be more complicated, but I just noticed that you don't specify -np flag in your mpi run command. For 4 cores parallel run, the execution command I usually use is "mpirun -np 4 simpleFoam -parallel" I tried to run it without using the -np flag, it threw error! Maybe you would want to change it. Your number of cores are equal to the number of decomposed cases. |
|
September 5, 2019, 10:30 |
|
#15 | ||
New Member
Xusong
Join Date: Aug 2019
Posts: 8
Rep Power: 7 |
Quote:
I tried use the code that add the -np 4 ,but it failed .The err file likes this: Quote:
|
|||
September 5, 2019, 11:20 |
|
#16 | |
New Member
Aashay Tinaikar
Join Date: May 2019
Location: Boston
Posts: 19
Rep Power: 7 |
Quote:
Problems running in parallel - Pstream not available Wyldckat (Bruno) is the best at helping people out. You might want to look into his comments if you already haven't. Good luck and try to post the solution here once you figure it out. I am interested to know what gives this error. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM course for beginners | Jibran | OpenFOAM Announcements from Other Sources | 2 | November 4, 2019 09:51 |
The problem when i use parallel computation for mesh deforming. | Hiroaki Sumikawa | OpenFOAM Running, Solving & CFD | 0 | November 20, 2018 03:58 |
Error running openfoam in parallel | fede32 | OpenFOAM Programming & Development | 5 | October 4, 2018 17:38 |
How can i make a parallel programming in OpenFOAM? | jignesh_thaker2007 | OpenFOAM Running, Solving & CFD | 3 | July 2, 2014 10:37 |
[Commercial meshers] Handling cyclic BC from gambit to openfoam for a cascade airfoil problem - OF 1.6 | maverick | OpenFOAM Meshing & Mesh Conversion | 2 | June 18, 2011 05:36 |