Steps to reproduce the issue
compilers.yaml
compilers:
- compiler:
spec: gcc@11.2.0
paths:
cc: cc
cxx: CC
f77: ftn
fc: ftn # Fortran compiler specified here
flags: {}
operating_system: sles15
target: any
modules:
- PrgEnv-gnu
- gcc/11.2.0
environment: {}
extra_rpaths: []
spack install ascent +fortran
Building conduit by itself it seems like everything is fine. conduit +fortran all builds, no problem. Or so it seems until ascent +fortran tries to configure when all of the sudden it can't find the conduit.mod file.
I went digging around and finally found the culprit, the listed projects silently hide turning off fortran when it is requested, even if there is a valid fortran compiler available. Either self.compiler.fc is not set for some reason or SPACK_FC is not set in the hostconfig stage context reliably (it is in the spack-build-env.txt file for what it is worth). Just removing all of the f_compiler logic fixes this issue, but my sense around these projects is they have some reason for doing all of these things.
This will always fail to build whatever project downstream needs conduit +fortran but never fail to build a conduit +fortran. This is really not ideal, if a spec is specified the package should build to that spec or not build at all.
hostconfig:
perlmutter-ascent-host-config.cmake.txt
Information on your system
On Perlmutter
perlmutter-ascent-build-out.txt
perlmutter-ascent-build-env.txt
* **Spack:** 0.17.1-823-28565749ff
* **Python:** 3.6.13
* **Platform:** cray-sles15-zen3
* **Concretizer:** clingo
Additional information
My environment is setup using the spack-confg for perlmutter with some minor modifications around nvidia/cuda stuff which should affect this at all. I also added the gcc@11.2.0 compiler, it is now the default in the PrgEnv-gnu.
@cyrush
General information
Steps to reproduce the issue
compilers.yaml
spack install ascent +fortranBuilding conduit by itself it seems like everything is fine.
conduit +fortranall builds, no problem. Or so it seems untilascent +fortrantries to configure when all of the sudden it can't find the conduit.mod file.I went digging around and finally found the culprit, the listed projects silently hide turning off fortran when it is requested, even if there is a valid fortran compiler available. Either
self.compiler.fcis not set for some reason orSPACK_FCis not set in the hostconfig stage context reliably (it is in thespack-build-env.txtfile for what it is worth). Just removing all of the f_compiler logic fixes this issue, but my sense around these projects is they have some reason for doing all of these things.This will always fail to build whatever project downstream needs
conduit +fortranbut never fail to build aconduit +fortran. This is really not ideal, if a spec is specified the package should build to that spec or not build at all.hostconfig:
perlmutter-ascent-host-config.cmake.txt
Information on your system
On Perlmutter
perlmutter-ascent-build-out.txt
perlmutter-ascent-build-env.txt
Additional information
My environment is setup using the spack-confg for perlmutter with some minor modifications around nvidia/cuda stuff which should affect this at all. I also added the
gcc@11.2.0compiler, it is now the default in thePrgEnv-gnu.@cyrush
General information
spack debug reportand reported the version of Spack/Python/Platformspack maintainers <name-of-the-package>and @mentioned any maintainers