Community
cancel
Showing results for 
Search instead for 
Did you mean: 
TinTin_9
Beginner
124 Views

Compiling SCALAPACK example1.f ... linking problems

Hello all,

I am trying to run scalapack using ifort 11.1 and corresponding MKL version..

The example1.f is from SCALAPACK website http://www.netlib.org/scalapack/examples/

The MKLPATH = /opt/intel/Compiler/11.1/059/mkl/lib/32

WHEN I do..

mpif90 EXAMPLE1.f -L$MKLPATH/libmkl_scalapack_core.a $MKLPATH/libmkl_solver.a -Wl,--start-group $MKLPATH/libmkl_intel.a $MKLPATH/libmkl_intel_thread.a $MKLPATH/libmkl_core.a $MKLPATH/libmkl_blacs_intelmpi.a -Wl,--end-group -openmp -lpthread

I get..

/tmp/ccizXxrV.o: In function `MAIN__':
EXAMPLE.f:(.text+0xd2): undefined reference to `descinit_'
EXAMPLE.f:(.text+0x12c): undefined reference to `descinit_'
EXAMPLE.f:(.text+0x1c4): undefined reference to `pdlacpy_'
EXAMPLE.f:(.text+0x230): undefined reference to `pdlacpy_'
EXAMPLE.f:(.text+0x2a0): undefined reference to `pdgesv_'
EXAMPLE.f:(.text+0x524): undefined reference to `pdlamch_'
EXAMPLE.f:(.text+0x579): undefined reference to `pdlange_'
EXAMPLE.f:(.text+0x5ce): undefined reference to `pdlange_'
EXAMPLE.f:(.text+0x689): undefined reference to `pdgemm_'
EXAMPLE.f:(.text+0x6db): undefined reference to `pdlange_'
collect2: ld returned 1 exit status

Please can you tell what is wrong here as this is my first time with scalapack and Blacs ??

thanks,

Nitin
0 Kudos
3 Replies
Ying_H_Intel
Employee
124 Views

Hi Nitin,

The problem may be in the command line

A possible workablecommand line is like the one in the KB Using Cluster MKL PBLAS/ScaLAPACK FORTRAN routine in your C program

mpif90 EXAMPLE1.f $MKLPATH/libmkl_scalapack_core.a $MKLPATH/libmkl_blacs_intelmpi.a $MKLPATH/libmkl_solver.a -Wl,--start-group $MKLPATH/libmkl_intel.a $MKLPATH/libmkl_intel_thread.a $MKLPATH/libmkl_core.a -Wl,--end-group -openmp -lpthread

Regards,
Ying
Shi__Yue
Beginner
124 Views

Hi Ying,

Is this closed or still opening?

I got the same error as the original poster although with a different command:

mpif90 -L$MKLPATH -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm example.f -o example

Could you please help me here?

Thanks,

Yue

Ying_H_Intel
Employee
124 Views

Hi Yue,

Are you running intel MPI 64bit and intel fortran compiler or gnu fortran compiler?  You may try the example under MKL install folder, which provide the example code and how to compile and run the scalapack routine.

 for example below command line with Intel mpi and GNU gfortran.     If the example can work, but your example doesn't work, could you please submit your question to https://supporttickets.intel.com/ , where you can provide your test code and reproduce step.

Best Regards,

Ying  

> tar -xzvf examples_cluster_f.tgz
>source /opt/intel/impi/2017.3.196/bin64/mpivars.sh

>source /opt/intel/mkl/bin/mklvars.sh intel64

>cd scalapackf

 >make libintel64 function=pdgetrf compiler=gnu
make pdgetrfx.res _IA=intel64 Ibin=bin64 EXT=a RES_EXT=lib
make[1]: Entering directory `/home/yhu5/mkl2018/mkl_nightly_2018u1_20170712/mkl_nightly_2018u1_20170712/__release_lnx/mkl/examples/scalapackf'
mkdir -p _results/gnu_intelmpi_lp64_intel64_lib_parallel
mpif90 -f90=gfortran  -Wall -m64  -DMPI_KIND_=4 source/common/pcmatgen.f -c -o _results/gnu_intelmpi_lp64_intel64_lib_parallel/pcmatgen.o
mpif90 -f90=gfortran  -Wall -m64  -DMPI_KIND_=4 source/common/pdmatgen.f -c -o _results/gnu_intelmpi_lp64_intel64_lib_parallel/pdmatgen.o
mpif90 -f90=gfortran  -Wall -m64  -DMPI_KIND_=4 source/common/psmatgen.f -c -o _results/gnu_intelmpi_lp64_intel64_lib_parallel/psmatgen.o
mpif90 -f90=gfortran  -Wall -m64  -DMPI_KIND_=4 source/common/pzmatgen.f -c -o _results/gnu_intelmpi_lp64_intel64_lib_parallel/pzmatgen.o
mpif90 -f90=gfortran  -Wall -m64  -DMPI_KIND_=4 source/common/pmatgeninc.f -c -o _results/gnu_intelmpi_lp64_intel64_lib_parallel/pmatgeninc.o
source/common/pmatgeninc.f:244.33:

      REAL FUNCTION PSRAND( IDUMM )
                                 1
Warning: Unused dummy argument 'idumm' at (1)
source/common/pmatgeninc.f:292.45:

      DOUBLE PRECISION FUNCTION PDRAND( IDUMM )
                                             1
Warning: Unused dummy argument 'idumm' at (1)
mpif90 -f90=gfortran  -Wall -m64  -DMPI_KIND_=4 source/common/average_time.f -c -o _results/gnu_intelmpi_lp64_intel64_lib_parallel/average_time.o
source/common/average_time.f:53.46:

      SUBROUTINE SORT_ARRAY( ARRAY, DIM, ORDER )
                                              1
Warning: Unused dummy argument 'order' at (1)
mpif90 -f90=gfortran  -Wall -m64  -DMPI_KIND_=4 source/pdgetrfx.f -c -o _results/gnu_intelmpi_lp64_intel64_lib_parallel/pdgetrfx.o
mpif90 -f90=gfortran  -Wall -m64  -DMPI_KIND_=4 _results/gnu_intelmpi_lp64_intel64_lib_parallel/pdgetrfx.o _results/gnu_intelmpi_lp64_intel64_lib_parallel/pcmatgen.o _results/gnu_intelmpi_lp64_intel64_lib_parallel/pdmatgen.o _results/gnu_intelmpi_lp64_intel64_lib_parallel/psmatgen.o _results/gnu_intelmpi_lp64_intel64_lib_parallel/pzmatgen.o _results/gnu_intelmpi_lp64_intel64_lib_parallel/pmatgeninc.o _results/gnu_intelmpi_lp64_intel64_lib_parallel/average_time.o -o _results/gnu_intelmpi_lp64_intel64_lib_parallel/pdgetrfx.exe -L"../../lib/intel64" -Wl,--start-group "../../lib/intel64"/libmkl_scalapack_lp64.a "../../lib/intel64"/libmkl_gf_lp64.a "../../lib/intel64"/libmkl_gnu_thread.a "../../lib/intel64"/libmkl_core.a "../../lib/intel64"/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group -fopenmp -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -mt_mpi -ldl -lm
mpiexec -n 4 /usr/bin/env LD_LIBRARY_PATH="../../lib/intel64":/opt/intel/compilers_and_libraries_2017.4.196/linux/mpi/intel64/lib:/opt/intel/compilers_and_libraries_2017.4.196/linux/mpi/mic/lib:"../../../compiler/lib/intel64" _results/gnu_intelmpi_lp64_intel64_lib_parallel/pdgetrfx.exe in/pdgetrfx.in _results/gnu_intelmpi_lp64_intel64_lib_parallel/pdgetrfx.res
STOP 0
STOP 0
STOP 0
STOP 0
rm _results/gnu_intelmpi_lp64_intel64_lib_parallel/*.o
make[1]: Leaving directory `/home/yhu5/mkl2018/mkl_nightly_2018u1_20170712/mkl_nightly_2018u1_20170712/__release_lnx/mkl/examples/scalapackf'
[yhu5@hsw-ep01 scalapackf]$

 

Reply