CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Parallel Building Error (http://www.cfd-online.com/Forums/openfoam-installation/113096-parallel-building-error.html)

sfigato February 12, 2013 09:17

Parallel Building Error
 
Hi Foamers,

I would like to run in parallel my test case. I am using simpleFoam solver. So, This is my dict file:


Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 4;

method scotch;

simpleCoeffs
{
n ( 2 2 1 );
delta 0.001;
}

hierarchicalCoeffs
{
n ( 1 1 1 );
delta 0.001;
order xyz;
}

metisCoeffs
{
processorWeights ( 1 1 1 1 );
}

manualCoeffs
{
dataFile "";
}

distributed no;

roots ( );


// ************************************************** *********************** //
After run the decomposePar utility..I got thi error:

Quote:
--> FOAM FATAL ERROR:
You are trying to use scotch but do not have the scotchDecomp library loaded.
This message is from the dummy scotchDecomp stub library instead.

Please install scotch and make sure that libscotch.so is in your LD_LIBRARY_PATH.
The scotchDecomp library can then be built in $FOAM_SRC/parallel/decompose/decompositionMethods/scotchDecomp


From function labelList scotchDecomp::decompose(const pointField&, const scalarField&)
in file dummyScotchDecomp.C at line 113.


Then, I switched scotch with simple and the decomposition works fine. Nevertheless, when I run my mpirun I got this error:

Quote:
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


Can anyone help me, please?


I deepen the problems. During the building of scotch and dummy, I do not have mpi.h and scotch.h!

My OpenFOAM version is 2.1.x anyone knows if there is an unsolved bug about parallel computation?


Regards
Marco

wyldckat February 12, 2013 17:20

Greetings Marco,

Which Linux distribution are you using and which installation instructions did you follow?

Best regards,
Bruno

sfigato February 14, 2013 02:32

Goodmorning Bruno,

first of all sorry for the late response (due to work constrains)!

My Linux distribution is OpenSUSE 12.2. I followed the OpenFOAM web-site installation instruction except for the paraview bulding. Regarding the lattest, I followed the ones in OpenFOAM wiki (that you have suggested to me)!

Moreover, I compiled both debug and OPT versions and I created two alias: startFoam and starFoamToDebug!

Regards
Marco

wyldckat February 15, 2013 08:00

Hi Marco,

Do you know if you are using the Open-MPI version supplied by OpenFOAM, or using the one provided by openSUSE? To know which one, try running the following commands:
Code:

which mpirun
mpirun --version
echo $WM_MPLIB

Best regards,
Bruno

sfigato February 15, 2013 08:08

Hi Bruno,

this is the output:

Quote:


ifas@lg-208-linux:~> which mpirun
/usr/lib64/mpi/gcc/openmpi/bin/mpirun
ifas@lg-208-linux:~> mpirun --version
mpirun (Open MPI) 1.5.4

Report bugs to http://www.open-mpi.org/community/help/
ifas@lg-208-linux:~> echo $WM_MPLIB
OPENMPI
ifas@lg-208-linux:~>
Regards
Marco

wyldckat February 15, 2013 08:30

Hi Marco,

Then something went wrong while it tried to build Open-MPI 1.5.3 that OpenFOAM provides. Do you have the folder "ThirdParty-2.1.x" placed next to "OpenFOAM-2.1.x"?

Either way, add this to the end of your aliases commands:
Code:

WM_MPLIB=SYSTEMOPENMPI
Or edit the file "OpenFOAM-2.1.x/etc/bashrc" and change the respective line.

Start a new terminal. Then run Allwmake once again in the main OpenFOAM-2.1.x folder. This way you'll use openSUSE's own Open-MPI 1.5.4.

You can check for some more hints here: http://openfoamwiki.net/index.php/In...#openSUSE_12.2

Best regards,
Bruno

sfigato February 15, 2013 08:44

Hi Bruno,

I have installed OpenFOAM as root and I have both folders (third and FOAM) in root/opt. I have two bashrc files, one for the debug version and one for the opt version! What I have to edit exactly?

Sorrry,.but I did not understand properly and I am not so familiar with linux!

This my bashrc file in my opt/OpenFOAM/etc/

Quote:

#- MPI implementation:
# WM_MPLIB = SYSTEMOPENMPI | OPENMPI | MPICH | MPICH-GM | HPMPI
# | GAMMA | MPI | QSMPI
export WM_MPLIB=OPENMPI

Regards
Marco

wyldckat February 15, 2013 08:59

Hi Marco,

Yep, that's the line... change in both files to:
Code:

export WM_MPLIB=SYSTEMOPENMPI
Then start a new terminal and activate respective environment and run Allwmake once again, so that it will link up to the correct MPI library and build the missing files.

Best regards,
Bruno

sfigato February 15, 2013 10:05

Hi Bruno,

I did for the opt version!! It works fine (I think that..)! I do not have a test case ready to try it!

By the way, do I need to specify the number of processor ?(..and how can I check how many processor there are in my machine?)

Regards
Marco

wyldckat February 15, 2013 11:20

Hi Marco,

Uhm... Google? ;)

In a nutshell:
  • Number of CPUs:
    Code:

    lscpu
    #or the more extensive list
    cat /proc/cpuinfo

  • To launch the solver/utility in parallel, simply use:
    Code:

    foamJob -p application_name
    For more options:
    Code:

    foamJob -help
Best regards,
Bruno

sfigato February 15, 2013 11:31

Hi Bruno,

Google sometimes betrays..you do not!! Anyway, thanks for your kindness!

Best Regards
Marco

wyldckat February 15, 2013 11:39

Hi Marco,
Quote:

Originally Posted by sfigato (Post 408062)
Google sometimes betrays..you do not!! Anyway, thanks for your kindness!

You're welcome! :)

But keep in mind that I (as any other human) can get cranky! ;) :rolleyes: For which Google tells that:
Quote:

crank·y
/ˈkraNGkē/

Adjective
Ill-tempered; irritable.
:D

edit: And I forgot to mention that Google has more free time than I do :D ;)

Have fun!
Bruno


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