openfoam environment viarable
I have compiled the openfoam on our cluster, however the environment variable size exceeds the limit of the cluster after source /etc/bashrc. I know a lot of the variables are for installation purpose. I just wonder whether there is anyway I can unload those unnecessary ones for running the solver?
As far as I remember for an OF-program to run there are only two things necessary:
- correctly set PATH and LD_LIBRARY_PATH so that the binaries are found
- two environment variables from the WM_* FOAM_* variety (I think one of them is WM_PROJECT_DIR but I'm not sure)
To find out which these variables are I'd recommend the following: open two terminals. The "clean" one in which no OF-script was called and the "tainted" one in which you source the etc/bashrc. Now in the clean one set PATH and LD_LIBRARY_PATH to the values you find in the tainted terminal with "echo $PATH". Then in the clean terminal go to a case and run an OpenFOAM-command (blockMesh for instance). The command will complain about an unset environment variable. Echo that in the clean terminal and export it in the tainted terminal. As I said: I think you have to do that twice and then OF-programs should run without problems. The four export-commands (PATH, LD_LIBRARY_PATH and the two others) should be all you need to set up a terminal for THAT OF-version and you can set them at the start of your cluster-script.
Now comes the important part: this recipe might stop working mysteriously ;) if you don't do the following: go to the Wiki and write a short article "Howto: Set up a minimal environment for OF commands to run" (or so) so that others will profit from your insight
|All times are GMT -4. The time now is 10:31.|