Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@pwolfram
Copy link
Contributor

@pwolfram pwolfram commented Jun 3, 2020

This generalizes library searches to include both lib and lib64 for the netCDF and parallel-netCDF libraries where lib64 takes precedence. This is needed to ensure proper compilation when using the PIO2 library.

@pwolfram
Copy link
Contributor Author

pwolfram commented Jun 3, 2020

Note, sets "USE_PIO2=true" for this case as target option.

cc @xylar

@vanroekel
Copy link
Contributor

@pwolfram it seems worrisome to have only one configuration with USE_PIO2=true, it may cause unexpected issues for other users. We should make sure the broader team is on board with that change.

@vanroekel
Copy link
Contributor

looking closer it seems you are adding a new configuration right? Then I'm fine with the PIO2 change. Disregard the previous comment

@pwolfram
Copy link
Contributor Author

pwolfram commented Jun 3, 2020

Yes, @vanroekel, only specifying it for that specific build, not general for everyone.

@pwolfram pwolfram requested a review from vanroekel June 3, 2020 20:36
@pwolfram
Copy link
Contributor Author

pwolfram commented Jun 3, 2020

ps @vanroekel , please leave a review.

@xylar xylar requested review from matthewhoffman and mgduda June 3, 2020 20:37
@xylar xylar added the Framework label Jun 3, 2020
@vanroekel
Copy link
Contributor

sure @pwolfram will test this stack in the advection convergence test case and chime in after

@mgduda
Copy link
Contributor

mgduda commented Jun 3, 2020

The new intel-mpi target appears identical to the existing ifort target in all but two respects:

  1. The names of the MPI compiler wrappers are Intel-specific in the former; and
  2. the USE_PIO2 option is hard-wired to true in the former.

Regarding the hard-wiring of USE_PIO2=true, I don't really like the idea of having any target hard-wire any of the options listed in the Makefile, as it defeats the purpose of options and makes the target less general than it needs to be. It also doesn't seem that difficult to ask users to specify USE_PIO2=true when compiling on a particular machine; we have decent checks in the Makefile that should even tell users if they need to add the USE_PIO2=true option.

Regarding the Intel-specific compiler wrappers, my general concern is that we're setting a precedent that will support the proliferation of build targets to support every possible variation in build environment. I'm open to arguments in favor of the intel-mpi target, but it's probably worth asking whether the modules on grizzly could be set up to let mpif90 be a symlink or alias for mpiifort, and similarly for mpicc and mpiicc? Another option to consider is whether the Intel MPI implementation provides a Fortran wrapper named mpifort (which, I understand, is the more modern version of mpif90), and whether we could simply update the existing ifort target to use mpifort rather than mpif90?

@vanroekel
Copy link
Contributor

@pwolfram note that following the comment from @mgduda I tried building on grizzly with your stack and with

make ifort CORE=ocean USE_PIO2=true

This did fail. However, if I did

export I_MPI_F90=ifort

first then the model built fine without the new configuration. I would suggest we remove intel-mpi and just add the export line to our individual scripts to load modules on grizzly.

@vanroekel
Copy link
Contributor

note the solution for building was found here -- https://stackoverflow.com/questions/32335519/gfortran-is-called-instead-of-mpif90

@pwolfram
Copy link
Contributor Author

pwolfram commented Jun 4, 2020

The general version of it from https://software.intel.com/en-us/forums/intel-clusters-and-hpc-technology/topic/288354 is

Note that if you want to use mpif90/mpicc/etc (eg for existing configure scripts/Makefiles, etc) with the Intel compilers, one need only modify environment variables to point to the appropriate compilers: eg,
export I_MPI_CC=icc
 export I_MPI_CXX=icpc
 export I_MPI_F77=ifort
 export I_MPI_F90=ifort
for bash-type shells, or
setenv I_MPI_CC icc
setenv I_MPI_CXX icpc
setenv I_MPI_F77 ifort
setenv I_MPI_F90 ifort
for csh-type shells.

@pwolfram pwolfram force-pushed the updates_make_intel_stack branch 2 times, most recently from a4c6a7f to 02bd597 Compare June 4, 2020 21:22
@pwolfram
Copy link
Contributor Author

pwolfram commented Jun 4, 2020

In sum, consensus is I should remove the intel-mpi target (done). I've tested this works by using these load-up settings on grizzly:

module purge 
# assumes python2, so this doesn't work                                                                                                                         
#source /usr/projects/climate/SHARED_CLIMATE/anaconda_envs/load_latest_compass.sh                                                      
module use /usr/projects/climate/SHARED_CLIMATE/modulefiles/all/                                                                      
module load friendly-testing                                                                                                          
module load intel/19.0.4 intel-mpi/2019.4 hdf5-parallel/1.8.16 pnetcdf/1.11.2 netcdf-h5parallel/4.7.3 mkl/2019.0.4 scorpio/pio2/1.10.1
export I_MPI_CC=icc                                                                                                                   
export I_MPI_CXX=icpc                                                                                                                 
export I_MPI_F77=ifort                                                                                                                
export I_MPI_F90=ifort                                                                                                                

and build with

make ifort CORE=ocean USE_PIO2=true

@pwolfram pwolfram changed the title Adds support for full intel stack on grizzly Adds support for lib vs lib64 (and associated intel stack instructions) Jun 4, 2020
Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

@pwolfram, thanks for this work! I cherry-picked this commit and tested the nightly and land-ice regression suites with it. I also verified with ldd that the expected netcdf, netcdff and pnetcdf libraries were being used (which was, indeed, not the base for ocean/develop).

I look forward to finally switching over to PIO2 because of this work!

I would recommend two changes:

  1. Maybe edit the commit message so the title is more similar to the title of the PR.
  2. Please also update the PR description to reflect the removal of intel-mpi from the Makefile.

@pwolfram pwolfram force-pushed the updates_make_intel_stack branch from 02bd597 to 07ff9fe Compare June 9, 2020 21:46
@pwolfram
Copy link
Contributor Author

pwolfram commented Jun 9, 2020

Thanks @xylar! Everyone, changes made and PR ready to move forward with other review acceptances.

Copy link
Contributor

@mark-petersen mark-petersen left a comment

Choose a reason for hiding this comment

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

@pwolfram thank you for this. I tested on grizzly with gnu, intel17, and intel19 stacks, and all compile and complete nightly regression suite. This is a great help!

@mark-petersen
Copy link
Contributor

@mgduda, any further comments? The PR now only points to lib or lib64, whichever is available.

@matthewhoffman any comments?

Copy link
Contributor

@mgduda mgduda left a comment

Choose a reason for hiding this comment

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

In my opinion, it would be good to remove the discussion of the "grizzly stack" from the commit message and from the first comment on the PR, which we use for the merge commit message by convention. It seems unlikely that anyone outside of LANL will know what "grizzly" refers to, let alone be able to load the modules mentioned in that part of the message.

It's important to bear in mind that the MPAS component models have a substantial user base outside of DoE, and we should try to ensure that our commit messages will be meaningful to that larger community.

What I think the commit/merge message should focus on is the extension of the library search paths for the netCDF and parallel-netCDF libraries from just lib to lib or lib64.

The branch name updates_make_intel_stack isn't really appropriate anymore for this PR; but since GitHub doesn't allow for changes to the branch in a PR, leaving the creation of a new PR as the only alternative, I won't insist on a change there.

@pwolfram pwolfram force-pushed the updates_make_intel_stack branch from 07ff9fe to f069d32 Compare June 11, 2020 20:51
@pwolfram
Copy link
Contributor Author

pwolfram commented Jun 11, 2020

@mgduda, removed

echo "loading modules or grizzly"
module purge 
# assumes python2, so this doesn't work                                                                                                                         
#source /usr/projects/climate/SHARED_CLIMATE/anaconda_envs/load_latest_compass.sh                                                      
module use /usr/projects/climate/SHARED_CLIMATE/modulefiles/all/                                                                      
module load friendly-testing                                                                                                          
module load intel/19.0.4 intel-mpi/2019.4 hdf5-parallel/1.8.16 pnetcdf/1.11.2 netcdf-h5parallel/4.7.3 mkl/2019.0.4 scorpio/pio2/1.10.1
export I_MPI_CC=icc                                                                                                                   
export I_MPI_CXX=icpc                                                                                                                 
export I_MPI_F77=ifort                                                                                                                
export I_MPI_F90=ifort 

to build with

make ifort CORE=ocean USE_PIO2=true

from PR descriptions and commit messages as requested.

@pwolfram pwolfram changed the title Adds support for lib vs lib64 (and associated intel stack instructions) Adds support for lib vs lib64 Jun 11, 2020
@mgduda
Copy link
Contributor

mgduda commented Jun 11, 2020

@pwolfram Thanks for the updates to the PR description. It's not clear to me how the changes are related to PIO2, which is specifically mentioned in the PR description. It looks to me like the changes affect the netCDF and parallel-netCDF libraries without regard to which version of PIO is used. Or is it that only PIO2 can use netCDF libraries in lib64? It might also make the PR description more complete to mention that the lib versus lib64 affects just the netCDF and parallel-netCDF libraries, and to point out which of lib or lib64 will take precedence if both were to somehow be found. Of course, most people would have no trouble figuring this out by looking at the code diffs, but it seems not a bad practice to be thorough in descriptions of code changes, especially in terms of the why (the what is usually apparent from the diffs, but the motivation isn't always so clear).

This generalizes library searches to include both `lib` and `lib64` for
the `netCDF` and `parallel-netCDF` libraries where `lib64` takes
precedence.  This is needed to ensure proper compilation when using the
`PIO2` library.
@pwolfram pwolfram force-pushed the updates_make_intel_stack branch from f069d32 to e1fc941 Compare June 15, 2020 14:17
@pwolfram
Copy link
Contributor Author

Thanks @mgduda, please see updated descriptions following your feedback.

@mgduda mgduda self-requested a review June 16, 2020 00:43
Copy link
Contributor

@mgduda mgduda left a comment

Choose a reason for hiding this comment

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

@pwolfram Thanks very much for the updates to the commit/merge message! This looks good to me.

@mark-petersen mark-petersen self-assigned this Jun 16, 2020
@mark-petersen mark-petersen removed the request for review from matthewhoffman June 16, 2020 15:49
@mark-petersen mark-petersen merged commit 0f36b10 into MPAS-Dev:develop Jun 16, 2020
@mark-petersen
Copy link
Contributor

@pwolfram thanks for your work on this.

@pwolfram pwolfram deleted the updates_make_intel_stack branch June 26, 2020 15:38
jonbob added a commit to E3SM-Project/E3SM that referenced this pull request Jul 27, 2020
#3737)

Update MPAS framework

This PR brings in a new mpas-source submodule with updates to the mpas framework
itself, plus changes to the cores supporting the framework update. Some changes
are made to the atmosphere core, even though it is not used by E3SM, in order to
maintain consistency with the framework. This update includes the following
individual branches and PRs, many of which are additions to the makefiles for
summit, or optional libraries:
* az/azamat/mpas-cmake/mpas-tool-dir  (MPAS-Dev/MPAS-Model#629)
* init_atmosphere/kd_tree_ties  (MPAS-Dev/MPAS-Model#630)
* mark-petersen/framework/add_FillValue  (MPAS-Dev/MPAS-Model#616)
* mark-petersen/framework/add_lapack_option  (MPAS-Dev/MPAS-Model#613)
* amametjanov/framework/nullify-field-pointers  (MPAS-Dev/MPAS-Model#578)
* framework/makefile_e3sm  (MPAS-Dev/MPAS-Model#603)
* xylar/framework/make_shell_bash  (MPAS-Dev/MPAS-Model#594)
* registry/missing_value  (MPAS-Dev/MPAS-Model#562)
* pwolfram/updates_make_intel_stack  (MPAS-Dev/MPAS-Model#592)
* azamat/framework/pgi-cpr-omp-workaround  (MPAS-Dev/MPAS-Model#449)
* az/framework/e3sm-cmake-qnosmp-typo  (MPAS-Dev/MPAS-Model#579)
* xylar/compass/add_prerequisite_tag
* atmosphere/fix_timekeeping_imports (MPAS-Dev/MPAS-Model#582)
* xylar/fix_docs_ci  (MPAS-Dev/MPAS-Model#575)
* xylar/add_compass_docs  (MPAS-Dev/MPAS-Model#472)
* philipwjones/framework/summitmake  (MPAS-Dev/MPAS-Model#536)
* atmosphere/atm_core_cleanup  (MPAS-Dev/MPAS-Model#548)
* init_atmosphere/parse_geoindex  (MPAS-Dev/MPAS-Model#459)
* xylar/compass/add_copy_file  (MPAS-Dev/MPAS-Model#467)
* init_atmosphere/kd_tree  (MPAS-Dev/MPAS-Model#438)
* init_atmosphere/mpas_stack  (MPAS-Dev/MPAS-Model#426)
* operators/add_mpas_in_cell  (MPAS-Dev/MPAS-Model#400)

Fixes #3396
Fixes #3236

[BFB]
jonbob added a commit to E3SM-Project/E3SM that referenced this pull request Jul 29, 2020
Update MPAS framework

This PR brings in a new mpas-source submodule with updates to the mpas framework
itself, plus changes to the cores supporting the framework update. Some changes
are made to the atmosphere core, even though it is not used by E3SM, in order to
maintain consistency with the framework. This update includes the following
individual branches and PRs, many of which are additions to the makefiles for
summit, or optional libraries:
* az/azamat/mpas-cmake/mpas-tool-dir  (MPAS-Dev/MPAS-Model#629)
* init_atmosphere/kd_tree_ties  (MPAS-Dev/MPAS-Model#630)
* mark-petersen/framework/add_FillValue  (MPAS-Dev/MPAS-Model#616)
* mark-petersen/framework/add_lapack_option  (MPAS-Dev/MPAS-Model#613)
* amametjanov/framework/nullify-field-pointers  (MPAS-Dev/MPAS-Model#578)
* framework/makefile_e3sm  (MPAS-Dev/MPAS-Model#603)
* xylar/framework/make_shell_bash  (MPAS-Dev/MPAS-Model#594)
* registry/missing_value  (MPAS-Dev/MPAS-Model#562)
* pwolfram/updates_make_intel_stack  (MPAS-Dev/MPAS-Model#592)
* azamat/framework/pgi-cpr-omp-workaround  (MPAS-Dev/MPAS-Model#449)
* az/framework/e3sm-cmake-qnosmp-typo  (MPAS-Dev/MPAS-Model#579)
* xylar/compass/add_prerequisite_tag
* atmosphere/fix_timekeeping_imports (MPAS-Dev/MPAS-Model#582)
* xylar/fix_docs_ci  (MPAS-Dev/MPAS-Model#575)
* xylar/add_compass_docs  (MPAS-Dev/MPAS-Model#472)
* philipwjones/framework/summitmake  (MPAS-Dev/MPAS-Model#536)
* atmosphere/atm_core_cleanup  (MPAS-Dev/MPAS-Model#548)
* init_atmosphere/parse_geoindex  (MPAS-Dev/MPAS-Model#459)
* xylar/compass/add_copy_file  (MPAS-Dev/MPAS-Model#467)
* init_atmosphere/kd_tree  (MPAS-Dev/MPAS-Model#438)
* init_atmosphere/mpas_stack  (MPAS-Dev/MPAS-Model#426)
* operators/add_mpas_in_cell  (MPAS-Dev/MPAS-Model#400)

Fixes #3396
Fixes #3236

[BFB]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.