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

Include documentation for building/running SRW App on Mac #240

Merged
merged 114 commits into from
May 26, 2022
Merged

Include documentation for building/running SRW App on Mac #240

merged 114 commits into from
May 26, 2022

Conversation

gspetro-NOAA
Copy link
Collaborator

@gspetro-NOAA gspetro-NOAA commented Apr 20, 2022

DESCRIPTION OF CHANGES:

  • Updated hpc-stack submodule to reflect new instructions for building the hpc-stack on MacOS
  • Added section to BuildRunSRW.rst on configuring the build on MacOS

TESTS CONDUCTED:

None required. @natalie-perlin and @laurenfrederick have built the hpc-stack on MacOS using the submodule info; Natalie has build the SRW on MacOS following the updated procedure in BuildRunSRW.rst.

DEPENDENCIES:

None.

DOCUMENTATION:

If this PR is contributing new capabilities that need to be documented, please also include updates to the RST files (docs/UsersGuide/source) as supporting material.

ISSUE:

Resolves Issue #222 .

CONTRIBUTORS (optional):

@natalie-perlin @laurenfrederick

Co-authored-by: Will Mayfield <[email protected]>

# This path should point to your SRW Application directory
setenv SRW "/Users/username/ufs-srweather-app"

Copy link
Collaborator

Choose a reason for hiding this comment

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

The syntax above and below is for the csh. Instructions for the MacOS followed use of bash shell, as is stated in the line 197 above! and the build_macos_gnu needs to use bash syntax to be consistent. The changes for the bash shell syntax to be made for the lines 204, 207, 214-216, 219-221, are shown after each corresponding line.

Copy link
Collaborator

Choose a reason for hiding this comment

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

One of the motivation for using modulefiles is to set the environment irrespective of the login shell used (bash or tcsh).

  module load build_macos_gnu

should work for bash even though it is written in "csh-like" syntax. The only place where login shell dependent code is needed is when loading Lmod itself i.e.

  source etc/lmod-setup.sh macos
             or
  source etc/lmod-setup.csh macos

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@natalie-perlin This code is already in the modulefile, which is written in csh-like syntax. In reality, the user is only changing the path. If we change this to bash, we have to redo the entire modulefile, which I don't think is worth it since, as @danielabdi-noaa pointed out, the modulefile should work regardless of the user's shell.

.. code-block:: console

# This path should point to your HPCstack installation directory
setenv HPCstack "/Users/username/hpc-stack/install"
Copy link
Collaborator

Choose a reason for hiding this comment

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

export HPCstack=/Users/username/hpc-stack/install

Copy link
Collaborator

Choose a reason for hiding this comment

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

TCL modulefiles use setenv instead of export so I think it is fine as it is.

setenv HPCstack "/Users/username/hpc-stack/install"

# This path should point to your SRW Application directory
setenv SRW "/Users/username/ufs-srweather-app"
Copy link
Collaborator

Choose a reason for hiding this comment

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

export SRW=/Users/username/ufs-srweather-app

# Option 1 compiler paths:
setenv CC "/opt/homebrew/bin/gcc"
setenv FC "/opt/homebrew/bin/gfortran"
setenv CXX "/opt/homebrew/bin/g++"
Copy link
Collaborator

Choose a reason for hiding this comment

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

export CC=/opt/homebrew/bin/gcc
export CXX=/opt/homebrew/bin/g++
export FC=/opt/homebrew/bin/gfortran

# Option 2 compiler paths:
#setenv CC "/usr/local/bin/gcc"
#setenv FC "/usr/local/bin/gfortran"
#setenv CXX "/usr/local/bin/g++"
Copy link
Collaborator

Choose a reason for hiding this comment

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

#export CC=/usr/local/bin/gcc
#export CXX=/usr/local/bin/g++
#export FC=/usr/local/bin/gfortran

#setenv CC "/usr/local/bin/gcc"
#setenv FC "/usr/local/bin/gfortran"
#setenv CXX "/usr/local/bin/g++"

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, the following were set for the in build_macos_gnu after lines 222 (again, for bash shell syntax):

export MPI_CC=mpicc
export MPI_CXX=mpicxx
export MPI_FC=mpif90

export CMAKE_C_COMPILER=${MPI_CC}
export CMAKE_CXX_COMPILER=${MPI_CXX}
export CMAKE_Fortran_COMPILER=${MPI_FC}
export CMAKE_Platform=macos.gnu
export CMAKE_Fortran_COMPILER_ID="GNU"
export LDFLAGS="-L${MPI_ROOT}/lib"
export FFLAGS="-DNO_QUAD_PRECISION -fallow-argument-mismatch "

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@natalie-perlin All of this is in the modulefile already, so I did not type it out in the instructions because the user should not have to adjust the code in any way. As mentioned above, it doesn't need to get changed to bash syntax because (if I understood @danielabdi-noaa correctly), the modulefile will work regardless of the user's shell.

.. code-block:: console

# This path should point to your HPCstack installation directory
setenv HPCstack "/Users/username/hpc-stack/install"
Copy link
Collaborator

Choose a reason for hiding this comment

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

TCL modulefiles use setenv instead of export so I think it is fine as it is.

docs/UsersGuide/source/BuildRunSRW.rst Outdated Show resolved Hide resolved
@natalie-perlin natalie-perlin merged commit 3a2fd2b into ufs-community:develop May 26, 2022
This was referenced May 27, 2022
mark-a-potts added a commit that referenced this pull request Jun 12, 2022
* Fix artifact creation for branches with / in name (#275)

The slash in branch names such as release/.* and feature/.* is
interpreted as a directory separator. This change replaces the "/"
character with a "_".

* Include documentation for building/running SRW App on Mac (#240)

* updated docs

* added git submodule

* fix formatting

* added new submodule commits

* fixed ref links

* finished Intro

* finish Components & Intro edits

* edited Rocoto workflow section of Quickstart

* added minor hpc submodule commits

* Updates to Rocoto Workflow in Quick Start

* add to HPC-stack intro

* submodule updates

* added submodule docs edits

* hpc-stack updates & formatting fixes

* hpc-stack intro edits

* bibtex attempted fix

* add hpc-stack module edits

* update sphinxcontrib version

* add .readthedocs.yaml file

* update .readthedocs.yaml file

* update .readthedocs.yaml file

* update conf.py

* updates .readthedocs.yaml with submodules

* updates .readthedocs.yaml with submodules

* submodule updates

* submodule updates

* minor Intro edits

* minor Intro edits

* minor Intro edits

* submodule updates

* fixed typos in QS

* QS updates

* QS updates

* QS updates

* updates to InputOutput and QS

* fix I/O doc typos

* pull updates to hpc-stack docs

* pull updates to hpc-stack docs

* fix table wrapping

* updates to QS for cloud

* fix QS export statements

* fix QS export statements

* QS edits on bind, config

* add bullet points to notes

* running without rocoto

* add HPC-Stack submodule w/docs

* split QS into container/non-container approaches

* added filepath changes for running in container on Orion, et al.

* edits to overview and container QS

* moved CodeReposAndDirs.rst info to the Introduction & deleted file

* continued edits to SRWAppOverview

* combine overview w/non-container docs

* finish merging non-container guide & SRWOverview, rename/remove files, update FAQ

* minor edits for Intro & QS

* updates to BuildRun doc through 3.8.1

* edits to Build/Run and Components

* remove .gitignore

* fix Ch 3 title, 4 supported platform levels note

* fix typos, add term links

* other minor fixes/suggestions implemented

* updated Intro based on feedback; changed SRW to SRW App throughout

* update comment to Intro citation

* add user-defined vertical levels to future work

* Add instructions for srw_common module load

* fix typo

* update Intro & BuildRunSRW based on Mark's feedback

* minor intro updates

* 1st round of jwolff's edits

* 2nd round of jwolff updates

* update QS intro

* fix minor physics details

* update citation and physics suite name

* add compute node allocation info to QS

* add authoritative hpc-stack docs to Intro

* create MacOS install/build instructions

* add MacOS Build/Run instructions

* fix MacOS Build/Run details

* add MacOS info directly to Build/Run SRW chapter

* minor details

* minor edits

* update Include-HPCInstall with mac installation docs

* add note re: Terminal.app & bash shell in MacOS section

* remove MacInstall file-contents added to BuildRunSRW

* update hpc-stack submodule to include mac installation info

* add MacOS config details

* add MacOS config & run details

* minor MacOS note

* mention need to verify software library version #'s

* update hpc-stack-mod

* align MacDetails section with PR #238 info

* remove gsed & alter related commands

* update hpc-stack submodule

* typos

* switch from env to module load

Co-authored-by: Will Mayfield <[email protected]>

* Update BuildRunSRW.rst

* update hpc-stack module docs & MacOS config.sh

* update machine file instructions

* updates to BuildRun chapter

* fix typo

Co-authored-by: gspetro <[email protected]>
Co-authored-by: Will Mayfield <[email protected]>

* Update documentation for CSV file containing WE2E test info (#278)

* Edits to documentation to match latest in code.

* Edits to documentation to match latest in code.

* Minor changes to documentation.

* Port SRW App to WCOSS2 (#270)

* port to wcoss2

* update scripts

* ensure platform name from variance

* update scripts

* remove wcoss2 from lmod-setup

* Fix --ccpp option in devbuild.sh (#280)

* fix ccpp issue

* update script

* Print usage if machine name is not passed to `lmod-setup.sh/csh`. (#262)

* Print usage() message if machine name is not passed.

* Bug fix with macos modulefiles.

* Back to original hashes (#287)

* Updated the Introduction, build for MacOS (#281)

* Updated the Introduction, build for MacOS

* Update Introduction.rst

Some comments removed

* Update Introduction.rst

Updated data storage requirements for the SRW

* Update documentation for python plotting scripts (#289)

## DESCRIPTION OF CHANGES: 
This PR updates the RST documentation files to accompany changes in PR #[783](ufs-community/regional_workflow#783) in `regional_workflow`.

## DEPENDENCIES:
PR #[783](ufs-community/regional_workflow#783) in `regional_workflow`.

## ISSUE (optional): 
Partially resolves issue #[781](ufs-community/regional_workflow#781) (still need to introduce tests in `regional_workflow` that run the plotting scripts).

## CONTRIBUTORS: 
@mark-a-potts

* Updating for testing with updated ufs weather model

* added version to wflow for jet

* switched to epic repo for testing

* Updates to modules for cheyenne

* updated module path

* changed hash to branch for testing

* updated to use ufs-community version of WM

* Pointing to PR-branch of regional_workflow for testing

* Updating module files for cheyenne for testing

* Added png explicitly under gaea.

* Update build_cheyenne_intel

Corrected loading system modules (load intel/2022.1, mpt/2.25), updated package versions if newer modules are built.

* Updated pointer to model for testing

* fixed repos

* updated to point at my regional_workflow branch

* updated regional_workflow to release/public-v2

Co-authored-by: Jesse McFarland <[email protected]>
Co-authored-by: Gillian Petro <[email protected]>
Co-authored-by: gspetro <[email protected]>
Co-authored-by: Will Mayfield <[email protected]>
Co-authored-by: gsketefian <[email protected]>
Co-authored-by: Chan-Hoo.Jeon-NOAA <[email protected]>
Co-authored-by: danielabdi-noaa <[email protected]>
Co-authored-by: Natalie Perlin <[email protected]>
Co-authored-by: Mark Potts <[email protected]>
gspetro-NOAA added a commit that referenced this pull request Jun 21, 2022
* update hpc-stack module docs & MacOS config.sh

* update machine file instructions

* updates to BuildRun chapter

* fix typo

* merge changes from PR #240 to release-v2

* resolve conflicts w/PR #281

* I/O updates to wget commands

* Update documentation for CSV file containing WE2E test info (#278)

* Edits to documentation to match latest in code.

* Edits to documentation to match latest in code.

* Minor changes to documentation.

* update HPSS file names

* add links, remove comments

* add links, remove comments

* FAQ updates

* ContribGuide updates

* Rocoto ch updates

* update wflow gen image

* update LAM grid chapter

* update docs links

* update NC QS

* glossary updates

* add Stochastic Physics info

* format valid values

* edits for Config Params

* final Config Param updates

* Graphics edits

* remove WCOSS info

* Intro updates pt1

* Docs for Linux SRW build and run

* Remove WCOSS-specifics

* miscellaneous changes

* Intro & QS updates

* minor fixes

* I/O updates

* I/O updates

* update RW hash

* update file paths to NaturalEarth

* change ESFM docs version

* change ESFM docs version

* finish I/O updates

* update paths from develop to v2p0

* Update BuildRunSRW.rst

"wcoss_dell_p3" is a valid value

* Update ConfigWorkflow.rst

placed "WCOSS_DELL_P3" as a valid value

* updates to WE2E

* WE2E updates

* final WE2E updates

* update METplus support info

* update NC-QS Guide

* QS updates

* fix WE2E tables

* add WE2E test files

* WE2E test edits

* WE2E table updates

* QS & updates to config_defaults table in build/run

* QS modulefiles load

* fix typo

* update mac/linux section of build/run

* fix image

* fix image

* typo

* update CCPP link

* adjust Mac/Linux organization

* mark's edits pt1

* mac/linux reorg

* minor edits

Co-authored-by: gspetro <[email protected]>
Co-authored-by: Will Mayfield <[email protected]>
Co-authored-by: Natalie Perlin <[email protected]>
Co-authored-by: gsketefian <[email protected]>
Co-authored-by: Natalie Perlin <[email protected]>
SamuelTrahanNOAA pushed a commit to SamuelTrahanNOAA/ufs-srweather-app that referenced this pull request Sep 15, 2023
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.

6 participants