easybuild-framework icon indicating copy to clipboard operation
easybuild-framework copied to clipboard

Detect if there are .mod files for GCCcore installs

Open branfosj opened this issue 3 years ago • 6 comments

If compiling Fortran then we should not do that with GCCcore due to the incompatibility in the .mod files generated. It would be helpful if we searched the installed software and warn if any are found.

Possibly:

  • config option to turn on the check
  • config option to control if this is a warning or error
  • we will need ability to say that an easyconfig produces .mod files but that we are sure that they are not from Fortran or to allowing us to skip the check for an easyconfig

branfosj avatar Feb 01 '23 17:02 branfosj

From a check on my installed software:

  • Clang - has .mod files - in the flang directory. I suspect that these are compiled by clang/flang and not an issue
  • CPLEX - uses .mod for its own command files. So we will definitely need a 'this has non-fortran .mod files' flag.
  • kim-api - has .mod files in lib64/kim-api/mod. I expect that this should be moved to GCC / intel-compilers as required.

branfosj avatar Feb 17 '23 10:02 branfosj

I thought we could restrict the search only to directories being added to CPATH, if I understand things, that is how they are picked up by software...unfortunately I just found https://github.com/fortran-lang/fpm/issues/441#issue-858932111 which indicates that compilers behave differently when it comes to CPATH

ocaisa avatar Nov 22 '23 12:11 ocaisa

kim-api fixed in https://github.com/easybuilders/easybuild-easyconfigs/pull/19399, https://github.com/easybuilders/easybuild-easyconfigs/pull/19401, https://github.com/easybuilders/easybuild-easyconfigs/pull/19402, https://github.com/easybuilders/easybuild-easyconfigs/pull/19403, https://github.com/easybuilders/easybuild-easyconfigs/pull/19404, and https://github.com/easybuilders/easybuild-easyconfigs/pull/19405

branfosj avatar Dec 12 '23 13:12 branfosj

On generoso using

find */*GCCcore* -name *.mod > modfiles
cat modfiles | cut -d"/" -f7,8 | uniq

Compilers (AOCC/AOMP/Clang)

AOCC/2.3.0-GCCcore-10.2.0
AOCC/2.3.0-GCCcore-9.3.0
AOCC/3.0.0-GCCcore-10.2.0
AOCC/3.0.0-GCCcore-10.3.0
AOCC/3.1.0-GCCcore-10.2.0
AOCC/3.1.0-GCCcore-10.3.0
AOCC/3.1.0-GCCcore-11.2.0
AOCC/3.2.0-GCCcore-11.3.0
AOCC/4.0.0-GCCcore-11.3.0
AOCC/4.0.0-GCCcore-12.2.0
AOCC/4.0.0-GCCcore-12.3.0
AOMP/13.0-2-GCCcore-10.2.0
Clang/15.0.5-GCCcore-11.3.0
Clang/16.0.4-GCCcore-12.2.0
Clang/16.0.6-GCCcore-12.3.0

In PR14840

FACE/1.1.1-GCCcore-10.3.0
forbear/1.2.0-GCCcore-10.3.0

In PR15837

Fortran-YAML/20210420-GCCcore-11.2.0

Not Fortran module file

GeneMark-ET/4.65-GCCcore-10.2.0
GeneMark-ET/4.71-GCCcore-11.2.0
GeneMark-ET/4.71-GCCcore-11.3.0

Fixed in https://github.com/easybuilders/easybuild-easyconfigs/pull/17221

HDF5/1.10.5-GCCcore-8.3.0-serial
HDF5/1.12.2-GCCcore-11.3.0-serial
HDF5/1.13.1-GCCcore-11.3.0-serial

Fixed, as per the previous comment

kim-api/2.2.1-GCCcore-10.2.0
kim-api/2.2.1-GCCcore-10.3.0
kim-api/2.3.0-GCCcore-11.2.0
kim-api/2.3.0-GCCcore-11.3.0
kim-api/2.3.0-GCCcore-12.2.0
kim-api/2.3.0-GCCcore-12.3.0

Fixed in https://github.com/easybuilders/easybuild-easyconfigs/pull/19283

json-fortran/8.3.0-GCCcore-11.2.0
json-fortran/8.3.0-GCCcore-11.3.0
json-fortran/8.3.0-GCCcore-12.2.0

In PR16721

HEALPix/3.82-GCCcore-11.2.0

Fixed in previous PRs

mctc-lib/0.3.1-GCCcore-11.2.0
mctc-lib/0.3.1-GCCcore-11.3.0
mctc-lib/0.3.1-GCCcore-12.2.0
mstore/0.2.0-GCCcore-11.3.0
mstore/0.2.0-GCCcore-12.2.0

Hmm..

Python/3.9.5-GCCcore-10.3.0

File is in the tests

Python/3.9.5-GCCcore-10.3.0/lib/python3.9/site-packages/numpy/f2py/tests/src/module_data/mod.mod

But the wider question here is why that Python has numpy in it at all.

branfosj avatar Dec 12 '23 15:12 branfosj

Keeping this open since we need to update a couple of easyconfigs to weed out false positives now that https://github.com/easybuilders/easybuild-framework/pull/4389 is merged...

boegel avatar Jan 04 '24 14:01 boegel

Keeping this open since we need to update a couple of easyconfigs to weed out false positives now that #4389 is merged...

  • Clang, AOCC, AOMP, and CPLEX: https://github.com/easybuilders/easybuild-easyblocks/pull/3067
  • GeneMark-ET: https://github.com/easybuilders/easybuild-easyconfigs/pull/19500

Are you able to scan your installs to see if there are anyother false postives?

branfosj avatar Jan 05 '24 09:01 branfosj

If there remains items left to do here then we'll catch them during regression testing for the release and fix them then.

branfosj avatar Apr 17 '24 12:04 branfosj