detect Fortran .mod files for installations using GCCcore toolchain#4389
Merged
boegel merged 8 commits intoeasybuilders:5.0.xfrom Jan 3, 2024
Merged
detect Fortran .mod files for installations using GCCcore toolchain#4389boegel merged 8 commits intoeasybuilders:5.0.xfrom
.mod files for installations using GCCcore toolchain#4389boegel merged 8 commits intoeasybuilders:5.0.xfrom
Conversation
boegel
requested changes
Nov 25, 2023
Member
Author
boegel
reviewed
Nov 26, 2023
|
|
||
| fail_msg = None | ||
| if mod_files: | ||
| fail_msg = ".mod files (%s) found in the installation." % ', '.join(mod_files) |
Member
There was a problem hiding this comment.
@branfosj Can we try to filter out false positives here?
I was thinking about checking the output of the file command, if that's available.
Not sure if that makes sense...
Member
Author
There was a problem hiding this comment.
I'm not sure what we would want to exclude by using file.
$ file 2.3.0-GCCcore-11.2.0/lib64/kim-api/mod/kim_unit_system_module.mod
2.3.0-GCCcore-11.2.0/lib64/kim-api/mod/kim_unit_system_module.mod: gzip compressed data, from Unix, original size 57651
$ file Clang/15.0.5-GCCcore-11.3.0/include/flang/omp_lib.mod
Clang/15.0.5-GCCcore-11.3.0/include/flang/omp_lib.mod: UTF-8 Unicode (with BOM) text
$ file json-fortran/8.3.0-GCCcore-12.2.0/include/json_value_module.mod
json-fortran/8.3.0-GCCcore-12.2.0/include/json_value_module.mod: gzip compressed data, from Unix, original size 201261
$ file CPLEX/20.10-GCCcore-10.2.0/opl/examples/opl/cplex_staticLex/staticlex3.mod
CPLEX/20.10-GCCcore-10.2.0/opl/examples/opl/cplex_staticLex/staticlex3.mod: ASCII text
Contributor
There was a problem hiding this comment.
I think it's always a gzipped file (at least with gfortran), so you could look for that. One could technically unpack it and look for the header
GFORTRAN module version ....
but limiting this to just *.mod and gzipped file should be pretty good.
Member
There was a problem hiding this comment.
As discussed, we can refine this later to try and weed out false positives without having to whitelist...
This was referenced Dec 6, 2023
Merged
boegel
approved these changes
Jan 3, 2024
.mod files for installations using GCCcore toolchain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cfr. #4203
Targeting the
5.0.xbranch so I can use**ingloband that is not available in Python 2.7.