Problems in compiling umfpack

423 views
Skip to first unread message

margar...@brown.edu

unread,
Sep 24, 2013, 5:26:08 PM9/24/13
to matrixpr...@googlegroups.com
I have a ROCKS cluster running CentOS release 5.6 (Final)
2.6.18-238.19.1.el5

The changes made to UFconfig.mk in /share/apps/UFconfig

         CC = gcc
         CFLAGS = -3 -mno-cygwin
         F77 = gfortran
         # BLAS = -L/share/apps/BLAS -lgoto -lgfortran -lgfortranbegin

where the BLAS subroutines are in /share/apps/BLAS

ls /share/apps
BLAS
AMD
AMD-2.2.0.tar.gz
SuiteSparse_config
SuiteSparse_config-4.2.1.tar.gz
UFconfig
UFconfig-3.1.0.tar.gz
UMFPACK
UMFPACK.tar.gz

 cd ../../UMFPACK
 UMFPACK]# make
( cd Demo   ; make )
make[1]: Entering directory `/share/apps/UMFPACK/Demo'
( cd ../Lib ; make )
make[2]: Entering directory `/share/apps/UMFPACK/Lib'
cc    -O3 -fexceptions -fPIC  -I../Include -I../Source -I../../AMD/Include -I../../SuiteSparse_config -I../../CHOLMOD/Include -DDINT -c ../Source/umf_analyze.c -o umf_i_analyze.o
In file included from ../../AMD/Include/amd_internal.h:222,
                 from ../Source/umf_internal.h:96,
                 from ../Source/umf_analyze.c:28:
../../AMD/Include/amd.h:48:43: error: /share/apps/IFconfig/UFconfig.h: No such file or directory
In file included from ../Include/umfpack.h:29,
                 from ../Source/umf_internal.h:124,
                 from ../Source/umf_analyze.c:28:
../../SuiteSparse_config/SuiteSparse_config.h:191:1: warning: "SUITESPARSE_DATE" redefined
In file included from ../../AMD/Include/amd_internal.h:165,
                 from ../Source/umf_internal.h:96,
                 from ../Source/umf_analyze.c:28:
/share/apps/UFconfig/UFconfig.h:106:1: warning: this is the location of the previous definition
In file included from ../Include/umfpack.h:29,
                 from ../Source/umf_internal.h:124,
                 from ../Source/umf_analyze.c:28:
../../SuiteSparse_config/SuiteSparse_config.h:193:1: warning: "SUITESPARSE_MAIN_VERSION" redefined
In file included from ../../AMD/Include/amd_internal.h:165,
                 from ../Source/umf_internal.h:96,
                 from ../Source/umf_analyze.c:28:
/share/apps/UFconfig/UFconfig.h:108:1: warning: this is the location of the previous definition
In file included from ../Include/umfpack.h:29,
                 from ../Source/umf_internal.h:124,
                 from ../Source/umf_analyze.c:28:
../../SuiteSparse_config/SuiteSparse_config.h:194:1: warning: "SUITESPARSE_SUB_VERSION" redefined
In file included from ../../AMD/Include/amd_internal.h:165,
                 from ../Source/umf_internal.h:96,
                 from ../Source/umf_analyze.c:28:
/share/apps/UFconfig/UFconfig.h:109:1: warning: this is the location of the previous definition
In file included from ../Include/umfpack.h:29,
                 from ../Source/umf_internal.h:124,
                 from ../Source/umf_analyze.c:28:
../../SuiteSparse_config/SuiteSparse_config.h:195:1: warning: "SUITESPARSE_SUBSUB_VERSION" redefined
In file included from ../../AMD/Include/amd_internal.h:165,
                 from ../Source/umf_internal.h:96,
                 from ../Source/umf_analyze.c:28:
/share/apps/UFconfig/UFconfig.h:110:1: warning: this is the location of the previous definition
make[2]: *** [umf_i_analyze.o] Error 1
make[2]: Leaving directory `/share/apps/UMFPACK/Lib'
make[1]: *** [../Lib/libumfpack.a] Error 2
make[1]: Leaving directory `/share/apps/UMFPACK/Demo'
make: *** [all] Error 2

margar...@brown.edu

unread,
Sep 24, 2013, 5:29:32 PM9/24/13
to matrixpr...@googlegroups.com
I edited

vi unf_analyze.c
 1192  vi umf_analyze.c
 1193  vi umf_internal.h
 1194  vi umf_analyze.c
 
to resolve the missing links.

Now I get


( cd ../Lib ; make )
make[2]: Entering directory `/share/apps/UMFPACK/Lib'
cc    -O3 -fexceptions -fPIC  -I../Include -I../Source -I../../AMD/Include -I../../SuiteSparse_config -I../../CHOLMOD/Include -DDINT -c ../Source/umf_analyze.c -o umf_i_analyze.o
In file included from ../../AMD/Include/amd.h:49,
                 from ../Include/umfpack.h:89,
                 from ../Source/umf_analyze.c:29:
/share/apps/UFconfig/UFconfig.h:106:1: warning: "SUITESPARSE_DATE" redefined
In file included from ../Include/umfpack.h:29,
                 from ../Source/umf_analyze.c:29:
../../SuiteSparse_config/SuiteSparse_config.h:191:1: warning: this is the location of the previous definition
In file included from ../../AMD/Include/amd.h:49,
                 from ../Include/umfpack.h:89,
                 from ../Source/umf_analyze.c:29:
/share/apps/UFconfig/UFconfig.h:108:1: warning: "SUITESPARSE_MAIN_VERSION" redefined
In file included from ../Include/umfpack.h:29,
                 from ../Source/umf_analyze.c:29:
../../SuiteSparse_config/SuiteSparse_config.h:193:1: warning: this is the location of the previous definition
In file included from ../../AMD/Include/amd.h:49,
                 from ../Include/umfpack.h:89,
                 from ../Source/umf_analyze.c:29:
/share/apps/UFconfig/UFconfig.h:109:1: warning: "SUITESPARSE_SUB_VERSION" redefined
In file included from ../Include/umfpack.h:29,
                 from ../Source/umf_analyze.c:29:
../../SuiteSparse_config/SuiteSparse_config.h:194:1: warning: this is the location of the previous definition
In file included from ../../AMD/Include/amd.h:49,
                 from ../Include/umfpack.h:89,
                 from ../Source/umf_analyze.c:29:
/share/apps/UFconfig/UFconfig.h:110:1: warning: "SUITESPARSE_SUBSUB_VERSION" redefined
In file included from ../Include/umfpack.h:29,
                 from ../Source/umf_analyze.c:29:
../../SuiteSparse_config/SuiteSparse_config.h:195:1: warning: this is the location of the previous definition
In file included from ../Source/umf_analyze.c:30:
../Source/umf_analyze.h:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Int'
In file included from ../Source/umf_analyze.c:31:
../Source/umf_apply_order.h:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
In file included from ../Source/umf_analyze.c:32:
../Source/umf_fsize.h:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
../Source/umf_analyze.c:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Int'

make[2]: *** [umf_i_analyze.o] Error 1
make[2]: Leaving directory `/share/apps/UMFPACK/Lib'
make[1]: *** [../Lib/libumfpack.a] Error 2
make[1]: Leaving directory `/share/apps/UMFPACK/Demo'
make: *** [all] Error 2


margar...@brown.edu

unread,
Sep 25, 2013, 10:57:33 AM9/25/13
to matrixpr...@googlegroups.com
I have tried using gcc and pgcc (Portland compilers

I am getting

../Source/umf_dump.h:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'

before every Int statement such as the two below:

1.   GLOBAL Int UMF_analyze,
(

 2.  Int
        scale ;



On Tuesday, September 24, 2013 5:26:08 PM UTC-4, margar...@brown.edu wrote:

Evgenii Rudnyi

unread,
Sep 28, 2013, 2:55:15 PM9/28/13
to matrixpr...@googlegroups.com
>../../SuiteSparse_config/SuiteSparse_config.h:193:1: warning:
"SUITESPARSE_MAIN_VERSION" redefined

This means that there are two headers where SUITESPARSE_MAIN_VERSION is
defined independently. A solution would be to comment out one definition.

> ../Source/umf_dump.h:59: error: expected '=', ',', ';', 'asm' or
> '__attribute__' before 'void'

This probably means that Int is not defined. Something went wrong with
headers.

You can try to search with grep in headers where Int is defined and to
research why this definition is not included.

Evgenii

On 25.09.2013 16:57 margar...@brown.edu said the following:

Doll, Margaret Ann

unread,
Sep 30, 2013, 2:58:26 PM9/30/13
to matrixpr...@googlegroups.com
I got through the earlier problems,  believe.

I found I had to install five other programs centered around CHOMOD beore UMFPACK would build.

I believe the CHOMOD programs are installed correctly.

However, the make on UMFPACK is now aborting because of

/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_concat_string'
/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_pow_i4_i4'
/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_copy_string'
/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_compare_string'
/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_pow_r8_i4'
/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_pow_r4_i4'





--
You received this message because you are subscribed to a topic in the Google Groups "matrixprogramming" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/matrixprogramming/io3VR7raMDU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to matrixprogramming+unsubscribe@googlegroups.com.
To post to this group, send email to matrixprogramming@googlegroups.com.
Visit this group at http://groups.google.com/group/matrixprogramming.
For more options, visit https://groups.google.com/groups/opt_out.

Evgenii Rudnyi

unread,
Oct 2, 2013, 1:16:09 PM10/2/13
to matrixpr...@googlegroups.com
Have you made a reference to the gfortran library?

Here there are a couple of tips

http://matrixprogramming.com/2011/03/using-nm-to-troubleshoot-linking-problems

on how to deal with linking errors.

Evgenii

On 30.09.2013 20:58 Doll, Margaret Ann said the following:

Doll, Margaret Ann

unread,
Oct 2, 2013, 2:26:45 PM10/2/13
to matrixpr...@googlegroups.com
Evenii,

I had the gfortran library in my LD_LIBRARY_PATH when I compiled GotoBLAS2 and as I am trying to compile UMFPACK.

The tests on GotoBLAS2 were all ok, although there were warnings as the program compiled.

On the web link, it is suggested to run "nm" on the object file that has problems.  On which object file should I run "nm"


/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_concat_string'
/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_pow_i4_i4'
/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_copy_string'
/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_compare_string'
/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_pow_r8_i4'
/share/apps/GotoBLAS2//libblas.so: undefined reference to `_gfortran_pow_r4_i4'
collect2: ld returned 1 exit status
make[1]: *** [umfpack_di_demo] Error 1

make[1]: Leaving directory `/share/apps/UMFPACK/Demo'
make: *** [all] Error 2

Doll, Margaret Ann

unread,
Oct 2, 2013, 2:41:16 PM10/2/13
to matrixpr...@googlegroups.com
Evgenii,

When I run nm libgoto2.a > nm-libgoto2, I get a lot of troubled links.

See the attached.

How do I resolve these links?

I tried

./findlib blas_cpu_number /share/apps/GotoBLAS2/libblas.a 
and get a long list of unresolved symbols starting with the following list.

./findlib blas_cpu_number /share/apps/GotoBLAS2/libblas.a
/share/apps/GotoBLAS2/libblas.a
ssymv.o:
0000000000000000 T ssymv_
                 U ssymv_L
                 U ssymv_U
                 U ssymv_thread_L
                 U ssymv_thread_U
cblas_ssymv.o:
0000000000000000 T cblas_ssymv
                 U ssymv_L
                 U ssymv_U
                 U ssymv_thread_L
                 U ssymv_thread_U
ssymm.o:
0000000000000000 T ssymm_
                 U ssymm_LL
                 U ssymm_LU





nm-libgoto2

Evgenii Rudnyi

unread,
Oct 2, 2013, 3:35:55 PM10/2/13
to matrixpr...@googlegroups.com
Linking is a process that takes some time. A trial and error approach
may help but it is better to invest time to understand what happens. So:

The message

/share/apps/GotoBLAS2//libblas.so: undefined reference to
`_gfortran_concat_string'

says that the linker cannot find _gfortran_concat_string. I would think
that this should be in gfortran library but I do not know. One can use
nm to search for names in gfortran library to check this out. Say

nm gfortran.a | grep gfortran_concat

should do the job.

If the function is there than you have to check things with gfortran and
research why the linker does not find this function there. If not, it
might be good to search in Internet, to check the docs for gfortran,
etc. This function must be somewhere and the goal is to find it out.

A compilation of a free numerical library is a challenge indeed. Yet, it
is worth the efforts. Unfortunately it takes time.

Good luck,

Evgenii

On 02.10.2013 20:41 Doll, Margaret Ann said the following:

Doll, Margaret Ann

unread,
Oct 2, 2013, 3:41:24 PM10/2/13
to matrixpr...@googlegroups.com
Thank you so much for your help.

Hopefully I can resolve the linkage soon.


Evgenii Rudnyi

unread,
Oct 2, 2013, 3:57:13 PM10/2/13
to matrixpr...@googlegroups.com
Remember that in gcc the linker searches in a library just once. You may
need gfortran also after blas. Another option thought that they have
made more than one library for gfortran now. Who knows.

I have not compiled with gcc for some time and I have lost the touch
with it, sorry.

On 02.10.2013 21:41 Doll, Margaret Ann said the following:
Reply all
Reply to author
Forward
0 new messages