Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gnu compiler support #32

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

NaureenBharwaniNOAA
Copy link
Collaborator

Synopsis

Add GNU Compiler support for Hera and Jet.
Tested on Hera and Jet.

Type

  • Enhancement (adds new functionality)

Impact

  • This is a non-breaking change (existing functionality continues to work as expected)

Checklist

  • I have added myself and any co-authors to the PR's Assignees list.
  • I have reviewed the documentation and have made any updates necessitated by this change.

@NaureenBharwaniNOAA NaureenBharwaniNOAA self-assigned this Dec 9, 2024
build.sh Outdated
@@ -13,7 +13,7 @@ OPTIONS
(e.g. hera | jet | hercules)
-c, --compiler=COMPILER
compiler to use; default depends on platform
(e.g. intel | gnu | cray | gccgfortran)
(e.g. intel | gcc)
Copy link
Collaborator Author

@NaureenBharwaniNOAA NaureenBharwaniNOAA Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to the help message for the compiler. Currently only supporting intel and gcc. If we want users to call gccgfortran the build script names will need to be updated.

gcc's build target is gfortran for the MPAS-Model.

Comment on lines +84 to +86
else
echo "Unsupported compiler: ${COMPILER}"
exit 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If intel or gcc is not supplied for the compiler than an error message will appear to the user to set the correct settings, i.e.

PLATFORM(MACHINE)=hercules
COMPILER=gnu
ERROR: module file does not exist for platform/compiler
  MODULE_FILE=build_hercules_gnu
  PLATFORM=hercules
  COMPILER=gnu

Please make sure PLATFORM and COMPILER are set correctly
Usage: ./build.sh --platform=PLATFORM [OPTIONS]

OPTIONS
  -h, --help
      show this help guide
  -p, --platform=PLATFORM
      name of machine you are building on
      (e.g. hera | jet | hercules)
  -c, --compiler=COMPILER
      compiler to use; default depends on platform
      (e.g. intel | gcc)
....
....

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have it set so that someone could run with -c=gnu and have it run with the gfortran build

mpas:
execution:
batchargs:
partition: hera
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the partition is not included for hera, then it will pass the build process, but will break on the rocotorun ... command for the forecast task. Stating the partition: None

README.md Outdated
Comment on lines 26 to 29
Currently Hera and Jet are the only platforms with GNU Compiler support. To run the default build script with a specified compiler:

`./build.sh -p=<platform> -c=<compiler>`

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add content for GNU Compiler support. Let me know if this is something we want to add to main or it's best left out for now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line could potentially be combined with line 22 or rephrased. It sounds a little repetitive right now.

@NaureenBharwaniNOAA NaureenBharwaniNOAA marked this pull request as ready for review December 9, 2024 17:22
@NaureenBharwaniNOAA NaureenBharwaniNOAA changed the title Add gnu support Add gnu compiler support Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants