|
[Sponsors] |
November 14, 2009, 16:50 |
Ld_library_path
|
#1 |
Member
Scott
Join Date: Sep 2009
Posts: 30
Rep Power: 17 |
Hello, I seemed to have figured out what was going on from my earlier post. my LD_LIBRARY_PATH ev is pointing to /usr/lib/qt4. This is fine but I also need i to point to /OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt.
Can someone tell me how to set the LD_LIBRARY_PATH with multiple paths so that OpenFOAM can find all of the neccessary libraries so that I don't have to put them all in the qt4 folder? Thanks Last edited by scottneh; November 21, 2009 at 10:16. Reason: [SOLVED] |
|
November 14, 2009, 19:28 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hello Scott,
I've had to trail down your posts and threads, to get a notion as to why you didn't post on the same thread... So, by what I've gathered, you:
So, you should check if your ~/.bashrc file still has the environment properly setup!
And please, re-use your previous thread when the context is still the same... otherwise you might not get answers! Best Regards, Bruno |
|
November 15, 2009, 14:19 |
|
#3 |
Member
Scott
Join Date: Sep 2009
Posts: 30
Rep Power: 17 |
Bruno
Thanks for the input. I figured since they were somewhat different issues that they needed to be posted separately. Anyway I'll keep things together from now on. Here are the results from the EV lists. export | grep WM_ Returns declare -x WM_ARCH="linux64" declare -x WM_ARCH_OPTION="64" declare -x WM_CC="gcc" declare -x WM_CFLAGS="-m64 -fPIC" declare -x WM_COMPILER="Gcc" declare -x WM_COMPILER_ARCH="" declare -x WM_COMPILER_DIR="/programs/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64" declare -x WM_COMPILER_LIB_ARCH="64" declare -x WM_COMPILE_OPTION="Opt" declare -x WM_CXX="g++" declare -x WM_CXXFLAGS="-m64 -fPIC" declare -x WM_DIR="/programs/OpenFOAM/OpenFOAM-1.6/wmake" declare -x WM_LDFLAGS="-m64" declare -x WM_LINK_LANGUAGE="c++" declare -x WM_MPLIB="OPENMPI" declare -x WM_OPTIONS="linux64GccDPOpt" declare -x WM_OSTYPE="POSIX" declare -x WM_PRECISION_OPTION="DP" declare -x WM_PROJECT="OpenFOAM" declare -x WM_PROJECT_DIR="/programs/OpenFOAM/OpenFOAM-1.6" declare -x WM_PROJECT_INST_DIR="/programs/OpenFOAM" declare -x WM_PROJECT_USER_DIR="/home/cleve/OpenFOAM/cleve-1.6" declare -x WM_PROJECT_VERSION="1.6" declare -x WM_THIRD_PARTY_DIR="/programs/OpenFOAM/ThirdParty-1.6" and export | grep FOAM_ Returns declare -x FOAM_APP="/programs/OpenFOAM/OpenFOAM-1.6/applications" declare -x FOAM_APPBIN="/programs/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt" declare -x FOAM_INST_DIR="/programs/OpenFOAM" declare -x FOAM_JOB_DIR="/programs/OpenFOAM/jobControl" declare -x FOAM_LIB="/programs/OpenFOAM/OpenFOAM-1.6/lib" declare -x FOAM_LIBBIN="/programs/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt" declare -x FOAM_MPI_LIBBIN="/programs/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/openmpi-1.3.3" declare -x FOAM_RUN="/home/cleve/OpenFOAM/cleve-1.6/run" declare -x FOAM_SIGFPE="" declare -x FOAM_SITE_APPBIN="/programs/OpenFOAM/site/1.6/bin/linux64GccDPOpt" declare -x FOAM_SITE_LIBBIN="/programs/OpenFOAM/site/1.6/lib/linux64GccDPOpt" declare -x FOAM_SOLVERS="/programs/OpenFOAM/OpenFOAM-1.6/applications/solvers" declare -x FOAM_SRC="/programs/OpenFOAM/OpenFOAM-1.6/src" declare -x FOAM_TUTORIALS="/programs/OpenFOAM/OpenFOAM-1.6/tutorials" declare -x FOAM_USER_APPBIN="/home/cleve/OpenFOAM/cleve-1.6/applications/bin/linux64GccDPOpt" declare -x FOAM_USER_LIBBIN="/home/cleve/OpenFOAM/cleve-1.6/lib/linux64GccDPOpt" declare -x FOAM_UTILITIES="/programs/OpenFOAM/OpenFOAM-1.6/applications/utilities" declare -x MPI_ARCH_PATH="/programs/OpenFOAM/ThirdParty-1.6/openmpi-1.3.3/platforms/linux64GccDPOpt" declare -x MPI_HOME="/programs/OpenFOAM/ThirdParty-1.6/openmpi-1.3.3" declare -x OPAL_PREFIX="/programs/OpenFOAM/ThirdParty-1.6/openmpi-1.3.3/platforms/linux64GccDPOpt" declare -x PATH="/programs/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc/bin:/programs/OpenFOAM/ThirdParty-1.6/openmpi-1.3.3/platforms/linux64GccDPOpt/bin:/programs/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin:/home/cleve/OpenFOAM/cleve-1.6/applications/bin/linux64GccDPOpt:/programs/OpenFOAM/site/1.6/bin/linux64GccDPOpt:/programs/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt:/programs/OpenFOAM/OpenFOAM-1.6/wmake:/programs/OpenFOAM/OpenFOAM-1.6/bin:/usr/kde/3.5/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.2:/usr/qt/3/bin" declare -x PV_PLUGIN_PATH="/programs/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt" declare -x ParaView_DIR="/programs/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linux64Gcc" declare -x ParaView_INST_DIR="/programs/OpenFOAM/ThirdParty-1.6/paraview-3.6.1" declare -x ROOTPATH="/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.2:/usr/qt/3/bin:/programs/OpenFOAM/OpenFOAM-1.6/bin" declare -x WM_COMPILER_DIR="/programs/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64" declare -x WM_DIR="/programs/OpenFOAM/OpenFOAM-1.6/wmake" declare -x WM_PROJECT="OpenFOAM" declare -x WM_PROJECT_DIR="/programs/OpenFOAM/OpenFOAM-1.6" declare -x WM_PROJECT_INST_DIR="/programs/OpenFOAM" declare -x WM_PROJECT_USER_DIR="/home/cleve/OpenFOAM/cleve-1.6" declare -x WM_THIRD_PARTY_DIR="/programs/OpenFOAM/ThirdParty-1.6" |
|
November 15, 2009, 15:15 |
|
#4 |
Member
Scott
Join Date: Sep 2009
Posts: 30
Rep Power: 17 |
The paths
FOAM_USER_LIBBIN="/home/cleve/OpenFOAM/cleve-1.6/lib/linux64GccDPOpt" WM_PROJECT_USER_DIR="/home/cleve/OpenFOAM/cleve-1.6" FOAM_USER_APPBIN="/home/cleve/OpenFOAM/cleve-1.6/applications/bin/linux64GccDPOpt" and anyothers that say "/home/cleve/OpenFOAM/cleve-1.6" were improperly set. They should say "/programs/OpenFOAM/OpenFOAM-1.6/...." I looked in settings and found a few things to change in settings and bashrc. I tested the edits and export | grep WM_ export | grep FOAM both return the proper paths now. However, when I try to run the cavity example I still get the same error. I never did anything with a manual setting of LD_LIBRARY_PATH The only code I saw in bashrc and cshrc was under the line "# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)" but it didn't appear to make a setting In settings.sh I saw "alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'" but no assignment for LD_LIBRARY_PATH. Can you tell me where that assignment is located? As for FOAM_RUN="/home/cleve/OpenFOAM/cleve-1.6/run" I never had a "Run" folder. Am I supposed to create one or should one have been built as part of the install? Last edited by scottneh; November 15, 2009 at 15:41. |
|
November 15, 2009, 19:49 |
|
#5 |
Member
Scott
Join Date: Sep 2009
Posts: 30
Rep Power: 17 |
From what I have been reading it looks like a bad idea to modify the value of LD_LIBRARY_PATH. Is there a way to change where OpenFOAM looks for libraries without messing with LD_LIBRARY_PATH?
It looks like it is ignoring FOAM_USER_LIBBIN, FOAM_USER_APPBIN, FOAM_SITE_LIBBIN and FOAM_USER_APPBIN |
|
November 15, 2009, 20:19 |
|
#6 | |||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hello Scott,
Quote:
If you start following see user guide ($WM_PROJECT_DIR/doc/Guides-a4/UserGuide.pdf), chapter 2, just before the cavity tutorial, you will see that they say that you should make the folder $FOAM_RUN. Quote:
If you use the bashrc file, settings.sh is called by it; if you use cshrc, settings.csh is called. So, assuming you are using bashrc, in settings.sh you will have this: Code:
# prefix to LD_LIBRARY_PATH _foamAddLib() { while [ $# -ge 1 ] do export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH shift done } Code:
_foamAddLib $FOAM_LIBBIN $FOAM_SITE_LIBBIN $FOAM_USER_LIBBIN Quote:
Code:
. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc Try this... after starting a new terminal, do the echo $LD_LIBRARY_PATH, and verify if none of the OpenFOAM folders are listed in it. If not, do on this terminal: Code:
. $WM_PROJECT_DIR/etc/settings.sh echo $LD_LIBRARY_PATH I hope this fixes the issue! Best Regards, Bruno |
||||
November 15, 2009, 20:37 |
|
#7 |
Member
Scott
Join Date: Sep 2009
Posts: 30
Rep Power: 17 |
Thanks for getting back to me.
I have separaret disks for my data and cases runs, there are two 1.5TB drives that I plan on putting all the resuts that are a mirrored RAID set so thats why I wanted to move thigns away from my home and user directories. I'll see how things run and adjust them appropriatly. I only commented out the original lines so they are still there. It is correct that when I enter "echo $LD_LIBRARY_PATH" all I get is the qt4 directory. I entered .$WM_PROJECT_DIR/etc/settings.sh and got an error saying "no such file or directory" but i can see it with ls and I can open it with nano so I know its there. I ran she shell script with sh settings.sh and then echo $LD_LIBRARY_PATH but only the qt4 directory comes up. Last edited by scottneh; November 15, 2009 at 21:22. |
|
November 16, 2009, 04:15 |
|
#8 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
But you want to source the file, not execute it! With this you started a subshell, ran settings.sh and exited again. This will have absolutely no effect on your parent shell (ever!). |
||
November 17, 2009, 23:30 |
|
#9 |
Member
Scott
Join Date: Sep 2009
Posts: 30
Rep Power: 17 |
Looks like it worked. echo $LD_LIBRARY_PATH showed several paths and blockMesh worked. I couldn't go any further becuase I had ot run to catch a flight but it appears to be working now.
Thanks Scott |
|
November 21, 2009, 10:15 |
|
#10 |
Member
Scott
Join Date: Sep 2009
Posts: 30
Rep Power: 17 |
That worked indeed, everything is working now. Thanks for the help!
|
|
|
|