|
[Sponsors] |
November 22, 2017, 04:13 |
extend-4.0: issue with 'foamExec' (and fix)
|
#1 |
New Member
Join Date: Nov 2017
Posts: 1
Rep Power: 0 |
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 "$*" Last edited by PauK; November 22, 2017 at 07:57. |
|
|
|