CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM does not work any more! (http://www.cfd-online.com/Forums/openfoam-installation/119518-openfoam-does-not-work-any-more.html)

kiddmax June 19, 2013 04:10

OpenFOAM does not work any more!
 
Dear guys,

I have been using OpenFOAM2.1.0 for a while. But suddenly it does not work after I am trying to compile the utility foamToTecplot360. I think this is the reason which caused OpenFOAM can not work properly....

It gives the error: icoFoam: error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory

I use "foamInstallationTest " to test, and get:


Checking basic setup...
-------------------------------------------------------------------------------
Shell: bash
Host: tud204501
OS: Linux version 3.0.51-0.7.9-default
-------------------------------------------------------------------------------


Checking main OpenFOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /opt/apps/openfoam-2.1.0 yes yes
$WM_PROJECT_USER_DIR /home/yzhang13/OpenFOAM/yzhang13-2.1.0 yes no
$WM_THIRD_PARTY_DIR /home/yzhang13/OpenFOAM/ThirdParty-2.1.0 yes yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR /opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0 yes yes yes

$FOAM_APPBIN ...-2.1.0/platforms/linux64GccDPOpt/bin yes yes yes
$FOAM_SITE_APPBIN .../2.1.0/platforms/linux64GccDPOpt/bin no no
$FOAM_USER_APPBIN ...-2.1.0/platforms/linux64GccDPOpt/bin yes yes no
$WM_DIR .../openfoam-2.1.0/OpenFOAM-2.1.0/wmake yes yes yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$FOAM_LIBBIN ...-2.1.0/platforms/linux64GccDPOpt/lib yes yes yes
$FOAM_SITE_LIBBIN .../2.1.0/platforms/linux64GccDPOpt/lib no no
$FOAM_USER_LIBBIN ...-2.1.0/platforms/linux64GccDPOpt/lib yes yes no
$MPI_ARCH_PATH ...0/platforms/linux64Gcc/openmpi-1.5.3 no yes
-------------------------------------------------------------------------------


Third party software
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
flex 2.5.35 /usr/bin/flex
gcc 4.3.4 /usr/bin/gcc
gzip 1.3.12 /usr/bin/gzip
tar 1.26 /bin/tar
icoFoam ...0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/icoFoam
-------------------------------------------------------------------------------


Summary
-------------------------------------------------------------------------------
Base configuration ok.
Critical systems ok.

Done

Can someone guide me to fix the problem?
Thank you in advance!

Best regards,
Ye

l_r_mcglashan June 19, 2013 04:17

Your mpi libraries are not in your ld_library_path.

Did you install openmpi in third party or are you using your system package?

kiddmax June 19, 2013 05:20

Dear Laurence,

Thank you for your reply.

OpenFOAM works perfectly before I am trying to add utility foamToTecplot360. I added this utility maybe also added ThirdParty package (I can not remember.....). Because I remembered that there is no ThirdParty folder in my user folder before..... but now, there it is.

Hope this gave you some information. Thanks!

Best regards,
Ye

l_r_mcglashan June 19, 2013 08:17

Give the outputs of:

echo $MPI_ARCH_PATH
echo $WM_MPLIB
echo $LD_LIBRARY_PATH | tr -s ' ' '\n'
locate libmpi.so

kiddmax June 19, 2013 08:29

Dear Laurence,

First of all, thank you so much!
The output looks like:

echo $MPI_ARCH_PATH
/home/yzhang13/OpenFOAM/ThirdParty-2.1.0/platforms/linux64Gcc/openmpi-1.5.3

echo $WM_MPLIB
OPENMPI

echo $LD_LIBRARY_PATH | tr -s ' ' '\n'
/opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/openmpi-1.5.3:/home/yzhang13/OpenFOAM/ThirdParty-2.1.0/platforms/linux64GccDPOpt/lib/openmpi-1.5.3:/home/yzhang13/OpenFOAM/ThirdParty-2.1.0/platforms/linux64Gcc/openmpi-1.5.3/lib:/home/yzhang13/OpenFOAM/yzhang13-2.1.0/platforms/linux64GccDPOpt/lib:/opt/apps/openfoam-2.1.0/site/2.1.0/platforms/linux64GccDPOpt/lib:/opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib:/home/yzhang13/OpenFOAM/ThirdParty-2.1.0/platforms/linux64GccDPOpt/lib:/opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/dummy:/usr/lib64/mpi/gcc/openmpi/lib64:/usr/lib64/mpi/gcc/openmpi/lib64/

locate libmpi.so
/usr/lib64/mpi/gcc/openmpi/lib64/libmpi.so.0
/usr/lib64/mpi/gcc/openmpi/lib64/libmpi.so.0.0.3


Best regards,
Ye

l_r_mcglashan June 19, 2013 14:38

It should be picked up then.

Does you $MPI_ARCH_PATH have anything in it? Your WM_MPLIB is OPENMPI so you should have openmpi installed in the ThirdParty folder. If you want to use the system openmpi libraries then change WM_MPLIB to SYSTEMOPENMPI.

Can you then also do:

ldd $(which icoFoam)

wyldckat June 20, 2013 16:33

Greetings to all!

Just passing by to say that building foamToTecplot360 shouldn't have lead to such a big confusion :(
It would have been as simple as following the instructions provided here: https://github.com/wyldckat/localFoamToTecplot360

Best regards,
Bruno

kiddmax June 20, 2013 18:48

Dear Laurence,

Sorry for the delay. Thanks! Today I tried to change WM_MPLIB to SYSTEMOPENMPI. But I can not edit /etc/bashrc file due to no permission(I can not change this situation in our faculty). Probably this means the original option is WM_MPLIB, am I right? So maybe this is no the reason result in this problem??

To be mentioned, I have also installed OpenFOAM-1.6-ext version, and it works good. I check /etc/bashrc file, and the option is SYSTEMOPENMPI..... So I am confused.....

By the way, I also check ldd $(which icoFoam) as you said, and it gives:

linux-vdso.so.1 => (0x00007fff75bff000)
libfiniteVolume.so => /opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so (0x00007f2d8a209000)
libOpenFOAM.so => /opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so (0x00007f2d89ae7000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f2d8989e000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f2d89593000)
libm.so.6 => /lib64/libm.so.6 (0x00007f2d8931a000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2d89104000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2d88d8c000)
libPstream.so => /opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/openmpi-1.5.3/libPstream.so (0x00007f2d88b81000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2d88964000)
libtriSurface.so => /opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libtriSurface.so (0x00007f2d886ef000)
libmeshTools.so => /opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libmeshTools.so (0x00007f2d8824d000)
libz.so.1 => /lib64/libz.so.1 (0x00007f2d88037000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2d8b277000)
libmpi.so.1 => not found
libfileFormats.so => /opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfileFormats.so (0x00007f2d87e2e000)

Best regards,
Ye

kiddmax June 20, 2013 18:53

Dear Bruno,

Thanks for your reply.

I am quite sure that OpenFOAM does not work after I tried to compile this utility as the guideline in this forum. Because of no permission as ordinary user in my office computer, I failed to compile it. After that, OpenFOAM stoped working....

Hope you can help me! Thanks!

Best regards,
Ye

wyldckat June 23, 2013 11:55

Hi Ye,

If the "WM_THIRD_PARTY_DIR" variable is pointing to the "ThirdParty-2.1.0" folder in your home path, then you clearly modified something critical.

What changes have you made to the file "$HOME/.bashrc"? You can see the path to the file I'm talking about by running:
Code:

echo $HOME/.bashrc
Or did you add any files to the folder "$HOME/.OpenFOAM"?
Notice that this is a folder named ".OpenFOAM", not "OpenFOAM"!

Best regards,
Bruno

kiddmax June 24, 2013 04:32

Dear Bruno,

Thanks for your help!

Indeed, there is folder under $HOME/.OpenFOAM which named 2.1.0, and there is a file 'prefs.sh' in it.

The phase in the file is:
export WM_THIRD_PARTY_DIR=/home/yzhang13/OpenFOAM/ThirdParty-2.1.0

Is it the reason which caused OpenFOAM does not work?
Thank you again, Bruno.

Best regards,
Ye

wyldckat June 24, 2013 16:31

Hi Ye,

Yes, once you remove that file 'prefs.sh' and start a new terminal, OpenFOAM 2.1.0 should work properly once again.

As for foamToTecplot360, when you followed the instructions from here: https://github.com/wyldckat/localFoamToTecplot360 - at which step were you not able to follow?
Did you try the instructions from section "Using Zip or Tar"?

Best regards,
Bruno

kiddmax June 25, 2013 02:56

Dear Bruno,

Thank you! OpenFOAM worked again after I removed the file!

I am not sure at which step I failed to install foamToTecplot360. I think that I don't have write permission on my office computer, because I have compiled it successfully on my own laptop.

Thank you again, Bruno.

Best regards,
Ye


All times are GMT -4. The time now is 17:29.