[petsc-users] SCALAPACK compilation error

Norihiro Watanabe norihiro.w at gmail.com
Thu Apr 14 03:05:15 CDT 2016


Hi Satish,

Many thanks for the tips. From the next time, I'll test with the
latest PETSc before asking you.

As a little feed back to you, I've tested the latest PETSc and
confirmed both "configure" command and compilation work fine. So my
problem has already been fixed in the newer version.


Best,
Nori


On Wed, Apr 13, 2016 at 5:14 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> Glad it worked.
>
> Generally we recommend upgrading to latest release of PETSc - as thats
> what we primarily support. And some of the issues such as this one
> might be fixed in it [so its best not to revisit such issues with
> older versions].  If not already fixed - we would look at fixing the
> issue in the latest version.
>
> Wrt your specific usage - we recommend using --download-fblaslapack [and
> not --download-f2cblaslapack=1] when you have a fortran compiler available
> [except when using quad precision build]
>
> It does mean you would have to put some effort updating your code to
> use the latest version. We do help with installation issues that you
> might encounter. Usually you can grab the 'reconfigure_PETSC_ARCH.py'
> script from the previous install and reuse it to build any new
> versions.  [yes there can be API changes with configure aswell - so
> there could be corner cases with this process]
>
> Satish
>
> On Wed, 13 Apr 2016, Norihiro Watanabe wrote:
>
>> Thank you, Satish! LIBS=-lgfortran worked for me. There is no critical
>> reason to keep using the old version. I'm just lazy to update it
>> because the PETSc interface sometimes changes (didn't check 3.6 yet)
>> and I need to change my program as well to support multiple PETSc
>> versions (we need to maintain multiple computers and cannot update
>> PETSc on every computer at once).
>>
>> Best,
>> Nori
>>
>>
>> On Wed, Apr 13, 2016 at 7:42 AM, Satish Balay <balay at mcs.anl.gov> wrote:
>> > Any perticular reason for using 3.5 instead of currently supported 3.6 releasE?
>> >
>> >
>> > If you have  system fortran blas installed - suggest using it
>> > [i.e don't specify any blas/lapack option]
>> >
>> > or use --download-fblaslapack [not --download-f2cblaslapack=1]
>> >
>> > or use LIBS=-lgfortran
>> >
>> > Satish
>> >
>> > On Wed, 13 Apr 2016, Norihiro Watanabe wrote:
>> >
>> >> Hi,
>> >>
>> >> I'm trying to compile PETSc v3.5.2 with "--download-scalapack". The
>> >> full command is
>> >>
>> >> ./configure PETSC_ARCH=gcc-release --download-f2cblaslapack=1
>> >> -with-debugging=0 --download-superlu_dist --download-hypre=1
>> >> --download-ml=1 --download-parmetis --download-metis --download-mumps
>> >> --download-suitesparse --download-scalapack --with-fc=mpif90
>> >> --with-cc=mpicc --with-cxx=mpicxx
>> >>
>> >> Unfortunately it fails because linking to gfortran library is missing
>> >> (see partial log below). Do you have any idea how to fix it? I found
>> >> "-lgfortran" is used in several other places in configure.log but not
>> >> for the below particular compilation. conf/scalapack also doesn't have
>> >> "-lgfortran".
>> >>
>> >>
>> >> Executing: mpicc  -o /tmp/petsc-THHgOH/config.libraries/conftest
>> >> -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas
>> >> -O /tmp/petsc-THHgOH/config.libraries/conftest.o
>> >> -Wl,-rpath,/home/localadmin/tools/petsc/petsc-3.5.2/gcc-release/lib64
>> >> -L/home/localadmin/tools/petsc/petsc-3.5.2/gcc-release/lib64
>> >> -lscalapack -Wl,-rpath,/home/localadmin/tools/petsc/petsc-3.5.2/gcc-release/lib
>> >> -L/home/localadmin/tools/petsc/petsc-3.5.2/gcc-release/lib -lf2clapack
>> >> -Wl,-rpath,/home/localadmin/tools/petsc/petsc-3.5.2/gcc-release/lib
>> >> -L/home/localadmin/tools/petsc/petsc-3.5.2/gcc-release/lib -lf2cblas
>> >> -lm -Wl,-rpath,/usr/lib/openmpi/lib -L/usr/lib/openmpi/lib
>> >> -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/4.8
>> >> -L/usr/lib/gcc/x86_64-linux-gnu/4.8
>> >> -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu
>> >> -Wl,-rpath,/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu
>> >> -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu
>> >> -Wl,-rpath,/home/localadmin/tools/petsc/petsc-3.5.2
>> >> -L/home/localadmin/tools/petsc/petsc-3.5.2
>> >> -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -ldl
>> >> -lmpi -lhwloc -lgcc_s -lpthread -ldl
>> >> Possible ERROR while running linker: exit code 256
>> >> stderr:
>> >> /home/localadmin/tools/petsc/petsc-3.5.2/gcc-release/lib/libscalapack.a(pxerbla.o):
>> >> In function `pxerbla_':
>> >> pxerbla.f:(.text+0x7d): undefined reference to `_gfortran_st_write'
>> >> pxerbla.f:(.text+0x8d): undefined reference to
>> >> `_gfortran_transfer_integer_write'
>> >> pxerbla.f:(.text+0x9d): undefined reference to
>> >> `_gfortran_transfer_integer_write'
>> >> pxerbla.f:(.text+0xab): undefined reference to
>> >> `_gfortran_transfer_character_write'
>> >> pxerbla.f:(.text+0xbb): undefined reference to
>> >> `_gfortran_transfer_integer_write'
>> >> pxerbla.f:(.text+0xc3): undefined reference to `_gfortran_st_write_done'
>> >> collect2: error: ld returned 1 exit status
>> >>
>> >>
>> >>
>> >> Thanks,
>> >> Nori
>> >>
>> >>
>> >
>>
>>
>>
>>
>



-- 
Norihiro Watanabe


More information about the petsc-users mailing list