Quantcast

[Arpack-ng] building arpack-ng with Intel compilers and MKL

classic Classic list List threaded Threaded
9 messages Options
vilensky vilensky
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Arpack-ng] building arpack-ng with Intel compilers and MKL

Hi all,

I am getting the following error when configuring arpack-ng 3.1.12.

I run:

> F77=ifort CC=icc MPIF77=mpiifort ./configure --prefix=/usr/local/arpack-ng_3.1.2 --enable-mpi

And get:

 

checking if sgemm_ is being linked in already... no

checking for ATL_xerbla in -latlas... no

checking for sgemm_ in -lblas... no

checking for sgemm_ in -lmkl... no

checking for sgemm_ in -framework vecLib... no

checking for sgemm_ in -lcxml... no

checking for sgemm_ in -ldxml... no

checking for sgemm_ in -lscs... no

checking for sgemm_ in -lcomplib.sgimath... no

checking for sgemm_ in -lblas... (cached) no

checking for sgemm_ in -lblas... (cached) no

configure: error: Cannot find BLAS libraries

 

Please advise.

 

-----------------------------------------------------------------------------------------------

Dr. Mark Vilensky | Scientific Computing Manager

Department of Chemical Physics

Weizmann Institute of Science | P.O.Box 26 | Rehovot, ISRAEL,  76100

[hidden email]

Office: +972-(0)8-9342642 | Fax: +972-(0)8-9344123

 


_______________________________________________
Arpack-ng mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/arpack-ng
Sylvestre Ledru-4 Sylvestre Ledru-4
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: building arpack-ng with Intel compilers and MKL

Hello,

On 28/01/2013 15:29, Mark Vilensky wrote:

> Hi all,
>
> I am getting the following error when configuring arpack-ng 3.1.12.
>
> I run:
>
>> F77=ifort CC=icc MPIF77=mpiifort ./configure
> --prefix=/usr/local/arpack-ng_3.1.2 --enable-mpi
>
> And get:
>
>  
>
> checking if sgemm_ is being linked in already... no
>
> checking for ATL_xerbla in -latlas... no
>
> checking for sgemm_ in -lblas... no
>
> checking for sgemm_ in -lmkl... no
[...]
>
> configure: error: Cannot find BLAS libraries
The MKL should be detected.
You should have a look in the config.log to see why the configure has
not been able to find it.

Maybe it is not available from the normal library search path.

Sylvestre

_______________________________________________
Arpack-ng mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/arpack-ng
vilensky vilensky
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: building arpack-ng with Intel compilers and MKL

This post was updated on .
Hello Sylvestre,

I have MKL path defined in LD_LIBRARY_PATH and in the linker flags: checking for Fortran 77 libraries of ifort... -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64 -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64 -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/../compiler/lib/intel64 -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/lib/intel64 -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/tbb/lib/intel64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/ -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64/ -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64/ -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/../compiler/lib/intel64/ -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/lib/intel64/ -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/tbb/lib/intel64/ -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../ -L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib -lifport -lifcore -limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s -ldl

Thank you,

Mark

Sylvestre Ledru-4 Sylvestre Ledru-4
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: building arpack-ng with Intel compilers and MKL

Hi,
On 28/01/2013 15:41, vilensky wrote:

> Hello Sylvestre, I have MKL path defined in LD_LIBRARY_PATH and in the
> linker flags: checking for Fortran 77 libraries of ifort...
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64
> -*L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64*
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/../compiler/lib/intel64
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/lib/intel64
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/tbb/lib/intel64
> -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/
> -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64
> -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/
> -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64
> -L/usr/lib/../lib64/
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64/
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64/
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/../compiler/lib/intel64/
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/lib/intel64/
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/tbb/lib/intel64/
> -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../ -L/lib64 -L/lib/
> -L/usr/lib64 -L/usr/lib -lifport -lifcore -limf -lsvml -lm -lipgo -lirc
> -lpthread -lirc_s -ldl
Please format correctly your future message. They are hard to read ;)

You should have more interesting on the reason why the MKL detection
failed later in the config.log.

Sylvestre

_______________________________________________
Arpack-ng mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/arpack-ng
vilensky vilensky
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: building arpack-ng with Intel compilers and MKL

Hi Sylvestre,
Sorry for formatting.

I look in config.log. There are many errors regarding sgemm:
configure:14908: icc -o conftest -g -O2   conftest.c   -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64 -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64 -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/../compiler/lib/intel64 -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/lib/intel64 -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/tbb/lib/intel64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/ -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64/ -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64/ -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/../compiler/lib/intel64/ -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/lib/intel64/ -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/tbb/lib/intel64/ -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../ -L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib -lifport -lifcore -limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s -ldl >&5
/tmp/iccq9iyaz.o: In function `main':
/gpfs/usr_loc_rh/src/mathlibs/arpack-ng_3.1.2/conftest.c:42: undefined reference to `sgemm_'

but:
1. I do not have any conftest.c file
2. Linker tryes to link MKL.

Thanks,
Mark
Sylvestre Ledru-4 Sylvestre Ledru-4
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: building arpack-ng with Intel compilers and MKL

On 28/01/2013 16:05, vilensky wrote:

> Hi Sylvestre,
> Sorry for formatting.
>
> I look in config.log. There are many errors regarding sgemm:
> configure:14908: icc -o conftest -g -O2   conftest.c  
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/../compiler/lib/intel64
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/lib/intel64
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/tbb/lib/intel64
> -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/
> -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64
> -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/ -L/lib/../lib64
> -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/compiler/lib/intel64/
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64/
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/../compiler/lib/intel64/
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/ipp/lib/intel64/
> -L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/tbb/lib/intel64/
> -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../ -L/lib64 -L/lib/
> -L/usr/lib64 -L/usr/lib -lifport -lifcore -limf -lsvml -lm -lipgo -lirc
> -lpthread -lirc_s -ldl >&5
> /tmp/iccq9iyaz.o: In function `main':
> /gpfs/usr_loc_rh/src/mathlibs/arpack-ng_3.1.2/conftest.c:42: undefined
> reference to `sgemm_'
>
> but:
> 1. I do not have any conftest.c file
It is generated by the configure.
You will find the source code a few lines further.

You should:
* try to create the same conftest.c
* use the same command line to reproduce the issue
* try to fix it (I guess a -l is missing)

Sylvestre
_______________________________________________
Arpack-ng mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/arpack-ng
vilensky vilensky
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: building arpack-ng with Intel compilers and MKL

Hi Sylvestre,

Compilation of conftest.c works with the following line:

icc -o conftest conftest.c -I$MKLROOT/include -L$MKLROOT/lib/intel64/libmkl_blas95_lp64.a -L$MKLROOT/lib/intel64/libmkl_lapack95_lp64.a -Wl,--start-group $MKLROOT/lib/intel64/libmkl_intel_lp64.a $MKLROOT/lib/intel64/libmkl_intel_thread.a $MKLROOT/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm

But when I am setting CFLAGS to:
-I$MKLROOT/include -L$MKLROOT/lib/intel64/libmkl_blas95_lp64.a -L$MKLROOT/lib/intel64/libmkl_lapack95_lp64.a -Wl,--start-group $MKLROOT/lib/intel64/libmkl_intel_lp64.a $MKLROOT/lib/intel64/libmkl_intel_thread.a $MKLROOT/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm

does not work. I get "configure: error: Cannot find BLAS libraries". While:
icc -o conftest conftest.c $CFLAGS
works.

Also setting
export CFLAGS='-I$MKLROOT/include'
and
export LDFLAGS='-L$MKLROOT/lib/intel64/libmkl_blas95_lp64.a -L$MKLROOT/lib/intel64/libmkl_lapack95_lp64.a -Wl,--start-group $MKLROOT/lib/intel64/libmkl_intel_lp64.a $MKLROOT/lib/intel64/libmkl_intel_thread.a $MKLROOT/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm'

fails with "configure: error: Fortran 77 compiler cannot create executables". Do you have any ideas?

Thank you,
Mark
Sylvestre Ledru-4 Sylvestre Ledru-4
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: building arpack-ng with Intel compilers and MKL

On 28/01/2013 16:51, vilensky wrote:

> Hi Sylvestre,
>
> Compilation of conftest.c works with the following line:
>
> icc -o conftest conftest.c -I$MKLROOT/include
> -L$MKLROOT/lib/intel64/libmkl_blas95_lp64.a
> -L$MKLROOT/lib/intel64/libmkl_lapack95_lp64.a -Wl,--start-group
> $MKLROOT/lib/intel64/libmkl_intel_lp64.a
> $MKLROOT/lib/intel64/libmkl_intel_thread.a
> $MKLROOT/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm
>
> But when I am setting CFLAGS to:
> -I$MKLROOT/include -L$MKLROOT/lib/intel64/libmkl_blas95_lp64.a
> -L$MKLROOT/lib/intel64/libmkl_lapack95_lp64.a -Wl,--start-group
> $MKLROOT/lib/intel64/libmkl_intel_lp64.a
> $MKLROOT/lib/intel64/libmkl_intel_thread.a
> $MKLROOT/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm
>
> does not work. I get "configure: error: Cannot find BLAS libraries". While:
> icc -o conftest conftest.c $CFLAGS
> works.
You should try with shared libraries.

> Also setting
> export CFLAGS='-I$MKLROOT/include'
> and
> export LDFLAGS='-L$MKLROOT/lib/intel64/libmkl_blas95_lp64.a
> -L$MKLROOT/lib/intel64/libmkl_lapack95_lp64.a -Wl,--start-group
> $MKLROOT/lib/intel64/libmkl_intel_lp64.a
> $MKLROOT/lib/intel64/libmkl_intel_thread.a
> $MKLROOT/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm'
>
> fails with "configure: error: Fortran 77 compiler cannot create
> executables". Do you have any ideas?

As previsouly, you should have a look to the config.log to get detailled
information.

Sylvestre


_______________________________________________
Arpack-ng mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/arpack-ng
vilensky vilensky
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: building arpack-ng with Intel compilers and MKL

Ok, it works. The procedure is as follows:

1. Set Intel MPI environment:
source /usr/local/intel/cs_2013.0.028/impi/4.1.0.024/bin64/mpivars.sh
2. Set Intel MKL environment:
source /usr/local/intel/cs_2013.0.028/mkl/bin/mklvars.sh intel64
3. Set linker flags:
export LDFLAGS='-L/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64 /gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64/libmkl_blas95_lp64.a /gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/lib/intel64/libmkl_lapack95_lp64.a -lmkl_rt -lpthread -lm'
4. Set Fortran compiler flags:
export FFLAGS='-I/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/include/intel64/lp64 -I/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/include'
5. Set C compiler flags:
export CFLAGS='-I/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/include/intel64/lp64 -I/gpfs/usr_loc_rh/intel/cs_2013.0.028/composer_xe_2013.1.117/mkl/include'
6. Configure:
F77=ifort CC=icc MPIF77=mpiifort ./configure --prefix=/usr/local/arpack-ng_3.1.2 --enable-mpi
7. After configuration edit PARPACK/Makefile to add library path to MPILIBS valiable:
instead of
MPILIBS = -lmpi
has to be:
MPILIBS = -L/usr/local/intel/cs_2013.0.028/impi/4.1.0.024/intel64/lib -lmpi
8. make
9. make install

Thank Sylvestre for hints.

Mark Vilensky.
Loading...