[petsc-dev] SuperLU link error on BGP FEN

John R. Cary cary at txcorp.com
Thu Dec 2 15:47:03 CST 2010


Thanks, Satish!

John

On 12/2/10 2:40 PM, Satish Balay wrote:
> Looks like a bug in superlu. [this bug doesn't exist in superlu_dist].
>
> I suspect we've always used superlu with superlu_dist on bgp - so
> didn't see this before. [symbols from -lsuperlu_dist must have been
> picked up by the linker (before superlu symbols) - and these symbols
> resolved without errors]
>
> The following fixes the issue.
>
> login2.surveyor:SuperLU_4.0/SRC>  diff -Nru slu_Cnames.h~ slu_Cnames.h
> --- slu_Cnames.h~               2009-07-05 00:55:49.000000000 -0500
> +++ slu_Cnames.h                2010-12-02 15:19:30.005247114 -0600
> @@ -251,6 +251,9 @@
>   #define izmax1_   IZMAX1
>   #define zlacon_   ZLACON
>
> +#define mc64id_         MC64ID
> +#define mc64ad_         MC64AD
> +
>   /* Fortran interface */
>   #define c_bridge_dgssv_ C_BRIDGE_DGSSV
>   #define c_fortran_sgssv_ C_FORTRAN_SGSSV
> @@ -350,6 +353,9 @@
>   #define izmax1_   izmax1
>   #define zlacon_   zlacon
>
> +#define mc64id_         mc64id
> +#define mc64ad_         mc64ad
> +
>   /* Fortran interface */
>   #define c_bridge_dgssv_ c_bridge_dgssv
>   #define c_fortran_sgssv_ c_fortran_sgssv
> login2.surveyor:SuperLU_4.0/SRC>
>
>
> I've respun the superlu download tarball with this fix..
>
>
> Note: Looks like Superlu_4.1 tarball has this bug..
>
> Satish
>
> On Thu, 2 Dec 2010, Satish Balay wrote:
>
>> I'll attempt a build and see how it goes..
>>
>> satish
>>
>> On Thu, 2 Dec 2010, Matthew Knepley wrote:
>>
>>> We always always always always need configure.log.
>>>
>>>      Matt
>>>
>>> On Thu, Dec 2, 2010 at 8:41 AM, John R. Cary<cary at txcorp.com>  wrote:
>>>
>>>> I am trying to link facets on a FEN of surveyor.alcf.anl.gov.  It ends
>>>> with the error,
>>>>
>>>> /gpfs/home/projects/facets/surveyor/contrib-xlc-9.0/petsc-3.1-p4-ser/lib/libsuperlu_4.0.a(dldperm.o):
>>>> In function `dldperm':
>>>> /gpfs/home/cary/facetspkgs/builds/petsc-3.1-p4/ser/externalpackages/SuperLU_4.0/SRC/dldperm.c:127:
>>>> undefined reference to `mc64id_'
>>>> /gpfs/home/cary/facetspkgs/builds/petsc-3.1-p4/ser/externalpackages/SuperLU_4.0/SRC/dldperm.c:134:
>>>> undefined reference to `mc64ad_'
>>>>
>>>> which indicates that the SuperLU compiled with PETSc did
>>>> not get the fortran underscoring flag correct (which should
>>>> be no underscore with xlf).  nm shows
>>>>
>>>> login1.surveyor$ nm
>>>> /gpfs/home/projects/facets/surveyor/contrib-xlc-9.0/petsc-3.1-p4-ser/lib/libsuperlu_4.0.a
>>>> | grep mc64
>>>>                  U mc64ad_
>>>>                  U mc64id_
>>>> mc64ad.o:
>>>> 0000000000000018 D mc64ad
>>>> 0000000000000030 D mc64bd
>>>> 0000000000000048 D mc64dd
>>>> 0000000000000060 D mc64ed
>>>> 0000000000000078 D mc64fd
>>>> 0000000000000000 D mc64id
>>>> 00000000000000c0 D mc64qd
>>>> 0000000000000090 D mc64rd
>>>> 00000000000000a8 D mc64sd
>>>> 00000000000000d8 D mc64ud
>>>> 00000000000000f0 D mc64wd
>>>>                  U mc64ad_
>>>>                  U mc64id_
>>>>
>>>> that the underscored symbol is being called, but the
>>>> underscore-free symbol is what was defined.
>>>>
>>>> My PETSc configure line was
>>>>
>>>> #!/bin/sh
>>>> /gpfs/home/cary/facetspkgs/builds-surveyor-xlc/facetspkgs/petsc-3.1-p4/ser/configure
>>>> \
>>>>   --prefix=/gpfs/home/projects/facets/surveyor/contrib-xlc-9.0/petsc-3.1-p4-ser
>>>> \
>>>>   --with-mpi=0 \
>>>>   --with-debugging=0 \
>>>>   --with-x=0 \
>>>>   --with-cc='xlc_r' \
>>>>   --with-cxx='xlC_r' \
>>>>   --with-fc='xlf_r' \
>>>>   --COPTFLAGS='-O2 -g' \
>>>>   --download-superlu \
>>>>   --with-lapack-lib=/home/projects/facets/intrepid/contrib/lapack-ser/lib/liblapack.a
>>>> \
>>>>   --with-blas-lib=/home/projects/facets/intrepid/contrib/lapack-ser/lib/libblas.a
>>>> \
>>>>   PETSC_DIR=/gpfs/home/cary/facetspkgs/builds-surveyor-xlc/facetspkgs/petsc-3.1-p4/ser
>>>> \
>>>>   PETSC_ARCH=facets-ser \
>>>>   --CFLAGS='-q64 -qlanglvl=redefmac' \
>>>>   --CXXFLAGS='-q64 -qlanglvl=redefmac' \
>>>>   --FFLAGS='-q64 -qextname=flush' \
>>>>   --with-shared=1
>>>>
>>>> so I think that PETSc had enough info to figure out the underscoring.
>>>> Perhaps this is a bug.
>>>>
>>>> But regardless, is there a workaround?
>>>>
>>>> Thx....John
>>>>
>>>
>>>
>>>
>>




More information about the petsc-dev mailing list