hystrath / hyStrath

Hypersonic / Rarefied gas dynamics code developments (GPL-3.0)
https://hystrath.github.io/
GNU General Public License v3.0
225 stars 109 forks source link

Unable to run hy2Foam in parallel #7

Closed jg110 closed 6 years ago

jg110 commented 6 years ago

Thanks for your help on the other problem with installation, @vincentcasseau .

I opened another issue because I believe this is a separate problem. When attempting to run hy2Foam in parallel with line 10 in hyStrath/hyFoam/laminarFlatPlateLTS changed to hy2Foam -np 4 -parallel > hyFoam.log, I still get an error about running in parallel on 1 core:

--> 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 79.

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 ??:?
#5  __libc_start_main in "/lib64/libc.so.6"
#6  ? at ??:?
[324a7ecb1de0:21638] *** Process received signal ***
[324a7ecb1de0:21638] Signal: Aborted (6)
[324a7ecb1de0:21638] Signal code:  (-6)
[324a7ecb1de0:21638] [ 0] /lib64/libc.so.6(+0x35250)[0x7f447e3c8250]
[324a7ecb1de0:21638] [ 1] /lib64/libc.so.6(gsignal+0x37)[0x7f447e3c81d7]
[324a7ecb1de0:21638] [ 2] /lib64/libc.so.6(abort+0x148)[0x7f447e3c98c8]
[324a7ecb1de0:21638] [ 3] /opt/OpenFOAM/OpenFOAM- v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam5error5abortEv+0x145) 
[0x7f447f452845]
[324a7ecb1de0:21638] [ 4] /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/openmpi-1.10.4/libPstream.so(_ZN4Foam8UPstream4initERiRPPc+0x1b8)[0x7f447e18a888]
[324a7ecb1de0:21638] [ 5] /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam7argListC1ERiRPPcbbb+0x7cb)[0x7f447f47683b]
[324a7ecb1de0:21638] [ 6] hy2Foam[0x42e6aa]
[324a7ecb1de0:21638] [ 7] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f447e3b4b35]
[324a7ecb1de0:21638] [ 8] hy2Foam[0x430319]
[324a7ecb1de0:21638] *** End of error message ***
./Allrun: line 10: 21638 Aborted                 (core dumped) hy2Foam -np 4 -parallel > log.hyFoam

Sorry if this is a simple syntax error, I'm not very familiar with OpenFOAM. Is this an actual issue or am I just trying to run the solver incorrectly?

jg110 commented 6 years ago

Ah, this was due to me being unfamiliar with OpenFOAM after all. I wasn't aware that more was necessary to run in parallel.

Adding runApplication decomposePar after the checkMesh command, as well as changing line 10 to mpirun -np 4 hy2Foam -parallel > log.hyFoam allowed me to run in parallel. I'll close this issue now.

vincentcasseau commented 6 years ago

Thanks for opening a separate Issue. That's correct, my fault, I messed that up in the previous thread!