CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problems when starting simulation with bash script

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2022, 10:32
Default Problems when starting simulation with bash script
  #1
Member
 
Daniel
Join Date: May 2018
Posts: 43
Rep Power: 7
CFDanielGER is on a distinguished road
Hello everybody,


I have the following problem.
I want to start an OpenFOAM simulation with the following script:
Code:
#!/bin/bash
source /usr/lib/openfoam/openfoam2012/etc/bashrc
. $WM_PROJECT_DIR/bin/tools/RunFunctions
###cleaning########################################################################################################
clear
rm -r pro* post* 1* 2* 3* 4* 5* 6* 7* 8* 9* dynamic* log_*
###solving#########################################################################################################
cores=30
sed -i 's/number.*/numberOfSubdomains '$cores';/' system/decomposeParDict
decomposePar > log_decomposePar.log
mpirun -np $cores renumberMesh -parallel -overwrite > log_renumberMesh.log
mpirun -np $cores potentialFoam -parallel > log_potentialFoam.log
mpirun -np $cores simpleFoam -parallel > log_simpleFoam.log
reconstructPar -newTimes
I always get the following error;
Code:
--> FOAM FATAL ERROR: (openfoam-2012 patch=210618)
attempt to run parallel on 1 processor



   From static bool Foam::UPstream::init(int&, char**&, bool)
    in file UPstream.C at line 289.


FOAM aborting


#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::exitOrAbort(int, bool) at ??:?
#2  Foam::UPstream::init(int&, char**&, bool) at ??:?
#3  Foam::argList::argList(int&, char**&, bool, bool, bool) at ??:?
#4  ? at ??:?
#5  __libc_start_main in /lib64/libc.so.6
#6  ?


--> FOAM FATAL ERROR: (openfoam-2012 patch=210618)
attempt to run parallel on 1 processor


   From static bool Foam::UPstream::init(int&, char**&, bool)
    in file UPstream.C at line 289.


FOAM aborting


#0  Foam::error::printStack(Foam::Ostream&) at ??:?
[csi-lx-244:13167] *** Process received signal ***
[csi-lx-244:13167] Signal: Aborted (6)
[csi-lx-244:13167] Signal code:  (-6)
[csi-lx-244:13167] [ 0] /lib64/libpthread.so.0(+0xf630)[0x7f539d2c2630]
[csi-lx-244:13167] [ 1] /lib64/libc.so.6(gsignal+0x37)[0x7f539cf1b387]
[csi-lx-244:13167] [ 2] /lib64/libc.so.6(abort+0x148)[0x7f539cf1ca78]
[csi-lx-244:13167] [ 3] /usr/lib/openfoam/openfoam2012/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam5error11exitOrAbortEib+0x1f0)[0x7f539e250290]
[csi-lx-244:13167] [ 4] /usr/lib/openfoam/openfoam2012/platforms/linux64GccDPInt32Opt/lib/sys-openmpi/libPstream.so(_ZN4Foam8UPstream4initERiRPPcb+0x813)[0x7f539ccd8d03]
[csi-lx-244:13167] [ 5] /usr/lib/openfoam/openfoam2012/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam7argListC1ERiRPPcbbb+0xe83)[0x7f539e277e53]
[csi-lx-244:13167] [ 6] renumberMesh[0x42e62c]
[csi-lx-244:13167] [ 7] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f539cf07555]
[csi-lx-244:13167] [ 8] renumberMesh[0x432fc1]
[csi-lx-244:13167] *** End of error message ***
at ??:?
#1  Foam::error::exitOrAbort(int, bool) at ??:?
#2  Foam::UPstream::init(int&, char**&, bool) at ??:?
#3  Foam::argList::argList(int&, char**&, bool, bool, bool)
When I am executing the lines from the script above manually in the terminal is working fine.
Does anyone one what the problem is when I am running the script?



Many thanks for your help and best regards,
Daniel
CFDanielGER is offline   Reply With Quote

Old   August 30, 2022, 09:27
Default
  #2
Member
 
Daniel
Join Date: May 2018
Posts: 43
Rep Power: 7
CFDanielGER is on a distinguished road
There was a problem with user rights. It is working now.
CFDanielGER is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The problems occurred in FSI simulation with System Coupling module hermedo FLUENT 0 July 23, 2020 09:00
Problems with Inviscid simulation jcownbey SU2 7 April 23, 2020 09:51
Problems starting a fluid-particle interaction simulation Richard Beauchamp Fidelity CFD 5 January 26, 2015 10:44
Problems by starting Simulation with low y+ biro CFX 8 November 24, 2014 16:43
Using previous data for starting a new simulation siw FLUENT 2 October 24, 2008 17:58


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