Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

FGSL install for Linux

rudi-gaelzer
New Contributor I
727 Views

Has anyone successfully compiled and installed fgsl using the intel fortran compiler?

I've found this post:

https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/271209

which mentions a fgsl install, but I suspect it's for OSX.

I've downloaded fgsl v. 1.1.0 from http://www.lrz.de/services/software/mathematik/gsl/fortran/

and followed the instructions.  Apparently, compilation with ifort was successful, and I was also able to create a sample program which tried to invoke a fgsl function.  However, when I run the program I get an 'undefined symbol' error message...

0 Kudos
3 Replies
Steven_L_Intel1
Employee
727 Views

I don't know anything about fgsl, but what is the exact undefined symbol in the error? Can you figure out where it is supposed to come from?

0 Kudos
rudi-gaelzer
New Contributor I
727 Views

Steve Lionel (Intel) wrote:

I don't know anything about fgsl, but what is the exact undefined symbol in the error? Can you figure out where it is supposed to come from?

Hi, Steve.  Thank you for replying my question.

In fact, I advanced a step from the first problem, but still had no luck with the ifort implementation of fgsl.

The problem I reported first I think was solved by setting the LD_LIBRARY_PATH variable.  Now, I'm having segmentation faults.

To summarize, what I did was the following:

1) I downloaded the tarball v. 1.1.0 from http://www.lrz.de/services/software/mathematik/gsl/fortran/download/fgsl-1.1.0.tar.gz and followed the instructions there.

2) I entered the sequence:

$>export FC=ifort
$>export gsl_LIBS=/usr/lib64
$>export PKG_CONFIG_PATH=/usr/lib64/pkgconfig
$>./configure --prefix=$PWD/sss
$>make

I saved in a local path (under ./sss) because I don't want to mess with the structure of the directories where the system libraries are installed.  Not until I'm sure the new libraries are working as they should.

3) The make script created the following directories under sss:

$sss>ls -lR include
include:
total 4
drwxr-xr-x. 2 rudi plasmas 4096 Set 23 15:11 fgsl

include/fgsl:
total 1904
-rw-r--r--. 1 rudi plasmas 1949277 Set 23 15:11 fgsl.mod

$sss>ls -lR lib
lib:
total 3408
-rw-r--r--. 1 rudi plasmas 1914898 Set 23 15:11 libfgsl.a
-rwxr-xr-x. 1 rudi plasmas     947 Set 23 15:11 libfgsl.la
lrwxrwxrwx. 1 rudi plasmas      16 Set 23 15:11 libfgsl.so -> libfgsl.so.1.0.0
lrwxrwxrwx. 1 rudi plasmas      16 Set 23 15:11 libfgsl.so.1 -> libfgsl.so.1.0.0
-rwxr-xr-x. 1 rudi plasmas 1561408 Set 23 15:11 libfgsl.so.1.0.0
drwxr-xr-x. 2 rudi plasmas    4096 Set 23 15:11 pkgconfig

lib/pkgconfig:
total 4
-rw-r--r--. 1 rudi plasmas 335 Set 23 15:11 fgsl.pc

4) Among the test code, I tried to compile and create the executable for integration.F90.

$sss>ifort -c -I./include/fgsl integration.F90

Sucessfully compiles and creates integration.o

5) Now,

$>ifort  -I./include/fgsl integration.F90 mod_unit.o -L./lib -L/usr/lib64 -lfgsl -lgsl -lgslcblas -o integration

Successfully compiled, linked and created the executable.

6) In order to run the test, I first need to set the path.  So,

$>export LD_LIBRARY_PATH=../sss/lib:$LD_LIBRARY_PATH
$>./integration

Gets me a segmentation fault.

The same test runs if I compile everything with gfortran...

 

0 Kudos
Steven_L_Intel1
Employee
727 Views

Sounds as if it's time to spend a while with the debugger. It's possible that the library makes some assumptions that are implementation-dependent.

0 Kudos
Reply