CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Mpi (

pi06jl6 July 17, 2009 16:30

Greetings all, I have been using OpenFOAM for a while, on a basic level, i have now need for some advice for using OpenFOAM with PETsc (=:eek:?). This imply the use of two communicators or can I use the OpenFOAM communicator in Pstream without actually needing recompile the whole package? Anyone who could give me the advice on which MPI topology or it is just using the same communicator class as in OpenFOAM?

Best Regards


pi06jl6 July 18, 2009 14:01

Printout of error
After some trial and error and tutorials on the subject MPI, i was certain that duplicate the MPI_COMM_WORLD should be the answer to able to run "parallel" libraries. So i duplicate and the i run but i get the following result, anyone with experience that could explain this?

The following error was the result during the run:

[0] #0 Foam::error::printStack(Foam::Ostream&)[2] #0 Foam::error::printStack(Foam::Ostream&)[1] #0 Foam::error::printStack(Foam::Ostream&) in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
[1] #1 Foam::sigSegv::sigSegvHandler(int) in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
[1] #2 Uninterpreted: [0xb7f4e420]
[1] #3 MPI_Comm_dup in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
[2] #1 Foam::sigSegv::sigSegvHandler(int)[3] #0 Foam::error::printStack(Foam::Ostream&) in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
[3] #1 Foam::sigSegv::sigSegvHandler(int) in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
[0] #1 Foam::sigSegv::sigSegvHandler(int) in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
[0] #2 Uninterpreted: [0xb7f52420]
[0] #3 MPI_Comm_dup in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/src/openmpi-1.2.3/platforms/linuxGccDPOpt/lib/"
[0] #4 in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/src/openmpi-1.2.3/platforms/linuxGccDPOpt/lib/"
[1] #4 in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
[2] #2 Uninterpreted: [0xb7f7e420]
[2] #3 MPI_Comm_dup in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/"
[3] #2 Uninterpreted: [0xb7f97420]
[3] #3 MPI_Comm_dup in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/src/openmpi-1.2.3/platforms/linuxGccDPOpt/lib/"
[2] #4 in "/home/pi06jl6/OpenFOAM/OpenFOAM-1.4.1/src/openmpi-1.2.3/platforms/linuxGccDPOpt/lib/"
[3] #4 mainmainmain in "/home/pi06jl6/OpenFOAM/pi06jl6-1.4.1/applications/bin/linuxGccDPOpt/ICOFSI_09"
[1] #5 __libc_start_mainmain in "/home/pi06jl6/OpenFOAM/pi06jl6-1.4.1/applications/bin/linuxGccDPOpt/ICOFSI_09"
in "/lib/tls/i686/cmov/"
[1] #6 in "/home/pi06jl6/OpenFOAM/pi06jl6-1.4.1/applications/bin/linuxGccDPOpt/ICOFSI_09"
[2] #5 __libc_start_main[3] #5 __libc_start_main in "/lib/tls/i686/cmov/"

PattiMichelle July 19, 2009 16:32

I was able to simply untar the 4 binary download files as described in the instructions, put the OpenFOAM directory in the right place, create my personal run directory, then modify my .bashrc file to source the OpenFOAM directories, and MPI automatically worked correctly. I had to run the domain decomposition utility on a case first. But the key seems to be putting some critical lines in your .bashrc file. (or .cshrc if you're using csh or tcsh)


pi06jl6 July 20, 2009 09:16

what critical lines are missing?
Honestly, i dont know the error message tells me. I have a guess that i cannot simply duplicate the communicator, i must as well add the attributes required to run the PETSc library in question. This is my guess. And besides, i can run icoDyMFoam on parallell using MPI. This is not the issue. But thank you for you link. Shall look it throught.

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