Skip to content

Update install.sh to use FC=gfortran, CC=gcc, MPI_HOME=/path/to/mpi/if/specified/or/installed #269

@zbeekman

Description

@zbeekman

I think it might be wise to update the install.sh scripts to pass FC=gfortran, CC=gcc rather than mpif90 and mpicc etc. The most complicated part about this is that I need to do some testing and investigation of how to handle the logic surrounding MPI. I think that if install.sh either:

  1. Installs mpich as part of the build, or
  2. Receives a user flag setting the MPI location

Then it should automagically "just do the right thing" ™️ IF we also set MPI_HOME environment variable. If the script doesn't do the install of MPICH, and the user (or script elsewhere) doesn't explicitly specify an MPI to use then CMakes FindMPI should pick it up from either:

  1. The users path via it's searching for compiler wrappers and mpirun etc.
  2. environment modules (gnu modules) setting the MPI_HOME variable explicitly
  3. other crazy and complicated magic from FindMPI. When CMake fails on this step it also outputs info so that the user can specify via the command line or ccmake or cmake-gui interfaces the explicit location of where to find MPI.

I think it should be fairly straightforward to implement this, but I need to dig into the install script to assert this with any confidence first....

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions