View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002435 | OpenFOAM | Bug | public | 2017-01-16 15:55 | 2017-01-16 17:03 |
Reporter | Salut | Assigned To | wyldckat | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Linux | OS | Mint | OS Version | 17.1 |
Summary | 0002435: Command not found on the cluster whereas command found in local | ||||
Description | Hello, my problem is odd. I installed openFOAM-4.0 on a cluster. I ran some tutorials with it on my computer (not the cluster, I used ./Allrun to run scripts). When I want to run tutorials on the cluster (sub -x ...), I cannot because it says: "./Allrun: line 5: /bin/tools/RunFunctions: No such file or directory" The line ". $WM_PROJECT_DIR/bin/tools/RunFunctions" is wrong because it cannot find WM_PROJECT_DIR. But when I run this line in the consol, it works fine. Moreover, when I change $WM_PROJECT_DIR by the good repository, this line runs and I have blockMesh: command not found. Of course I ran the bashrc file. | ||||
Tags | No tags attached. | ||||
|
Allrun (724 bytes)
#!/bin/sh cd /work/salmon/OpenFOAM/run/Cas_test #cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name application=`getApplication` runApplication /work/salmon/OpenFOAM/OpenFOAM-dev/bin/foamExec blockMesh runApplication surfaceFeatureExtract runApplication snappyHexMesh -overwrite runApplication createBaffles -overwrite #transformPoints -scale '(1e-3 1e-3 1e-3)' #decomposePar -force > log.decomposePar 2>&1 #decomposePar -fields > log.decomposePar 2>&1 #runParallel `getApplication` #runApplication reconstructPar -time 0: #paraFoam -touch # ----------------------------------------------------------------- end-of-file |
|
And the alias in the bashrc file: alias of4='source /work/salmon/OpenFOAM4/OpenFOAM-4.0/etc/bashrc WM_COMPILER_TYPE=ThirdParty WM_COMPILER=Gcc48 WM_MPLIB=OPENMPI FOAMY_HEX_MESH=yes' |
|
I'm guessing that you've followed the unofficial/community instructions from openfoamwiki.net - those instructions are not yet completed and do not fully explain how to use the installation in a cluster environment. Nonetheless, the solution is simple: you need to use the complete source command at the beginning of your script for the job scheduler, namely: source /work/salmon/OpenFOAM4/OpenFOAM-4.0/etc/bashrc WM_COMPILER_TYPE=ThirdParty WM_COMPILER=Gcc48 WM_MPLIB=OPENMPI FOAMY_HEX_MESH=yes This is (for the most part) already officially explained here: http://openfoam.org/download/4-0-source/#environment-variables - the detail is that using the alias makes it easier to switch between versions, but you cannot disregard the need to source the environment explicitly when using remote machines or job schedulers, because those are not aware of what you're doing in your command line. I'm closing this as "no change required"... I don't understand why, but even after stating in several places at openfoamwiki.net that any questions regarding the instructions given there should be asked at the forums at CFD-Online, people still come and ask about it here... |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-01-16 15:55 | Salut | New Issue | |
2017-01-16 15:55 | Salut | File Added: Allrun | |
2017-01-16 16:08 | Salut | Note Added: 0007647 | |
2017-01-16 17:03 | wyldckat | Note Added: 0007648 | |
2017-01-16 17:03 | wyldckat | Assigned To | => wyldckat |
2017-01-16 17:03 | wyldckat | Status | new => closed |
2017-01-16 17:03 | wyldckat | Resolution | open => no change required |