Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Please Help: SuitSparse, UMF pack do not work!!!!!!! ;( ;(

herger
Beginner
1,388 Views

Hi all.

Please, help me: I am experiencing a lot of huge problems in running my sims.   I have CENTOS 6, unfortunately, and Linux Free - Unsupported compilers, C++ and Fortran. 

I need the SuiteSparse and UMF Pack for some fluid-structure simulation problems. I cannot run my sims, the libs seem to be not found by the compiler. I have compiled and installed all the libraries and I use the following script to compile my C++ code:

#!/bin/sh

g++ -O3 -DMTL_HAS_BLAS -DMTL_HAS_UMFPACK main.cpp -fpermissive /opt/SuiteSparse/AMD/Lib/libamd.a /opt/SuiteSparse/COLAMD/Lib/libcolamd.a /opt/GotoBLAS2/libgoto2.a -lpthread /opt/SuiteSparse/UMFPACK/Lib/libumfpack.a -I/opt/SuiteSparse/AMD/Include -I/opt/SuiteSparse/UMFPACK/Include/ -I/opt/SuiteSparse/UFconfig -I/opt/mtl4 -o main

The answer is the following:

$ ./esegui.sh


/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_l_free.o): In function `umf_l_free':
umf_free.c:(.text+0xc): undefined reference to `amd_free'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_l_malloc.o): In function `umf_l_malloc':
umf_malloc.c:(.text+0x2b): undefined reference to `amd_malloc'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_l_realloc.o): In function `umf_l_realloc':
umf_realloc.c:(.text+0x33): undefined reference to `amd_realloc'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umfpack_gn_tictoc.o): In function `umfpack_toc':
umfpack_tictoc.c:(.text+0x5): undefined reference to `SuiteSparse_time'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umfpack_gn_tictoc.o): In function `umfpack_tic':
umfpack_tictoc.c:(.text+0x25): undefined reference to `SuiteSparse_time'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_dl_kernel_init.o): In function `umfdl_kernel_init':
umf_kernel_init.c:(.text+0xd67): undefined reference to `amd_l_valid'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_dl_local_search.o): In function `umfdl_local_search':
umf_local_search.c:(.text+0x140c): undefined reference to `dgemv_'
umf_local_search.c:(.text+0x148c): undefined reference to `dtrsv_'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umfpack_dl_qsymbolic.o): In function `symbolic_analysis':
umfpack_qsymbolic.c:(.text+0x29f): undefined reference to `amd_l_defaults'
umfpack_qsymbolic.c:(.text+0x137d): undefined reference to `amd_l_aat'
umfpack_qsymbolic.c:(.text+0x384d): undefined reference to `amd_l_defaults'
umfpack_qsymbolic.c:(.text+0x4ae5): undefined reference to `amd_l2'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_l_analyze.o): In function `umf_l_analyze':
umf_analyze.c:(.text+0x802): undefined reference to `amd_l_postorder'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_l_colamd.o): In function `umf_l_colamd':
umf_colamd.c:(.text+0x16ea): undefined reference to `amd_l_postorder'
umf_colamd.c:(.text+0x19f6): undefined reference to `amd_l_postorder'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_l_cholmod.o): In function `umf_l_cholmod':
umf_cholmod.c:(.text+0xad): undefined reference to `cholmod_l_start'
umf_cholmod.c:(.text+0x10e): undefined reference to `amd_malloc'
umf_cholmod.c:(.text+0x13e): undefined reference to `amd_realloc'
umf_cholmod.c:(.text+0x150): undefined reference to `amd_calloc'
umf_cholmod.c:(.text+0x162): undefined reference to `amd_free'
umf_cholmod.c:(.text+0x206): undefined reference to `cholmod_l_analyze'
umf_cholmod.c:(.text+0x21e): undefined reference to `cholmod_l_free_sparse'
umf_cholmod.c:(.text+0x2cc): undefined reference to `cholmod_l_free_factor'
umf_cholmod.c:(.text+0x2e3): undefined reference to `cholmod_l_print_common'
umf_cholmod.c:(.text+0x2eb): undefined reference to `cholmod_l_finish'
umf_cholmod.c:(.text+0x489): undefined reference to `cholmod_l_transpose'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_dl_blas3_update.o): In function `umfdl_blas3_update':
umf_blas3_update.c:(.text+0x6d9): undefined reference to `dtrsm_'
umf_blas3_update.c:(.text+0x8e3): undefined reference to `dger_'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_dl_transpose.o): In function `umfdl_transpose':
umf_transpose.c:(.text+0x52f): undefined reference to `amd_l_valid'
collect2: ld returned 1 exit status

Please, note that all the things the compiler does not find ARE in the directories I point to in the script......

Do I make any mistake in the compilation script?

Please help me......!!!!!!!!!!!! :( :(


 

0 Kudos
7 Replies
Georg_Z_Intel
Employee
1,388 Views
Hello, add /opt/SuiteSparse/AMD/Lib/libamd.a once more at the end: g++ -O3 -DMTL_HAS_BLAS -DMTL_HAS_UMFPACK main.cpp -fpermissive /opt/SuiteSparse/AMD/Lib/libamd.a /opt/SuiteSparse/COLAMD/Lib/libcolamd.a /opt/GotoBLAS2/libgoto2.a -lpthread /opt/SuiteSparse/UMFPACK/Lib/libumfpack.a -I/opt/SuiteSparse/AMD/Include -I/opt/SuiteSparse/UMFPACK/Include/ -I/opt/SuiteSparse/UFconfig -I/opt/mtl4 -o main /opt/SuiteSparse/AMD/Lib/libamd.a I'm going to close the other threads from you as they seem to be duplicates. Best regards, Georg Zitzlsberger
0 Kudos
herger
Beginner
1,388 Views

Hello!!!

thanks truly much for Your help And sorry for the double post...

unfortunately, it doesn't work, but it's got better:

]$ ./esegui.sh
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umfpack_gn_tictoc.o): In function `umfpack_toc':
umfpack_tictoc.c:(.text+0x5): undefined reference to `SuiteSparse_time'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umfpack_gn_tictoc.o): In function `umfpack_tic':
umfpack_tictoc.c:(.text+0x25): undefined reference to `SuiteSparse_time'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_dl_local_search.o): In function `umfdl_local_search':
umf_local_search.c:(.text+0x140c): undefined reference to `dgemv_'
umf_local_search.c:(.text+0x148c): undefined reference to `dtrsv_'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_l_cholmod.o): In function `umf_l_cholmod':
umf_cholmod.c:(.text+0xad): undefined reference to `cholmod_l_start'
umf_cholmod.c:(.text+0x206): undefined reference to `cholmod_l_analyze'
umf_cholmod.c:(.text+0x21e): undefined reference to `cholmod_l_free_sparse'
umf_cholmod.c:(.text+0x2cc): undefined reference to `cholmod_l_free_factor'
umf_cholmod.c:(.text+0x2e3): undefined reference to `cholmod_l_print_common'
umf_cholmod.c:(.text+0x2eb): undefined reference to `cholmod_l_finish'
umf_cholmod.c:(.text+0x489): undefined reference to `cholmod_l_transpose'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_dl_blas3_update.o): In function `umfdl_blas3_update':
umf_blas3_update.c:(.text+0x6d9): undefined reference to `dtrsm_'
umf_blas3_update.c:(.text+0x8e3): undefined reference to `dger_'
collect2: ld returned 1 exit status
ESECUZIONE beta 5, batra
[tesisti@Grande-Mazinga batra_def]$ nohup: appending output to `nohup.out'
nohup: failed to run command `./main_batra': No such file or directory

thanks and the best reregards 

herger

0 Kudos
Georg_Z_Intel
Employee
1,388 Views
Hello, also add /opt/SuiteSparse/COLAMD/Lib/libcolamd.a and/or /opt/GotoBLAS2/libgoto2.a at the end as well. The GNU* linker is single pass and symbol references to static libraries found will be only resolved with subsequently specifying those libraries. Best regards, Georg Zitzlsberger
0 Kudos
herger
Beginner
1,388 Views

Hello!

Thanks again truly much for Your help.

I have re-linked both the librearies (I tried all the possibile permutations, aand I think that both were needed to be re-linked).     Now the error message is:

./esegui.sh
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umfpack_gn_tictoc.o): In function `umfpack_toc':
umfpack_tictoc.c:(.text+0x5): undefined reference to `SuiteSparse_time'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umfpack_gn_tictoc.o): In function `umfpack_tic':
umfpack_tictoc.c:(.text+0x25): undefined reference to `SuiteSparse_time'
/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a(umf_l_cholmod.o): In function `umf_l_cholmod':
umf_cholmod.c:(.text+0xad): undefined reference to `cholmod_l_start'
umf_cholmod.c:(.text+0x206): undefined reference to `cholmod_l_analyze'
umf_cholmod.c:(.text+0x21e): undefined reference to `cholmod_l_free_sparse'
umf_cholmod.c:(.text+0x2cc): undefined reference to `cholmod_l_free_factor'
umf_cholmod.c:(.text+0x2e3): undefined reference to `cholmod_l_print_common'
umf_cholmod.c:(.text+0x2eb): undefined reference to `cholmod_l_finish'
umf_cholmod.c:(.text+0x489): undefined reference to `cholmod_l_transpose'
collect2: ld returned 1 exit status
ESECUZIONE beta 5, batra
[tesisti@Grande-Mazinga batra_def]$ nohup: appending output to `nohup.out'
nohup: failed to run command `./main_batra': No such file or directory

I tried to add at the end of the script 

/opt/SuiteSparse/UMFPACK/Lib/libumfpack.a

or 

-lpthread /opt/SuiteSparse/UMFPACK/Lib/libumfpack.a

but with no results...

Thanks again for Your time and Your pacience, best regards

Herger

0 Kudos
herger
Beginner
1,388 Views

For the sake of completeness, I attach here the actual script to compile:

#!/bin/sh

g++ -O3 -DMTL_HAS_BLAS -DMTL_HAS_UMFPACK main.cpp -fpermissive /opt/SuiteSparse/AMD/Lib/libamd.a /opt/SuiteSparse/COLAMD/Lib/libcolamd.a /opt/GotoBLAS2/libgoto2.a -lpthread /opt/SuiteSparse/UMFPACK/Lib/libumfpack.a -I/opt/SuiteSparse/AMD/Include -I/opt/SuiteSparse/UMFPACK/Include/ -I/opt/SuiteSparse/UFconfig -I/opt/mtl4 -o main_batra /opt/SuiteSparse/AMD/Lib/libamd.a /opt/SuiteSparse/COLAMD/Lib/libcolamd.a /opt/GotoBLAS2/libgoto2.a

echo "ESECUZIONE beta 5, batra"

nohup ./main_batra &

Thanks again and the best regards

H

0 Kudos
SergeyKostrov
Valued Contributor II
1,388 Views
>>>>...the SuiteSparse and UMF Pack... >>... >>but with no results... Hi, Unfortunately, your linker problems are not related to Intel C++ compiler. Even if Georg gave you really good recommendations you need to ask for help on a forum(s) dedicated to SuiteSparse and UMF Pack software. Best regards, Sergey
0 Kudos
herger
Beginner
1,388 Views

Sorry... 

Thanks truly much to both of You, best regards

H

0 Kudos
Reply