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

Allrun always running in background?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By clapointe

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 21, 2020, 05:36
Default Allrun always running in background?
  #1
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
hi,

i'm trying to create an Allrun-file for my case which i'm running in parallel mode. the cores i use vary.

one way to go would be:
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication decomposePar
runParallel $(getApplication)

when i do this, OF creates log files and saves the output right there, the solver is running in the background, so i need to reload the log-file the whole time, which is annoying, and also the files can get large really quickly.
1. i don't want to save the output in a log file.
2. i want to see the calculation on my terminal as i would see it when i would run it with typing in the solver name etc.

any ideas how that can be done?

i already tried the following:
decomposePar
nProcs=$(getNumberOfProcessors)
mpirun -n "$nProcs" solvername -parallel

OF doesn't recognize "$nProcs", also tried "nProcs" and nProcs, $nProcs.
i could also type in the number of cores i use, then it works, but i want to automate stuff, therefore doesn't want to open Allrun for each case.

Thanks and regards
geth03 is offline   Reply With Quote

Old   April 21, 2020, 15:22
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 14
clapointe is on a distinguished road
Looking at the RunFunctions script, you'll see that the command is actually

Code:
mpirun -np $nProcs $APP_RUN -parallel
.

Obviously you'll need to replace $APP_RUN with the name of your solver, but the rest of the command will work.

Caelan
geth03 likes this.
clapointe is offline   Reply With Quote

Old   April 22, 2020, 04:24
Default
  #3
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
thanks,

decomposePar
nProcs=$(getNumberOfProcessors)
mpirun -np $nProcs solvername -parallel

that actually worked,

when i use the terminal i just need to type in
mpirun -n processorNumber solvername -parallel

so the only adjustment was -np instead of -n.
geth03 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
License trouble: ANSLIC_ADMIN, FLEXlm not running, but two lmgrd processes running! dancoz87 ANSYS 17 November 14, 2016 01:10
how to run the propeller Tutrial immortality OpenFOAM Running, Solving & CFD 10 February 22, 2014 09:33
parallel error with cyclic BCs for pimpleDyMFoam and trouble in resuming running sunliming OpenFOAM Bugs 21 November 22, 2013 03:38
Something weird encountered when running OpenFOAM in parallel on multiple nodes xpqiu OpenFOAM Running, Solving & CFD 2 May 2, 2013 04:59
Problems in a Background running of Intel Fortran Minsuk Choi Main CFD Forum 2 February 11, 2005 04:55


All times are GMT -4. The time now is 05:57.