[Trilinos-Users] [EXTERNAL] [TRILINOS-11.14.1 INSTALLATION ERROR SOLVED]--UNDEFINED REFERENCE TO "CHOLMOD/ SUITESPARSE"--SOLVED

Siva Rajamanickam srajama at sandia.gov
Fri Apr 17 14:12:43 MDT 2015


Didn't someone forward a bug report on how cholmod that comes in the package is 
compiled ?

Again, what is your goal in doing this ? Another option for you, download 
CHOLMOD and compile it yourself. It is not that hard to do.

-Siva

On 04/17/2015 02:06 PM, Joseph Ampadu Ofosu wrote:
> Siva,
>
> Is it not possible to link static libraries to shared ones, if you build the 
> static with the '-fPIC' flag configuration option?
>
> Thanks.
>
> On 18/04/2015 01:33, Siva Rajamanickam wrote:
>> The reason is Amesos doesn't use CHOLMOD and Amesos2 does and the right 
>> cholmod libraries are not in
>> your link line.
>>
>> If you don't need CHOLMOD please turn that off. I am starting to wonder what 
>> is your real usecase ?
>> Why do you have so many different direct solvers enabled ?
>>
>> If you really need CHOLMOD, then you need to link against it properly. See 
>> Ross's instruction below to see the link line.
>>
>> Also, why do you link with static libs and configuring Trilinos with shared 
>> libraries on ?
>>
>> -Siva
>>
>> On 04/17/2015 10:20 AM, Ofosu Ampadu Joseph wrote:
>>> Dear All,
>>>
>>> Thanks for the advice.
>>>
>>> Bartlett,
>>> I did not link the executables anymore.
>>>
>>> First, I turned off the Amesos2 package via : -DTrilinos_ENABLE_Amesos2=OFF
>>> Yet this packaged was still part of the configuration output and thus the 
>>> error was unresolved.
>>>
>>> I eventually turned the Amesos2 package off via : 
>>> -DTrilinos_ENABLE_ALL_PACKAGES=OFF, whiles enabling the individual packages 
>>> I wanted to install.
>>>
>>> Both the configuration and installation was successful.
>>>
>>> However, I still do not understand why Amesos configures without errors and 
>>> yet Amesos2 does with errors.
>>>
>>> On 17/04/15 21:06, Bartlett, Roscoe A. wrote:
>>>>
>>>> Link that executable with VERBOSE=1 with:
>>>>
>>>> $ cd packages/amesos2/src/SuiteSparse/KLU2/Source
>>>>
>>>> $ make VERBOSE=1 Amesos2_klu2_simple
>>>>
>>>> That will show you the exact link line and if the libraries are showing up 
>>>> correctly.
>>>>
>>>> If the correct libraries are showing in the right order on the link line, 
>>>> then there must be a problem with the compatibility of the libraries.
>>>>
>>>> -Ross
>>>>
>>>> *From:*trilinos-users-bounces at software.sandia.gov 
>>>> [mailto:trilinos-users-bounces at software.sandia.gov] *On Behalf Of *Ofosu 
>>>> Ampadu Joseph
>>>> *Sent:* Thursday, April 16, 2015 11:56 PM
>>>> *To:* Bruno Turcksin
>>>> *Cc:* trilinos-users at software.sandia.gov
>>>> *Subject:* Re: [Trilinos-Users] [EXTERNAL] [TRILINOS-11.14.1 INSTALLATION 
>>>> ERROR PERSISTS]--UNDEFINED REFERENCE TO "CHOLMOD/ SUITESPARSE"--CONFIG 
>>>> STATEMENTS
>>>>
>>>> Hello Bruno,
>>>>
>>>> I did add the following as you advised:
>>>>
>>>> -DTPL_UMFPACK_LIBRARIES="/usr/local/lib/libumfpack.5.7.1.a" \
>>>> -DTPL_CHOLMOD_LIBRARIES="/usr/local/lib/libcholmod.3.0.5.a" \
>>>> -DTPL_SUITESPARSE_LIBRARIES="/usr/local/lib/libsuitesparseconfig.4.4.4.a" \
>>>>
>>>> AND AFTER
>>>>
>>>> 17% of built progress, I had the following errors:
>>>>
>>>> Scanning dependencies of target Amesos2_klu2_simple
>>>> [ 17%] Building CXX object 
>>>> packages/amesos2/src/SuiteSparse/KLU2/Source/CMakeFiles/Amesos2_klu2_simple.dir/klu2_simple.cpp.o
>>>> Linking CXX executable Amesos2_klu2_simple.exe
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `amd_postorder'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `cholmod_start'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `cholmod_finish'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `cholmod_free_factor'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `SuiteSparse_free'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `cholmod_print_common'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `SuiteSparse_time'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `cholmod_free_sparse'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `amd_defaults'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `cholmod_transpose'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `SuiteSparse_config'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `SuiteSparse_malloc'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to `amd_2'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `amd_valid'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `cholmod_analyze'
>>>> ../../../../../amesos/src/libamesos.so.11.14.1: undefined reference to 
>>>> `amd_aat'
>>>> collect2: error: ld returned 1 exit status
>>>> make[2]: *** 
>>>> [packages/amesos2/src/SuiteSparse/KLU2/Source/Amesos2_klu2_simple.exe] Error 1
>>>> make[1]: *** 
>>>> [packages/amesos2/src/SuiteSparse/KLU2/Source/CMakeFiles/Amesos2_klu2_simple.dir/all] 
>>>> Error 2
>>>> make: *** [all] Error 2
>>>>
>>>>
>>>> Any specific reasons?
>>>>
>>>> Thanks once again.
>>>>
>>>> On 17/04/15 09:00, Bruno Turcksin wrote:
>>>>
>>>>     Joseph,
>>>>
>>>>     you probably want to add something like:
>>>>
>>>>     -DTPL_CHOLMOD_LIBRARIES=path/to/library \
>>>>     -DTPL_SUITESPARSE_LIBRARIES=path/to/library \
>>>>
>>>>     The linker cannot find where these libraries are. Your configuration
>>>>     only says where the header files are not the compiled libraries.
>>>>
>>>>     Best,
>>>>
>>>>     Bruno
>>>>
>>>>     2015-04-16 17:58 GMT-05:00 Ofosu Ampadu Joseph
>>>>     <joseph at al.t.u-tokyo.ac.jp <mailto:joseph at al.t.u-tokyo.ac.jp>>:
>>>>
>>>>     Dear All,
>>>>
>>>>     In order to provide a broader picture to the installation errors, I
>>>>     have provided the configuration statements I used for configuring below:
>>>>
>>>>     sudo cmake -DTrilinos_ENABLE_Sacado=ON \
>>>>     -DTrilinos_ENABLE_Stratimikos=ON \
>>>>     -DCMAKE_BUILD_TYPE=RELEASE \
>>>>     -DCMAKE_CXX_FLAGS="-g -O3" \
>>>>     -DCMAKE_C_FLAGS="-g -O3" \
>>>>     -DCMAKE_FORTRAN_FLAGS="-g -O5" \
>>>>     -DTrilinos_EXTRA_LINK_FLAGS="-lgfortran" \
>>>>     -DTrilinos_ENABLE_ALL_PACKAGES=ON \
>>>>     -DCMAKE_VERBOSE_MAKEFILE=FALSE \
>>>>     -DTrilinos_VERBOSE_CONFIGURE=FALSE \
>>>>     -DTPL_ENABLE_MPI=ON \
>>>>     -DBUILD_SHARED_LIBS=ON \
>>>>     -DTPL_ENABLE_UMFPACK=ON \
>>>>     -DTPL_ENABLE_CHOLMOD=ON \
>>>>     -DTPL_ENABLE_SUITESPARSE=ON \
>>>>     -DTPL_ENABLE_SuperLU=ON \
>>>>     -DTPL_UMFPACK_INCLUDE_DIR="/usr/local/include" \
>>>>     -DTPL_CHOLMOD_INCLUDE_DIR="/usr/local/include" \
>>>>     -DTPL_SUITESPARSE_INCLUDE_DIR="/usr/local/include" \
>>>>     -DSuperLU_INCLUDE_DIRS="/home/ofosu/SuperLU_4.3/SRC" \
>>>>     -DTPL_SuperLU_LIBRARIES="/home/ofosu/SuperLU_4.3/lib/libsuperlu_4.3.a" \
>>>>     -DTPL_ENABLE_MUMPS=ON \
>>>>     -DTPL_ENABLE_SCALAPACK=ON \
>>>>     -DTPL_MUMPS_INCLUDE_DIRS="/usr/lib/openmpi/include/openmpi" \
>>>>     -DTPL_SCALAPACK_LIBRARIES="/home/ofosu/scalapack-2.0.2/libscalapack.a" \
>>>>     -DTPL_SWIG_INCLUDE_DIRS="/usr/local/include/share/swig/3.0.5" \
>>>>     -DCMAKE_INSTALL_PATH="/usr/local/include" \
>>>>      /home/ofosu/trilinos-11.14.1-Source
>>>>
>>>>
>>>>     On 16/04/15 02:08, Siva Rajamanickam wrote:
>>>>
>>>>     Looks like you are configuring Trilinos with CHOLMOD, but the linker is
>>>>     not able to find the cholmod library.
>>>>
>>>>     -Siva
>>>>
>>>>     On 04/15/2015 10:12 AM, Ofosu Ampadu Joseph wrote:
>>>>
>>>>     Dear All,
>>>>
>>>>     I am new to Trilinos and would like to interface some of the libraries
>>>>     with Deal II.
>>>>     I am building on Ubuntu 14.04 LTS OS.
>>>>     I have been able to successfully configure Trilinos, however during
>>>>     installation via the command: 'sudo make install' , and after 27% of
>>>>     built target success, I get the following errors:
>>>>
>>>>     [ 27%] Built target Amesos_Amesos_TESTBASIC_COPY3
>>>>     Linking CXX executable amesos_test.exe
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to `cholmod_start'
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to `cholmod_finish'
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to
>>>>     `cholmod_free_factor'
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to `SuiteSparse_free'
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to
>>>>     `cholmod_print_common'
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to `SuiteSparse_time'
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to
>>>>     `cholmod_free_sparse'
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to `cholmod_transpose'
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to `SuiteSparse_config'
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to `SuiteSparse_malloc'
>>>>     ../../src/libamesos.so.11.14.1: undefined reference to `cholmod_analyze'
>>>>     collect2: error: ld returned 1 exit status
>>>>     make[2]: *** [packages/amesos/test/Test_Basic/amesos_test.exe] Error 1
>>>>     make[1]: ***
>>>>     [packages/amesos/test/Test_Basic/CMakeFiles/amesos_test.dir/all] Error 2
>>>>     make: *** [all] Error 2
>>>>
>>>>     I humbly ask if anyone could assist me with an advice of how to
>>>>     proceed. Thanks.
>>>>
>>>>
>>>>     _______________________________________________
>>>>     Trilinos-Users mailing list
>>>>     Trilinos-Users at software.sandia.gov
>>>>     <mailto:Trilinos-Users at software.sandia.gov>
>>>>     https://software.sandia.gov/mailman/listinfo/trilinos-users
>>>>
>>>>
>>>>     -- 
>>>>     ====================================
>>>>     Ofosu Joseph Ampadu
>>>>     The University of Tokyo
>>>>     Graduate Sch. of Frontier Sciences
>>>>     Department of Advanced Energy
>>>>     Komurasaki Laboratory
>>>>     +81-4-7136-4030 <tel:%2B81-4-7136-4030>
>>>>     ====================================
>>>>
>>>>     _______________________________________________
>>>>     Trilinos-Users mailing list
>>>>     Trilinos-Users at software.sandia.gov
>>>>     <mailto:Trilinos-Users at software.sandia.gov>
>>>>     https://software.sandia.gov/mailman/listinfo/trilinos-users
>>>>
>>>>
>>>>
>>>> -- 
>>>> ====================================
>>>> Ofosu Joseph Ampadu
>>>> The University of Tokyo
>>>> Graduate Sch. of Frontier Sciences
>>>> Department of Advanced Energy
>>>> Komurasaki Laboratory
>>>> +81-4-7136-4030
>>>> ====================================
>>>
>>> -- 
>>> ====================================
>>> Ofosu Joseph Ampadu
>>> The University of Tokyo
>>> Graduate Sch. of Frontier Sciences
>>> Department of Advanced Energy
>>> Komurasaki Laboratory
>>> +81-4-7136-4030
>>> ====================================
>>>
>>>
>>> _______________________________________________
>>> Trilinos-Users mailing list
>>> Trilinos-Users at software.sandia.gov
>>> https://software.sandia.gov/mailman/listinfo/trilinos-users
>>
>
> -- 
> ==================================
> Ofosu Joseph Ampadu
> The University of Tokyo
> Graduate Sch. of Frontier Sciences
> Department of Advanced Energy
> Komurasaki Laboratory
> 0081-4-7136-4030
> ==================================
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20150417/c314b0d4/attachment.html>


More information about the Trilinos-Users mailing list