CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] SHM parallel error. I honestly have no idea (https://www.cfd-online.com/Forums/openfoam-meshing/109793-shm-parallel-error-i-honestly-have-no-idea.html)

stark22 November 26, 2012 23:03

SHM parallel error. I honestly have no idea
 
I run the following:
blockmesh
decomposePar
snappyHexMesh 2 -overwrite -parallel

Then i get the following error:


--> FOAM FATAL ERROR:
bool IPstream::init(int& argc, char**& argv) : attempt to run parallel on 1 processor

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

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 Foam::UPstream::init(int&, char**&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so"
#3 Foam::argList::argList(int&, char**&, bool, bool) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/snappyHexMesh"
#5 __libc_start_main in "/lib/libc.so.6"
#6
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/snappyHexMesh"
[adam-laptop:04860] *** Process received signal ***
[adam-laptop:04860] Signal: Aborted (6)
[adam-laptop:04860] Signal code: (-6)
[adam-laptop:04860] [ 0] /lib/libc.so.6(+0x33af0) [0x7fa4cff1aaf0]
[adam-laptop:04860] [ 1] /lib/libc.so.6(gsignal+0x35) [0x7fa4cff1aa75]
[adam-laptop:04860] [ 2] /lib/libc.so.6(abort+0x180) [0x7fa4cff1e5c0]
[adam-laptop:04860] [ 3] /opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error5abortEv+0x241) [0x7fa4d0d8c771]
[adam-laptop:04860] [ 4] /opt/openfoam211/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so(_ZN4Foam8UPstream4initERiRPPc+0x25b) [0x7fa4cfce2eab]
[adam-laptop:04860] [ 5] /opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam7argListC1ERiRPPcbb+0x2bcf) [0x7fa4d0da46df]
[adam-laptop:04860] [ 6] snappyHexMesh() [0x40821b]
[adam-laptop:04860] [ 7] /lib/libc.so.6(__libc_start_main+0xfd) [0x7fa4cff05c4d]
[adam-laptop:04860] [ 8] snappyHexMesh() [0x407b69]
[adam-laptop:04860] *** End of error message ***
Aborte[/PHP]d

here's the decomposePardict:

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

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 2;

method hierarchical;
// method ptscotch;

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

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

manualCoeffs
{
dataFile "cellDecomposition";
}


// ************************************************** *********************** //

Thoughts? Thanks everyone.

stark22 November 27, 2012 09:23

After thinking about this error over night, I think I need to comment out the coefficient subdictionaries that I don't need. And I think I need to add "distributed" at the end of the decomposeParDict.

tomf November 28, 2012 03:05

Dear Stark,

your error message says:
attempt to run parallel on 1 processor

And it is true:

You gave:
snappyHexMesh 2 -overwrite -parallel

this means you tell the computer to run a serial process in parallel, which it can not do.

You have to give the command as:

mpirun -np 2 snappyHexMesh -overwrite -parallel

I think there is a tutorial in the user guide that tells you how to run in parallel.

Regards,
Tom

stark22 December 3, 2012 09:39

Hey Tom,

Thanks for the help! I managed to figure it out.

ruikeradity1 December 13, 2017 00:42

Thanks tomf it works


All times are GMT -4. The time now is 12:30.