Community
cancel
Showing results for 
Search instead for 
Did you mean: 
kirill_igum
Beginner
1,217 Views

icc for gsl

Jump to solution
did anyone have any success with gnu scientific library?
but i had to put "-no-vec" forode-intval library.
i'd like to use benefits of icc including vectorization for solving ODEs. so having -no-vec option is an issue for me. is there anyway to go around it?
also, is there a way to use the library without compiling it on it's own? meaning I want to just put the .h files in the directory with my program and compile them together with the program.
thank you for your help,
--Kirill
0 Kudos
1 Solution
aazue
New Contributor I
1,217 Views
Hi
I have made test Debian Lenny (5) gsl lib with GNU compiler origin default: is:

gcc -v
Target: x86_64-linux-gnu
Configur avec: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Modle de thread: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)


Before to use Intel compiler you must build the source GNU to evaluate if not other problem exist.

download gsl-1.14

For that you can result all tests (GNU GCC) without fault require you must using use first this simple syntax not really optimized (just change core2 for your processors)

CFLAGS="-O2 -m64 -march=core2 -mtune=core2 -Wpointer-arith -fno-strict-aliasing ";export CFLAGS

make distclean
./configure
make --jobs=4
make check

Result: I have all test passed ok GNU


For Icc compiler also all test passed ok , use the flag same is given after.
Compiler version is the last...

debian:/usr/src/download/gsl-1.14# icc -V
Intel C Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100414
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.




LANG=C; export LANG
CC="/opt/intel/Compiler/11.1/072/bin/intel64/icc"; export CC
LD_LIBRARY_PATH=/opt/intel/Compiler/11.1/072/lib/intel64;export LD_LIBRARY_PATH;export LD_LIBRARY_PATH

CFLAGS="-O2 -m64 -mieee-fp -march=core2 -mtune=core2 -Wpointer-arith -fno-strict-aliasing "; export CFLAGS

make distclean
./configure
make --jobs=4
make check (make check > log 2>&1)

I have all test passed ok Icc Intel compiler

If i have time i see after, how would be make better for improve (fast or other ???).

Good luck
Regards

View solution in original post

11 Replies
kirill_igum
Beginner
1,217 Views
forgot to mention, icc is versioon 11.0, gsl is 1.14, i'm running debian lenny on 8-core mac pro
Quoc-An_L_Intel
Employee
1,217 Views
Have you tried building it with -fp-model source and without the -no-vec option?

kirill_igum
Beginner
1,217 Views
yes,
make check returns an error with

Making check in ode-initval
make[1]: Entering directory `/home/kirill/tmp/gsltry/gsl-1.14/ode-initval'
make test
make[2]: Entering directory `/home/kirill/tmp/gsltry/gsl-1.14/ode-initval'
make[2]: `test' is up to date.
make[2]: Leaving directory `/home/kirill/tmp/gsltry/gsl-1.14/ode-initval'
make check-TESTS
make[2]: Entering directory `/home/kirill/tmp/gsltry/gsl-1.14/ode-initval'
gsl: lu.c:147: ERROR: matrix is singular
Default GSL error handler invoked.
/bin/sh: line 5: 23595 Aborted ${dir}$tst
FAIL: test
==================
1 of 1 test failed
==================
Quoc-An_L_Intel
Employee
1,217 Views
kirill_igum
Beginner
1,217 Views
i've read it before and i just tried again all kinds of variations of -02 and -03 and -fp-model

the problem with ode-initval still comes up
Quoc-An_L_Intel
Employee
1,217 Views
I am not an expert on building this stuff on linux, but I download the gsl package and successfully built it my Mac Pro with Intel compiler 11.1.088 for Mac OS X, and Snow Leopard OSX 10.6.3



intels-mac-pro:gsl-1.14 ale$ cat l.txt

export CC=icc

export CXX=icpc

export CFLAGS="-arch i386 -fp-model double"

export LDFLAGS="-arch i386"

./configure --prefix=/opt/gsl_an --disable-shared --disable-dependency-tracking

Making check in ode-initival

make test

icc -DHAVE_CONFIG_H -I. -I.. -I.. -arch i386 -fp-model double -c test.c

/bin/sh ../libtool --tag=CC --mode=link icc -arch i386 -fp-model double -arch i386 -o test test.o libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la -lm

libtool: link: icc -arch i386 -fp-model double -arch i386 -o test test.o ./.libs/libgslodeiv.a ../linalg/.libs/libgsllinalg.a ../blas/.libs/libgslblas.a ../cblas/.libs/libgslcblas.a ../matrix/.libs/libgslmatrix.a ../permutation/.libs/libgslpermutation.a ../vector/.libs/libgslvector.a ../block/.libs/libgslblock.a ../complex/.libs/libgslcomplex.a ../ieee-utils/.libs/libgslieeeutils.a ../err/.libs/libgslerr.a ../test/.libs/libgsltest.a ../sys/.libs/libgslsys.a ../utils/.libs/libutils.a -lm

make check-TESTS

Completed [3509/3509]

PASS: test

=============

1 test passed

=============

kirill_igum
Beginner
1,217 Views
i tried :
./configure FC=ifort CC=icc CFLAGS="-m32 -fp-model double" LDFLAGS="-m32"
./configure FC=ifort CC=icc CFLAGS="-m32 -fp-model double" LDFLAGS="-m32" --disable-shared --disable-dependency-tracking

linux uses -m32 instead of -arch i386 and -m64 instead of -arch x86_64

***i got errors while configuring :

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking whether to enable maintainer-specific portions of Makefiles... no

checking for a sed that does not truncate output... /bin/sed

checking whether make sets $(MAKE)... (cached) yes

checking build system type... x86_64-unknown-linux-gnu

checking host system type... x86_64-unknown-linux-gnu

checking for gcc... icc

checking whether the C compiler works... no

configure: error: in `/home/kirill/tmp/gsltry/gsl-1.14':

configure: error: C compiler cannot create executables

See `config.log' for more details.


***from config.log:

98 configure:3563: result: no
99 configure: failed program was:
100 | /* confdefs.h */
101 | #define PACKAGE_NAME "gsl"
102 | #define PACKAGE_TARNAME "gsl"
103 | #define PACKAGE_VERSION "1.14"
104 | #define PACKAGE_STRING "gsl 1.14"
105 | #define PACKAGE_BUGREPORT ""
106 | #define PACKAGE_URL ""
107 | #define PACKAGE "gsl"
108 | #define VERSION "1.14"
109 | #define RELEASED /**/
110 | /* end confdefs.h. */
111 |
112 | int
113 | main ()
114 | {
115 |
116 | ;
117 | return 0;
118 | }
119 configure:3568: error: in `/home/kirill/tmp/gsltry/gsl-1.14':
120 configure:3572: error: C compiler cannot create executables
121 See `config.log' for more details.



configure worked with -m64 but gave the same ode-initval error as before

why do you use -arch i386? isn't mac pro x86_64?

aazue
New Contributor I
1,218 Views
Hi
I have made test Debian Lenny (5) gsl lib with GNU compiler origin default: is:

gcc -v
Target: x86_64-linux-gnu
Configur avec: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Modle de thread: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)


Before to use Intel compiler you must build the source GNU to evaluate if not other problem exist.

download gsl-1.14

For that you can result all tests (GNU GCC) without fault require you must using use first this simple syntax not really optimized (just change core2 for your processors)

CFLAGS="-O2 -m64 -march=core2 -mtune=core2 -Wpointer-arith -fno-strict-aliasing ";export CFLAGS

make distclean
./configure
make --jobs=4
make check

Result: I have all test passed ok GNU


For Icc compiler also all test passed ok , use the flag same is given after.
Compiler version is the last...

debian:/usr/src/download/gsl-1.14# icc -V
Intel C Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100414
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.




LANG=C; export LANG
CC="/opt/intel/Compiler/11.1/072/bin/intel64/icc"; export CC
LD_LIBRARY_PATH=/opt/intel/Compiler/11.1/072/lib/intel64;export LD_LIBRARY_PATH;export LD_LIBRARY_PATH

CFLAGS="-O2 -m64 -mieee-fp -march=core2 -mtune=core2 -Wpointer-arith -fno-strict-aliasing "; export CFLAGS

make distclean
./configure
make --jobs=4
make check (make check > log 2>&1)

I have all test passed ok Icc Intel compiler

If i have time i see after, how would be make better for improve (fast or other ???).

Good luck
Regards

View solution in original post

kirill_igum
Beginner
1,217 Views
all tests passed!!!

thank you for your time and help

--Kirill
aazue
New Contributor I
1,217 Views
Hi
With flag -ipo also all test passed ok
Use same:

make distclean
LANG=C; export LANG
CC="/opt/intel/Compiler/11.1/072/bin/intel64/icc"; export CC
LD_LIBRARY_PATH=/opt/intel/Compiler/11.1/072/lib/intel64;export LD_LIBRARY_PATH;export LD_LIBRARY_PATH
AR="/opt/intel/Compiler/11.1/072/bin/intel64/xiar";export AR
CFLAGS="-O2 -m64 -mieee-fp -ipo -override-limits -march=core2 -mtune=core2 -Wpointer-arith -fno-strict-aliasing "; export CFLAGS

./configure
or
./configure --disable-shared

Use (DSO) for call if it can work .. i think maybe probably better.


Difficult to find nice tune with this machine used ,is too small not appropriated this type source , also i
have football cup (TV) shared same desktop in other terminal
and result could be not signifiant

I have read that to one month Intel make promotion i7 950 decreased price almost 50% ,
but unfortunately world cup would be already ended...

Regards
kirill_igum
Beginner
1,217 Views
everything worked with -ipo, even with -03 optimization
thank you again
Reply