Skip to content

Fortran: Nested submodule dependencies missing

I am encountering a race condition when building my project in parallel. Using CMake v3.7.1/3.9 and GCC 6.3 on OS X 10.12.5.

Description: Fortran project, recently added some submodule files. These generate .smod files during compilation. When building in parallel

make -j 6

I encounter:

Fatal Error: Can't open module file 'type_chidg@type_chidg_driver.smod' for reading at (1): No such file or directory

I do not encounter this issue in serial. Also, if I execute make -j 6 again right after getting the No such file error, then the build finishes successfully. Presumably because the file was actually created by one of the other processors, it just didn't happen in the right order or it didn't wait until the file was created.

Edited by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information