Skip to content

Commit c1742a2

Browse files
committed
Fix parallel build race condition in Spack package
Fortran modules must be compiled sequentially to ensure m_thermochem.mod is generated before m_derived_types.fpp attempts to use it. This fixes the build error: Fatal Error: Cannot open module file 'm_thermochem.mod' for reading at (1): No such file or directory Setting parallel = False forces make -j1 to avoid race conditions.
1 parent 3167753 commit c1742a2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packaging/spack/package.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ class Mfc(CMakePackage):
7070
"+openmp", when="+openacc", msg="OpenACC and OpenMP GPU offload are mutually exclusive"
7171
)
7272

73+
# Disable parallel builds to avoid Fortran module dependency race conditions
74+
parallel = False
75+
7376
def cmake_args(self):
7477
args = [
7578
self.define_from_variant("MFC_MPI", "mpi"),

0 commit comments

Comments
 (0)