CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] mpirun not working in paralleö with OpenMPI

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes
  • 6 Post By zordiack
  • 1 Post By Leech
  • 2 Post By wyldckat
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 14, 2012, 06:48
Default mpirun not working in paralleö with OpenMPI
  #1
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
I'm having a lot of trouble getting mpirun to work in parallel with OpenFOAM 2.1.0. I compiled it from Thirdparty-2.1.0 with Allwmake and it compiled without errors. I then managed to run decomposePar on my case nicely but when i try to invoke mpirun according to user guide it gives me the following error:

$mpirun -np 2 buoyantBoussinesqSimpleFoam -parallel


--> FOAM FATAL ERROR:
Trying to use the dummy Pstream library.
This dummy library cannot be used in parallel mode

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

FOAM exiting



--> FOAM FATAL ERROR:
Trying to use the dummy Pstream library.
This dummy library cannot be used in parallel mode

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

FOAM exiting

--------------------------------------------------------------------------
mpirun noticed that the job aborted, but has no info as to the process
that caused that situation.
--------------------------------------------------------------------------

It also gives the same error message with Test-parallel. mpirun seems to be working otherwise, just not with the -parallel option. For example i can run following without any problems:

$mpirun -np 2 Test-parallel

I'm totally stuck with this problem, which seems to be somehow related to Pstream library. I haven't made modifications to files in Thirdparty-2.1.0 or in OpenFOAM installation. There seems to be others with the same errors, but no solutions that i could find.

Any help is very much appreciated, as my case could really use more than one core.
zordiack is offline   Reply With Quote

Old   February 14, 2012, 14:25
Talking
  #2
Member
 
Pekka Pasanen
Join Date: Feb 2012
Location: Finland
Posts: 87
Rep Power: 14
zordiack is on a distinguished road
Okay i'm going to reply to this myself because i think i solved this. I'm not exactly sure what helped but i'm posting what i think did the trick.

1) Make sure that you have correctly set MPI in $WM_PROJECT_DIR/etc/bashrc

export WM_MPLIB=OPENMPI

2) Run Allwmake again in Thirdparty dir (possibly best to run Allclean first and if you do, don't forget to compile paraView again

ThirdParty-2.1.0$ ./Allwmake

3) Move dummy libs away from default location

cd $FOAM_LIBBIN
mv dummy/ dummy__

4) Go to OpenFOAM sources and recompile Pstream and dummyThirdparty

cd $FOAM_SRC
cd Pstream
./Allwmake

cd $FOAM_SRC
cd dummyThirdParty
./Allwmake

I did some other fidling too, but i belive those should do the trick Feel free to ask if you have been fighting with this too and still can't get mpirun to run in parallel. Mine now runs happily when Pstream was recompiled

mpirun -np 2 buoyantBoussinesqSimpleFoam -parallel > log2 &

There is now 2 processes running and both cores are working
zordiack is offline   Reply With Quote

Old   February 16, 2012, 15:11
Default
  #3
Member
 
Pierre
Join Date: Sep 2010
Posts: 57
Rep Power: 16
Leech is on a distinguished road
You could also use the foamJob script.
I also had problems running mpirun. But hte foamJob script gets the libraries,etc. automatically.
foamJob -s -p >solver<
vsammartano likes this.
Leech is offline   Reply With Quote

Old   August 29, 2013, 03:38
Default
  #4
New Member
 
Luca Franceschini
Join Date: Aug 2012
Posts: 29
Rep Power: 14
Luchini is on a distinguished road
Thank you,
this worked also for me.

However, I didn't do point 1 and 2. In point 1 i have left
export WM_MPLIB=SYSTEMOPENMPI
And I didn’t recompile the thirdParty library.

regards.
Luchini is offline   Reply With Quote

Old   September 29, 2013, 23:11
Default Thanks!! This helped me too!!
  #5
Member
 
einat
Join Date: Jul 2012
Posts: 31
Rep Power: 14
einatlev is on a distinguished road

Downloaded ThirdParty-2.2.1, compiled it, moved dummy, etc. Now it's working!!
einatlev is offline   Reply With Quote

Old   September 9, 2014, 12:37
Default
  #6
New Member
 
Anjishnu Choudhury
Join Date: Jul 2014
Posts: 4
Rep Power: 12
Anjishnu Choudhury is on a distinguished road
Only remaking (./Allwmake) dummy files did the work for me !! Thanks!
Anjishnu Choudhury is offline   Reply With Quote

Old   February 2, 2015, 21:35
Default
  #7
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Only recompiling Pstream made it work for me!

Thanks,

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   March 4, 2015, 04:41
Default
  #8
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Hello,

today I tried your way to solve the problem. Unfortunatly I got a new message from the program:

Code:
[stephanie:04480]  [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either  could not be found or was not executable by this user in file  ess_singleton_module.c at line 231
[stephanie:04480]  [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either  could not be found or was not executable by this user in file  ess_singleton_module.c at line 140
[stephanie:04480]  [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either  could not be found or was not executable by this user in file  runtime/orte_init.c at line 128
[stephanie:04481] [[INVALID],INVALID]  ORTE_ERROR_LOG: A system-required executable either could not be found  or was not executable by this user in file ess_singleton_module.c at  line 231
[stephanie:04481] [[INVALID],INVALID] ORTE_ERROR_LOG: A  system-required executable either could not be found or was not  executable by this user in file ess_singleton_module.c at line 140
[stephanie:04481]  [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either  could not be found or was not executable by this user in file  runtime/orte_init.c at line 128
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems.  This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):

  orte_ess_set_name failed
   --> Returned value A system-required executable either could not be  found or was not executable by this user (-127) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems.  This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):

  orte_ess_set_name failed
   --> Returned value A system-required executable either could not be  found or was not executable by this user (-127) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
--------------------------------------------------------------------------
It looks like MPI_INIT failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during MPI_INIT; some of which are due to configuration or environment
problems.  This failure appears to be an internal failure; here's some
additional information (which may only be relevant to an Open MPI
developer):

  ompi_mpi_init: orte_init failed
   --> Returned "A system-required executable either could not be found  or was not executable by this user" (-127) instead of "Success" (0)
--------------------------------------------------------------------------
--------------------------------------------------------------------------
It looks like MPI_INIT failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during MPI_INIT; some of which are due to configuration or environment
problems.  This failure appears to be an internal failure; here's some
additional information (which may only be relevant to an Open MPI
developer):

  ompi_mpi_init: orte_init failed
   --> Returned "A system-required executable either could not be found  or was not executable by this user" (-127) instead of "Success" (0)
--------------------------------------------------------------------------
[stephanie:4480] *** An error occurred in MPI_Init
[stephanie:4480] *** on a NULL communicator
[stephanie:4480] *** Unknown error
[stephanie:4480] *** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
[stephanie:4481] *** An error occurred in MPI_Init
[stephanie:4481] *** on a NULL communicator
[stephanie:4481] *** Unknown error
[stephanie:4481] *** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
--------------------------------------------------------------------------
An MPI process is aborting at a time when it cannot guarantee that all
of its peer processes in the job will be killed properly.  You should
double check that everything has shut down cleanly.

  Reason:     Before MPI_INIT completed
  Local host: stephanie
  PID:        4480
--------------------------------------------------------------------------
--------------------------------------------------------------------------
An MPI process is aborting at a time when it cannot guarantee that all
of its peer processes in the job will be killed properly.  You should
double check that everything has shut down cleanly.

  Reason:     Before MPI_INIT completed
  Local host: stephanie
  PID:        4481
--------------------------------------------------------------------------

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   EXIT CODE: 1
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
Perhaps one of you may tell my where I did the mistake. First I opened the bashrc file and changed export WM_MPLIB=SYSTEMOPENMPI into export WM_MPLIB=OPENMPI.

Than I went in ThridPartx and run ./Allwmake.

Next I did step 3) und 4) as written.

Did I forget something?

I would be really grateful if someone could help me.

Thank you.

Last edited by wyldckat; March 7, 2015 at 20:14. Reason: Added [CODE][/CODE]
stephie is offline   Reply With Quote

Old   March 14, 2015, 07:34
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Stephanie,

I've finally managed to take a better look into your question and I think I've understood what the problem is. As far as I can figure out, you followed these instructions: http://openfoamwiki.net/index.php/In...u#Ubuntu_14.04

Therefore, I suggest you try the following steps:
  1. Go into OpenFOAM's "etc" folder:
    Code:
    foam
    cd etc
  2. Create the file "prefs.sh" and place the contents you had in the alias. For example, you can do this by running:
    Code:
    echo export WM_NCOMPPROCS=4 >> prefs.sh
    echo export WM_MPLIB=OPENMPI  >> prefs.sh
  3. Then run:
    Code:
    wmSET
    foam
    ./Allwmake > log.make 2>&1
  4. Then try again going to the case folder you had and launch in parallel the run you had tried before.
Best regards,
Bruno
alinuman15 and benqing like this.
wyldckat is offline   Reply With Quote

Old   March 18, 2015, 10:43
Default
  #10
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Hello Bruno,

the installation of OpenFOAM on Ubuntu 14.4 did a friend of me. Therefore he used a video from YouTube.
I'm deeply grateful for your help. I tried the code, you have posted and it worked

[Moderator note: text missing here has been copied to a new thread: http://www.cfd-online.com/Forums/ope...out-range.html]

Thank you for your help,
best regards,

Stephie

Last edited by wyldckat; March 21, 2015 at 16:47. Reason: see "Moderator note:"
stephie is offline   Reply With Quote

Old   July 17, 2017, 10:44
Lightbulb
  #11
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 11
alinuman15 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Stephanie,

I've finally managed to take a better look into your question and I think I've understood what the problem is. As far as I can figure out, you followed these instructions: http://openfoamwiki.net/index.php/In...u#Ubuntu_14.04

Therefore, I suggest you try the following steps:
  1. Go into OpenFOAM's "etc" folder:
    Code:
    foam
    cd etc
  2. Create the file "prefs.sh" and place the contents you had in the alias. For example, you can do this by running:
    Code:
    echo export WM_NCOMPPROCS=4 >> prefs.sh
    echo export WM_MPLIB=OPENMPI  >> prefs.sh
  3. Then run:
    Code:
    wmSET
    foam
    ./Allwmake > log.make 2>&1
  4. Then try again going to the case folder you had and launch in parallel the run you had tried before.
Best regards,
Bruno
Dear Bruno:-
I have followed all the steps you described above but unfortunately still have problem with running my code in parallel ( e.g. : -bash: decomposePar: command not found) and I have found the following error message at the end of log.make file :-
/usr/bin/ld: cannot find -lfluidThermophysicalModels
collect2: ld returned 1 exit status
make[2]: *** [/export/home/aibrah8/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/bin/twoPhaseEulerFoam] Error 1
make[1]: *** [twoPhaseEulerFoam] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [multiphase] Error 2
make: Target `application' not remade because of errors.


Any suggestions ?
Thanks
alinuman15 is offline   Reply With Quote

Old   August 27, 2017, 11:29
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick question @alinuman15: Have you solved the problem you were having here?

If not, I need more details.
alinuman15 likes this.
__________________
wyldckat is offline   Reply With Quote

Old   August 29, 2017, 16:28
Default
  #13
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 11
alinuman15 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick question @alinuman15: Have you solved the problem you were having here?

If not, I need more details.
Thank you very much for your follow up with members' problems and sorry for late replying ( I had cluster shutdown and could not bring the problem up to report it out).
I am trying to install Cent OS/OpenFoam4.1 from the website (https://openfoamwiki.net/index.php/I...CentOS_SL_RHEL) on my login node into university HPC cluster without the need to install the third party stuff. Yet, I had succeeded in sourcing it on the terminal, however, when trying to compile it by typing:-./Allwmake -j 4 > log.make 2>&1following step 15 ( on the mentioned page), I got the error shown in the log.make inserted file.
As it is clear, that the error is related to the missed GMP_LIBRARIES and as a result, I tried to install the third party components ( beginning from step 8), but again I run into the error shown in (in the inserted image when I reached the command:-
./makeGcc -no-multilib gcc-4.8.5/
Sorry for long text.
Any clue?
Thanks again!
Attached Files
File Type: gz myFiles.tar.gz (99.6 KB, 9 views)
alinuman15 is offline   Reply With Quote

Old   September 2, 2017, 11:35
Default
  #14
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Ali,

OpenFOAM 4.1 cannot be built with GCC 4.4.7 anyway, therefore you will need a more recent GCC version. Following the instructions at https://openfoamwiki.net/index.php/I...HEL#CentOS_6.8 - should have worked as intended, although it didn't in your case.

The error message that is in the image you attached states:
Code:
configure: error: cannot compute suffix of object files: cannot compile
This happened when trying to compile the "libgcc" library.

Searching online for the error message lead me to this FAQ entry: https://gcc.gnu.org/wiki/FAQ#Configu...the_problem.3F
There it states that it could very likely be because the necessary libraries... and quoting from that entry:
Quote:
specifically MPFR, GMP and MPC.
And given the steps that you've indicated, I strongly suspect that the problem has to do with some of the details that it seems that you might have skipped. For example, in step #7, the definition "WM_COMPILER_TYPE=ThirdParty" is needed when activating (sourcing) the OpenFOAM shell environment, otherwise it will assume that it is meant to use the system's GCC version. Because along with this definition are defined the versions of GCC, MPFR, GMP and MPC that are meant to be built, which the script makeGcc depends on.

Therefore, if you activate the shell environment with a command similar to the following:
Code:
source $HOME/OpenFOAM/OpenFOAM-4.1/etc/bashrc WM_COMPILER_TYPE=ThirdParty
Then run:
Code:
cd $WM_THIRD_PARTY_DIR
./makeGcc -no-multilib > log.makeGcc 2>&1
This should build GCC with success. If not, the log file "log.makeGcc" will have more details about what happened.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   September 8, 2017, 14:32
Default
  #15
Member
 
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 11
alinuman15 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Ali,

OpenFOAM 4.1 cannot be built with GCC 4.4.7 anyway, therefore you will need a more recent GCC version. Following the instructions at https://openfoamwiki.net/index.php/I...HEL#CentOS_6.8 - should have worked as intended, although it didn't in your case.

The error message that is in the image you attached states:
Code:
configure: error: cannot compute suffix of object files: cannot compile
This happened when trying to compile the "libgcc" library.

Searching online for the error message lead me to this FAQ entry: https://gcc.gnu.org/wiki/FAQ#Configu...the_problem.3F
There it states that it could very likely be because the necessary libraries... and quoting from that entry:
And given the steps that you've indicated, I strongly suspect that the problem has to do with some of the details that it seems that you might have skipped. For example, in step #7, the definition "WM_COMPILER_TYPE=ThirdParty" is needed when activating (sourcing) the OpenFOAM shell environment, otherwise it will assume that it is meant to use the system's GCC version. Because along with this definition are defined the versions of GCC, MPFR, GMP and MPC that are meant to be built, which the script makeGcc depends on.

Therefore, if you activate the shell environment with a command similar to the following:
Code:
source $HOME/OpenFOAM/OpenFOAM-4.1/etc/bashrc WM_COMPILER_TYPE=ThirdParty
Then run:
Code:
cd $WM_THIRD_PARTY_DIR
./makeGcc -no-multilib > log.makeGcc 2>&1
This should build GCC with success. If not, the log file "log.makeGcc" will have more details about what happened.

Best regards,
Bruno
Thanks Bruno.
I will give it a try.
my best.
alinuman15 is offline   Reply With Quote

Old   October 5, 2017, 22:45
Default
  #16
Senior Member
 
ztdep's Avatar
 
p ding
Join Date: Mar 2009
Posts: 427
Rep Power: 19
ztdep is on a distinguished road
Send a message via Yahoo to ztdep Send a message via Skype™ to ztdep
Dear friends:

I solved this problem by copy the parallel version Pstream into the foam library directory. I use the MPICH for compiling the openFOAM.

libPstrea.so is locatin in
/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/mpich-3.2/
copy it to

/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/

and it works
hope this help you.
ztdep is offline   Reply With Quote

Reply

Tags
openmpi


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
MPIrun Problem with FoamJob Workaround kaszt OpenFOAM Running, Solving & CFD 3 October 4, 2018 13:55
using mpirun EmadTandis OpenFOAM Running, Solving & CFD 1 December 4, 2016 15:29
[OpenFOAM.org] "Host key verification failed". upgrades to OpenMPI with OpenFoam 2.3.1 derekm OpenFOAM Installation 0 January 6, 2016 07:54
[OpenFOAM.org] OpenMPI Installation with OpenFOAM 3.0 JCollins OpenFOAM Installation 4 December 29, 2015 11:35
OpenMPI fails cluster run with an orphaned IP Address svg OpenFOAM Running, Solving & CFD 0 January 28, 2014 04:41


All times are GMT -4. The time now is 10:57.