-
Notifications
You must be signed in to change notification settings - Fork 170
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
GNU Fortran module error #2677
Comments
Thanks for writing @Ajmal-1301. I think the issue is that yuou are using a netCDF library that is built with the PGI compiler, which is not supported by GEOS-Chem. File ‘/usr/local/pgi/linux86-64/2018/netcdf/netcdf-4.5.0/openmpi-2.1.2/include/netcdf.mod’ opened at (1) is not a GNU Fortran module file You need to build GEOS-Chem with the same version of the compiler that your netCDF and OpenMPI libraries have been built with. Otherwise it will result in an error similar to that above. |
Hi @yantosca ###############################################################################`
# Environment file for GCClassic + GNU compilers`
#
###############################################################################`
# Unload all modules first
module purge
# Load modules
module load cmake`
module load openmpi-gcc/openmpi5.0.5-gcc11.4.1
module load netcdf/4.9.2-openmpi5.0.3
#==============================================================================
# Environment variables and related settings
# (NOTE: We will have to define <module>_HOME variables manually, based on what GEOS-Chem needs)
#==============================================================================
# Set number of threads for OpenMP.
# In our LSF script, we may want to start with just shared memory parallelization, where we use multiple cores on a *single* node
## this would look like this in our LSF script:
### #BSUB -R span[hosts=1]
### export OMP_NUM_THREADS="${LSB_DJOB_NUMPROC}"
# Max out the stacksize memory limit
export OMP_STACKSIZE="500m"
# Compilers
export CC="gcc"
export CXX="g++"
export FC="gfortran"
export F77="${FC}"
# netCDF
export NETCDF_HOME=/usr/local/apps/netcdf/4.9.2-openmpi5.0.3/
export NETCDF_C_ROOT="${NETCDF_HOME}"
export NETCDF_FORTRAN_ROOT="${NETCDF_HOME}"
# MPI
export MPI_HOME=/usr/local/apps/openmpi/5.0.5-gcc11.4.1/
# KPP 3.0.0+
# (not worrying with this for now). export KPP_FLEX_LIB_DIR="${FLEX_HOME}/lib64"
#==============================================================================
# Print information
#==============================================================================
module list
echo ""
echo "Environment:"
echo ""
echo "CC : ${CC}"
echo "CXX : ${CXX}"
echo "FC : ${FC}"
echo "KPP_FLEX_LIB_DIR : ${KPP_FLEX_LIB_DIR}"
echo "MPI_HOME : ${MPI_HOME}"
echo "NETCDF_HOME : ${NETCDF_HOME}"
echo "NETCDF_FORTRAN_HOME : ${NETCDF_FORTRAN_HOME}"
echo "OMP_NUM_THREADS : ${OMP_NUM_THREADS}"
echo ""
echo "Done sourcing ${BASH_SOURCE[0]}" |
Thanks @Ajmal-1301 for the environment file. A couple of thoughts:
module load openmpi-gcc/openmpi5.0.5-gcc11.4.1
module load netcdf/4.9.2-openmpi5.0.3 were built with the PGI compiler instead of with the GNU compiler. You can use the $ module spider netcdf and $ module spider netcdf-fortran commands to find a version of the netCDF libraries on your system that were built with the GNU compilers. If you do not have netcdf or netcdf-fortran libraries that were built with GNU compilers, you can build them yourselves following the instructions on ReadTheDocs: |
Your name
Ajmal
Your affiliation
North Carolina State University
Please provide a clear and concise description of your question or discussion topic.
Hi,
I was following the GEOS-Chem tutorial and was compiling the code, and I got the following error,
File ‘/usr/local/pgi/linux86-64/2018/netcdf/netcdf-4.5.0/openmpi-2.1.2/include/netcdf.mod’ opened at (1) is not a GNU Fortran module file
the code is not going to the correct location where I loaded my netcdf module, which is at (/usr/local/apps/netcdf/4.9.2-openmpi5.0.3/)
I think the traced the issue to the HEMCOBuildproperties.txt file which is providing the location and not the location where I loaded the module
HEMCOBuildProperties.txt
Thanks
The text was updated successfully, but these errors were encountered: