Re: Installing and running Gadget 2 on Ubuntu 16.04 LTS

From: Antonio Bibiano <antbbn_at_gmail.com>
Date: Thu, 17 Nov 2016 19:54:58 +1100

Also another thing to check is that the environment variable
LD_LIBRARY_PATH contains the path to where the gsl library is installed.


2016-11-17 19:33 GMT+11:00 Manodeep Sinha <manodeep.sinha_at_vanderbilt.edu>:

> On 11/17/16 6:43 PM, turhan nasri wrote:
>
> Hi,
>
> I am just starting to learn SPH simulation. I was following this tutorial:
> https://astrobites.org/2011/04/02/installing-and-running-gadget-2/
>
> It seems I succesfully generated the executable Gadget2 inside the
> /Gadget2 directory, then I copied both the Gadget2 executable and
> galaxy.param file to a newly created galaxy directory. However when I run:
>
> mpirun -np 2 ./Gadget2 ./galaxy.param
>
> I get the following error:
>
> ./Gadget2: error while loading shared libraries: libgsl.so.0: cannot
> open shared object file: No such file or directory
> ./Gadget2: error while loading shared libraries: libgsl.so.0: cannot
> open shared object file: No such file or directory
>
> I believe it has to do something with my Makefile. I am sharing the adjust
> settings for target computer part, if it gives any hint to the error:
>
> #--------------------------------------- Select target computer
>
> SYSTYPE="trina"
> #SYSTYPE="Mako"
> #SYSTYPE="Regatta"
> #SYSTYPE="RZG_LinuxCluster"
> #SYSTYPE="RZG_LinuxCluster-gcc"
> #SYSTYPE="OpteronMPA"
> #SYSTYPE="OPA-Cluster32"
> #SYSTYPE="OPA-Cluster64"
>
>
> #--------------------------------------- Adjust settings for target
> computer
>
> ifeq ($(SYSTYPE),"trina")
> CC = mpicc
> OPTIMIZE = -O3 -Wall
> GSL_INCL = -I/usr/local/include
> GSL_LIBS = -L/usr/local/lib
> FFTW_INCL= -I/usr/local/include
> FFTW_LIBS= -L/usr/local/lib
> MPICHLIB = -L/usr/lib
> endif
>
> I thought if there were error in makefile, the executable would not have
> created at the first place. But the executable was there and I have this
> error. I would very much appreciate if anyone has any suggestion on this.
> thanks
>
> Turhan
>
> Unfortunately, you can still run into such runtime errors even though the
> executable compiled fine. This error happens because the search path at
> runtime does not include the actual directory location for the compile-time
> library. The easiest way to fix this error is by embedding the library path
> into the executable *during* compilation:
>
> GSL_LIB_DIR := /usr/local/lib
> GSL_LIBS := -L$(GSL_LIB_DIR) -Xlinker -rpath -Xlinker $(GSL_LIB_DIR)
>
>
> Cheers,
> Manodeep
>
>
> -----------------------------------------------------------
>
> If you wish to unsubscribe from this mailing, send mail to
> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
> A web-archive of this mailing list is available here:
> http://www.mpa-garching.mpg.de/gadget/gadget-list
>
>
Received on 2016-11-17 09:55:01

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:32 CET