CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   openFOAM on Open MPI (

fferroni February 13, 2012 14:49

openFOAM on Open MPI
Hello everyone.

I've been trialling a case file on my computer using mhdFoam, and now I wanted to send it to the cluster. I would like to use many processors; however, I am wondering whether I absolutely need to decompose to run in parallel.

Also, I have developed a custom solver which I need to use on the cluster. Is it simply a case of uploading the .C files and compiling them on the cluster? I've never done this before... any instructions or things to know?

Thank you

Kindest Regards,


akidess February 14, 2012 03:48

1) Yes, you need to decompose
2) Yes, copy the source to the cluster and compile

fferroni February 14, 2012 07:01

I did decomposePar and it seems to work for a conventional solver.

For the 2nd point, I uploaded my source code, but when I do wmake I get the error:

cmd=make -f /home/ff208/OpenFOAM/OpenFOAM-1.5/wmake/Makefile MAKE_DIR=Make INCLUDE_DEPS=Make/linux64GccDPOpt/includeDeps
make: *** No rule to make target `/home/ff208/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/UPstream.H', needed by `EpotFoam.dep'. Stop.

I've compiled it on my computer and it works fine.
Any information helping a lowly undergrad would be highly appreciated!

Kindest Regards,


akidess February 14, 2012 08:19

Did you copy the entire OpenFOAM directory from your computer to the cluster or did you make a fresh install of OF and then just copy your custom solver? I'm guessing the former, and that your lnInclude links are pointing to invalid paths now.

fferroni February 15, 2012 03:54


Thanks for that. I did a 'fresh' copy and this is the error message I get:

cmd=make -f /home/ff208/OpenFOAM/OpenFOAM-1.5/wmake/Makefile MAKE_DIR=Make INCLUDE_DEPS=Make/linux64GccDPOpt/includeDeps
Making dependency list for source file EpotFoam.C
SOURCE=EpotFoam.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/turbulenceModels -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/turbulenceModels/incompressible/LES/LESModel -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/turbulenceModels/LES/LESdeltas/lnInclude -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/transportModels -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/transportModels/incompressible/singlePhaseTransportModel -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/sampling/lnInclude -IlnInclude -I. -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/EpotFoam.o
In file included from EpotFoam.C:22:
readEPISOControls.H:3:73: warning: no newline at end of file
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/turbulenceModels -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/turbulenceModels/incompressible/LES/LESModel -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/turbulenceModels/LES/LESdeltas/lnInclude -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/transportModels -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/transportModels/incompressible/singlePhaseTransportModel -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/sampling/lnInclude -IlnInclude -I. -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/ff208/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/EpotFoam.o -L/home/ff208/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt \
-lincompressibleTurbulenceModel -lincompressibleLESModels -lincompressibleTransportModels -lfiniteVolume -lmeshTools -lOpenFOAM -liberty -ldl -lm -o /home/ff208/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/EpotFoam.C
/usr/bin/ld: cannot open output file /home/ff208/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/EpotFoam.C: Read-only file system
collect2: ld returned 1 exit status
make: *** [/home/ff208/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/EpotFoam.C] Error 1

Read only file system...! Any way I can tell the compiler to place the compiled solver in another location, and then tell OF to search in that folder whenever I type "EpotFoam"?

Kindest Regards,


akidess February 15, 2012 04:27

Yes. You can modify the paths temporarily by changing environment variables or permanently by editing OF/etc/bashrc and OF/etc/config/

fferroni February 15, 2012 05:16

Great! That worked when it comes to compiling...

However, I run the solver, it reads all the case files, starts the time loop etc. and I get another error :(

Attempt to return dictionary entry as a primitive

file: /export71/home/ff208/system/fvSolution::U from line 30 to line 33.

From function ITstream& primitiveEntry::stream() const
in file db/dictionary/dictionaryEntry/dictionaryEntry.C at line 83.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/home/ff208/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/"
#1 Foam::IOerror::abort() in "/home/ff208/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/"
#2 Foam::dictionaryEntry::stream() const in "/home/ff208/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/"
#3 Foam::lduMatrix::solverPerformance Foam::solve<Foam::Vector<double> >(Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > const&) in "/home/ff208/EpotFoam"
#4 main in "/home/ff208/EpotFoam"
#5 __libc_start_main in "/lib64/"
#6 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/ff208/EpotFoam"


akidess February 15, 2012 05:49

There is a problem with your fvSolution file. Is it is written to run with OF2 (the dictionary format changed sometime after 1.5 was released)?

fferroni February 15, 2012 14:25

Yes. The syntax was different. I should have spotted the /fvSolution message.. sorry!

Unfortunately (:mad:) it gave me another error instead!

keyword PISO is undefined in dictionary "/export71/home/ff208/OpenFOAM/ff208-1.5/system/fvSolution"

file: /export71/home/ff208/OpenFOAM/ff208-1.5/system/fvSolution from line 20 to line 51.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 271.

I've checked in fvSolution whether the PISO loop is defined any differently from the syntax of tutorials in the cluster OF version, but they look exactly the same.
I've changed $FOAM_APPBIN to another location where my custom compiled solver is. Could this be the reason? Perhaps it's trying to find another solver? Just throwing ideas... googled the error but no resolution.
Also I thought (maybe erroneously) that it could do with what libraries I've included when compiling? Maybe it doesn't understand what PISO is?

I have these:
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \

-lincompressibleTransportModels \
-lfiniteVolume \

Not sure if it's relevant...

Thanks again for all the help! Hopefully one day I can answer questions rather than asking questions :p


akidess February 16, 2012 04:05

If you're unsure if it's using the correct executable, you can use the full path to run it. But I think there must be another error in the fvSolution file - post it here. By the way, why aren't you running it on the same version of OpenFOAM as on your local computer?

- Anton

fferroni February 17, 2012 14:56

Ok. I managed to get hold on the IT department and I'm able to load 2.0.0.

However, I get this error when running my compiled script:

/home/ff208/EpotFoam: symbol lookup error: /home/ff208/EpotFoam: undefined symbol: _ZN4Foam10SLListBase12endConstIterE
/home/ff208/EpotFoam: symbol lookup error: /home/ff208/EpotFoam: undefined symbol: _ZN4Foam10SLListBase12endConstIterE
/home/ff208/EpotFoam: symbol lookup error: /home/ff208/EpotFoam: undefined symbol: _ZN4Foam10SLListBase12endConstIterE
/home/ff208/EpotFoam: symbol lookup error: /home/ff208/EpotFoam: undefined symbol: _ZN4Foam10SLListBase12endConstIterE
/home/ff208/EpotFoam: symbol lookup error: /home/ff208/EpotFoam: undefined symbol: _ZN4Foam10SLListBase12endConstIterE
/home/ff208/EpotFoam: symbol lookup error: /home/ff208/EpotFoam: undefined symbol: _ZN4Foam10SLListBase12endConstIterE
/home/ff208/EpotFoam: symbol lookup error: /home/ff208/EpotFoam: undefined symbol: _ZN4Foam10SLListBase12endConstIterE
/home/ff208/EpotFoam: symbol lookup error: /home/ff208/EpotFoam: undefined symbol: _ZN4Foam10SLListBase12endConstIterE

What kind of error is this? No idea...

akidess February 18, 2012 10:40

Something wrong with libraries. Did you remove OpenFOAM-1.5 or is it still there? Did you compile OF-2.0.0 or install it from a package? And most importantly, did you clean the build directory of your solver (using wclean) before you tried to recompile?

You can use

ldd `which EpotFoam`
to check if the executable is picking up the correct libraries.

All times are GMT -4. The time now is 02:21.