openfoam problem with sbatch


DARDO ARIEL VIÑAS VISCARDI
 

Hello group!

I have a problem with OpenFOAM running over sbatch....

Whenever I try to run the cavity example over 16 cores with 2 nodes from console, so that would be doing:

module load openfoam
srun -n 16 -N 2 --pty /bin/bash
prun icoFoam -parallel

I get a correct output:

End
 
Finalising parallel run

BUT, when I run it with sbatch, this being:

#!/bin/bash
 
### Nombre de la cola a donde mandarlo
#SBATCH -p normal
#SBATCH --job-name=cavity
#SBATCH --ntasks=16
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=8
#SBATCH --exclusive
 
### Environment setup
module unload openmpi
module load openfoam
# Source tutorial run functions
. ${WM_PROJECT_DIR}/bin/tools/RunFunctions

 
srun icoFoam -parallel
 
I get an error:

--> FOAM FATAL ERROR:
bool IPstream::init(int& argc, char**& argv) : attempt to run parallel on 1 processor
 
    From function static bool Foam::UPstream::init(int&, char**&)
    in file UPstream.C at line 91.
 
FOAM aborting
 
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::UPstream::init(int&, char**&) at ??:?
#3  Foam::argList::argList(int&, char**&, bool, bool, bool) at ??:?
#4  ? at ??:?
 
 
--> FOAM FATAL ERROR:
bool IPstream::init(int& argc, char**& argv) : attempt to run parallel on 1 processor
 
    From function static bool Foam::UPstream::init(int&, char**&)
    in file UPstream.C at line 91.
 
FOAM aborting
 
#5  __libc_start_main in "/usr/lib64/libc.so.6"
#6  ? at ??:?
[c1:30825] *** Process received signal ***
[c1:30825] Signal: Aborted (6)
[c1:30825] Signal code:  (-6)
[c1:30825] [ 0] /usr/lib64/libc.so.6(+0x35270)[0x7f4c54cf8270]
[c1:30825] [ 1] /usr/lib64/libc.so.6(gsignal+0x37)[0x7f4c54cf81f7]
[c1:30825] [ 2] /usr/lib64/libc.so.6(abort+0x148)[0x7f4c54cf98e8]
[c1:30825] [ 3] /opt/ohpc/pub/apps/OpenFOAM/OpenFOAM-5.x/platforms/linux64Gcc48DPInt64Opt/lib/libOpenFOAM.so(_ZN4Foam5error5abortEv+0x11e)[0x7f4c55dfc65e]
[c1:30825] [ 4] /opt/ohpc/pub/apps/OpenFOAM/OpenFOAM-5.x/platforms/linux64Gcc48DPInt64Opt/lib/openmpi-2.1.1/libPstream.so(_ZN4Foam8UPstream4initERiRPPc+0x3ad)[0x7f4c54ab8d5d]
[c1:30825] [ 5] /opt/ohpc/pub/apps/OpenFOAM/OpenFOAM-5.x/platforms/linux64Gcc48DPInt64Opt/lib/libOpenFOAM.so(_ZN4Foam7argListC1ERiRPPcbbb+0x6f9)[0x7f4c55e23c89]
[c1:30825] [ 6] /opt/ohpc/pub/apps/OpenFOAM/OpenFOAM-5.x/platforms/linux64Gcc48DPInt64Opt/bin/icoFoam[0x42185c]
[c1:30825] [ 7] /usr/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f4c54ce4c05]
[c1:30825] [ 8] /opt/ohpc/pub/apps/OpenFOAM/OpenFOAM-5.x/platforms/linux64Gcc48DPInt64Opt/bin/icoFoam[0x42497e]
[c1:30825] *** End of error message ***
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::UPstream::init(int&, char**&) at ??:?
#3  Foam::argList::argList(int&, char**&, bool, bool, bool) at ??:?

Anyone know why?

Join OpenHPC-users@groups.io to automatically receive all group messages.