Skip to content

Intel compiler + MPI support, cleaned makefiles, template bash environment setup...#551

Merged
einola merged 6 commits intonansencenter:developfrom
brodeau:intel
Aug 12, 2021
Merged

Intel compiler + MPI support, cleaned makefiles, template bash environment setup...#551
einola merged 6 commits intonansencenter:developfrom
brodeau:intel

Conversation

@brodeau
Copy link
Copy Markdown
Collaborator

@brodeau brodeau commented Aug 10, 2021

Modifications / new stuff for this pull request

All Makefiles have been modified so they take the following variables from the user environment, they are not defined anymore in a hard-coded way as before...

List of environment variables that must be set for Makefiles to do their job:

  • NEXTSIMDIR
  • CXX
  • CC
  • FC
  • CFLAGS, minimal, ex: "-O3 -fPIC"; many other flags remain in the Makefiles, but not these!
  • CXXFLAGS, minimal, ex: "-O3 -pthread -fPIC -fopenmp"; many other flags remain in the Makefiles, but not these!
  • MPI_DIR, ex: "/usr" for OpenMPI on Linux
  • MPI_LIB_DIR, normally: =${MPI_DIR}/lib
  • MPI_INC_DIR, normally: =${MPI_DIR}/include
  • NETCDF_DIR
  • NETCDF_CXX_DIR, normally: =${NETCDF_DIR}
  • GMSH_DIR
  • BOOST_DIR
  • BOOST_INCDIR, normally: =${BOOST_DIR}/include/boost
  • BOOST_LIBDIR, normally: =${BOOST_DIR}/lib

To make it easy

Added two template bash scripts to be sourced to set these variables according to your machine/architecture:

  • env_compile_gnu_linux.bash for Gnu/GCC/OpenMPI on Linux
  • env_compile_intel_linux.bash for Intel compilers and Intel MPI on Linux

So that prior to using the make command, in the terminal:
. ./env_compile_gnu_linux.bash

/laurent

@brodeau brodeau requested a review from einola August 10, 2021 10:58
I needed to include the environment variables CXX etc in the Dockerfile
using the ENV command. With these changes the model now compiles in
Docker.
Copy link
Copy Markdown
Member

@einola einola left a comment

Choose a reason for hiding this comment

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

Minor changes to get Dockerfile working. Tested in docker too (one-winter run).

@einola einola merged commit 248126b into nansencenter:develop Aug 12, 2021
@einola einola deleted the intel branch August 12, 2021 15:30
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.

2 participants