Skip to content

Installation issue: pexsi +fortran and with openmp in dependencies #18578

@payerle

Description

@payerle

Steps to reproduce the issue

spack install [email protected]%[email protected] +fortran ^[email protected]%[email protected]~int64+openmp+shared

is failing with the error

59 (/software/spack-software/2020.05.14/linux-rhel8-ivybridge/gcc-8.4.0/openmpi-3.1.5-e2ui4ckp7p2bs272tcu2wbbqn
rye7kdl/bin/mpif90 -o f_driver_ksdft_linux f_driver_ksdft.o /tmp/spackswinst/spack-stage/spack-stage-pexsi
-0.10.2-dqqtnfp2u6vuwf3636bjykh3363sictk/spack-src/src/libpexsi_linux.a /software/spack-software/2020.05.14/
linux-rhel8-ivybridge/gcc-8.4.0/superlu-dist-5.3.0-z5awrqmwa27gvmf5pcmyi74kwoprkooa/lib/libsuperlu_dist.a -L
/software/spack-software/2020.05.14/linux-rhel8-ivybridge/gcc-8.4.0/parmetis-4.0.3-4uuqa567kah2qlyqhltd5gla5
xv6fq6p/libparmetis -lparmetis -L/software/spack-software/2020.05.14/linux-rhel8-ivybridge/gcc-8.4.0/metis-5
.1.0-ltvqgzyk6sxoi5sor4qtioclhmvvcizj/lib -lmetis /software/spack-software/2020.05.14/linux-rhel8-ivybridge/
gcc-8.4.0/openblas-0.3.9-txqoq5uvoeovialc6oyl5b5phgt7fj2a/lib/libopenblas.so /software/spack-software/2020.0
5.14/linux-rhel8-ivybridge/gcc-8.4.0/openblas-0.3.9-txqoq5uvoeovialc6oyl5b5phgt7fj2a/lib/libopenblas.so /so
ftware/spack-software/2020.05.14/linux-rhel8-ivybridge/gcc-8.4.0/openmpi-3.1.5-e2ui4ckp7p2bs272tcu2wbbqnrye7
kdl/lib/libmpi_cxx.so /software/spack-software/2020.05.14/linux-rhel8-ivybridge/gcc-8.4.0/openmpi-3.1.5-e2ui
4ckp7p2bs272tcu2wbbqnrye7kdl/lib/libmpi.so -lstdc++ )
>> 60 /usr/bin/ld: /software/spack-software/2020.05.14/linux-rhel8-ivybridge/gcc-8.4.0/superlu-dist-5.3.0-z5awrqmw
a27gvmf5pcmyi74kwoprkooa/lib/libsuperlu_dist.a(pdgstrf.c.o): undefined reference to symbol 'omp_get_num_thre
ads@@@@OMP_1.0'
>> 61 //software/spack-software/2020.05.14/linux-rhel8-x86_64/gcc-rh8-8.3.1/gcc-8.4.0-vblibp6qsuo6rbkdn6femxo5kcfn
wvry/lib64/libgomp.so.1: error adding symbols: DSO missing from command line
>> 62 collect2: error: ld returned 1 exit status

I believe this is due to my superlu-dist having the +openmp option (and possibly also due to openblas having threads=openmp variant) but no -fopenmp flag being passed to gfortran.

I believe I can fix this (and will provide a patch to do so) by adding a -fopenmp flag to the gfortran command, but I am not certain if that is the correct way to resolve the issue. It seems that a better solution would be to have superlu-dist and openblas tell packages that depend on them that they should be using the -fopenmp flag, but I am not sure if that is possible (or how to do so).

Information on your system

spack debug report

  • Spack: 0.14.2
  • Python: 3.6.8
  • Platform: linux-rhel8-ivybridge

The full spec I am building is attached:
spack-pesci-spec.txt

Additional information

Additional information

No maintainers for document.

General information

  • [x ] I have run spack debug report and reported the version of Spack/Python/Platform
  • [x ] I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • [x ] I have uploaded the build log and environment files
  • [x ] I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions