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

extend-4.0: issue with 'foamExec' (and fix)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By PauK

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2017, 04:13
Default extend-4.0: issue with 'foamExec' (and fix)
  #1
New Member
 
Join Date: Nov 2017
Posts: 1
Rep Power: 0
PauK is on a distinguished road
Dear foam-extend developer,
in our environment we have an issue with foamExec (we use traditinally due to FOAM FATAL ERROR in Foam::findEtcFile() : could not find mandatory file)

When we start 'mpiexec -np N foamExec <something> -parallel' the application immediately quits with exit 0 and nothing executed.

We found that this issue is rooted in forgetting the value of $* during the execution of the script. Just try to put 'echo $*' prior and below 'Check user-specific foam-extend bashrc file' (lines 101-119): you will see that prior this block all call parameters of the script are still in $*, and after this block the value of $* is empty. The 'exec' on emptiness just do nothing, and that is the behaviour we see.

The fix: add a variable to carry the value of $* through the script,
$ diff foamExec foamExec.bak
40c40
< Params=$*
---
>
129c129
< exec $Params
---
> exec $*







Have a nice day
Paul









2017.11.22 Update: first try to add quotes to the 'exec line (see below) failed and thus removed.
129c129
< exec $*
---
> exec "$*"
ziad likes this.

Last edited by PauK; November 22, 2017 at 07:57.
PauK 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



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