Linking mixed C/Fortran application against PARDISO with intel Composer Studio

Linking mixed C/Fortran application against PARDISO with intel Composer Studio


I Have been trying to compile the code of an application against PARDISO, without much sucess... :

alex@iskandhar:~/Desktop/Buildfactory/Calculix/CalculiX/ccx_2.5_Intel_Pa/src$ make
./; icc -Wall -O3  -I ../../../SPOOLES-2.2_Intel -DARCH="Linux" -DSPOOLES -DARPACK -DPARDISO -DMATRIXSTORAGE -DUSE_MT=1 -c ccx_2.5.c; ifort -O3 -nofor-main -openmp -o ccx_2.5 ccx_2.5.o ccx_2.5.a  -liomp5 -lpthread  -L /home/alex/Desktop/Buildfactory/Calculix/SPOOLES-2.2_Intel/libspooles.a /home/alex/Desktop/Buildfactory/Calculix/SPOOLES-2.2_Intel/MT/src/spoolesMT.a ../../../ARPACK_Intel/libarpack_Linux.a ../../../Pardiso/ /opt/intel/mkl/lib/intel64/libmkl_solver_lp64.a /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel/mkl/lib/intel64/libmkl_intel_thread.a /opt/intel/mkl/lib/intel64/libmkl_core.a /opt/intel/mkl/lib/intel64/libmkl_lapack95_lp64.a /opt/intel/mkl/lib/intel64/libmkl_blas95_lp64.a /opt/intel/mkl/lib/intel64/libmkl_scalapack_lp64.a -lm -lc -lutil -ldl -lpthread
ccx_2.5.a(spooles.o): In function `factor':
spooles.c:(.text+0x43): undefined reference to `DVfill'
spooles.c:(.text+0x50): undefined reference to `Graph_new'
spooles.c:(.text+0x5b): undefined reference to `InpMtx_fullAdjacency'
spooles.c:(.text+0x67): undefined reference to `IVL_tsize'
spooles.c:(.text+0x8b): undefined reference to `Graph_init2'
spooles.c:(.text+0xb7): undefined reference to `orderViaBestOfNDandMS'
spooles.c:(.text+0xce): undefined reference to `ETree_oldToNewVtxPerm'

This is my Makefile :

FFLAGS = -O3 -nofor-main -openmp


.c.o :
        $(CC) $(CFLAGS) -c $<
.f.o :
        $(FC) $(FFLAGS) -c $<


SCCXMAIN = ccx_2.5.c

OCCXF = $(SCCXF:.f=.o)
OCCXC = $(SCCXC:.c=.o)


LIBS = \
       $(DIR)/libspooles.a \
        $(DIR)/MT/src/spoolesMT.a \
        ../../../ARPACK_Intel/libarpack_Linux.a \
        ../../../Pardiso/ \
        /opt/intel/mkl/lib/intel64/libmkl_solver_lp64.a \
        /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a \
        /opt/intel/mkl/lib/intel64/libmkl_intel_thread.a \
        /opt/intel/mkl/lib/intel64/libmkl_core.a \
        /opt/intel/mkl/lib/intel64/libmkl_lapack95_lp64.a \
        /opt/intel/mkl/lib/intel64/libmkl_blas95_lp64.a \
        /opt/intel/mkl/lib/intel64/libmkl_scalapack_lp64.a \
       -lm -lc -lutil -ldl -lpthread

ccx_2.5: $(OCCXMAIN) ccx_2.5.a  $(LIBS)
        ./; $(CC) $(CFLAGS) -c ccx_2.5.c; $(FC) $(FFLAGS) -o $@ $(OCCXMAIN) ccx_2.5.a  -liomp5 -lpthread  -L${/opt/intel/mkl/lib/intel64} $(LIBS)

ccx_2.5.a: $(OCCXF) $(OCCXC)
        ar vr $@ $?

How should i change this makefile, in order to work..?



4 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

First, you should observe the recommendations of the link advisor on the MKL forum for the MKL part of this.  Note that linking with MKL static libraries requires that you take into account the circular dependencies and the order of dependencies where they aren't circular.  If you aren't interested in that, you should start with dynamic libraries.  Your ifort command already implies several of the libraries you have specified explicitly, although we can't guess whether the details may have been meant for a different version.  You should be using the same version of ifort and icpc (assuming the hints that you are using C++ instead of, or in addition to, C are valid).  Then you will need to be showing your versions and error messages.

Bild des Benutzers mecej4

The undefined external symbols listed appear to be from one of your user libraries. Where are these routines contained?

I don't see why you mentioned Pardiso in your thread title. Please note that MKL itself contains Pardiso routines, so you have to be careful when linking to Pardiso-4.12.

As TimP wrote, you may find it better to get things working with dynamic libraries as a first step.

>>ccx_2.5.a(spooles.o): In function `factor':
>>spooles.c:(.text+0x43): undefined reference to `DVfill'

I could only add that you will need to look at spooles.c in order to understand where DVfill symbol ( a variable, or function, or class, etc ) comes from.

Melden Sie sich an, um einen Kommentar zu hinterlassen.