robert_letscher@unh_edu
New Member
I am having difficulty setting the correct env variables for netcdf fortran in config machines when porting to my local linux cluster.
The pio build fails when it can't find netcdf.mod. I added the statement <env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env> to my environment_variables section of config machines which is the directory where netcdf.mod is located. Now the pio build still fails but complains that it can't find netcdf fortran. On my system it is located at /usr/lib64. I have the statements:
<env name="NETCDF_PATH">/cm/shared/modulefiles/netcdf/gcc/64</env>
<env name="NetCDF_Fortran">/usr/lib64</env>
<env name="NetCDF_Fortran_LIBRARY">/usr/lib64/libnetcdff.so</env>
<env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env>
and it fails that it can't find netcdf.mod
I have also tried:
<env name="NETCDF_C_PATH">/cm/shared/modulefiles/netcdf/gcc/64</env>
<env name="NetCDF_FORTRAN_PATH">/usr/lib64</env>
<env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env>
and it still can't find netcdf.mod. Only when I include:
<env name="NETCDF_PATH">/cm/shared/modulefiles/netcdf/gcc/64</env>
<env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env>
Will it find netcdf.mod but then it can't find netcdf fortran.
The pio build fails when it can't find netcdf.mod. I added the statement <env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env> to my environment_variables section of config machines which is the directory where netcdf.mod is located. Now the pio build still fails but complains that it can't find netcdf fortran. On my system it is located at /usr/lib64. I have the statements:
<env name="NETCDF_PATH">/cm/shared/modulefiles/netcdf/gcc/64</env>
<env name="NetCDF_Fortran">/usr/lib64</env>
<env name="NetCDF_Fortran_LIBRARY">/usr/lib64/libnetcdff.so</env>
<env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env>
and it fails that it can't find netcdf.mod
I have also tried:
<env name="NETCDF_C_PATH">/cm/shared/modulefiles/netcdf/gcc/64</env>
<env name="NetCDF_FORTRAN_PATH">/usr/lib64</env>
<env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env>
and it still can't find netcdf.mod. Only when I include:
<env name="NETCDF_PATH">/cm/shared/modulefiles/netcdf/gcc/64</env>
<env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env>
Will it find netcdf.mod but then it can't find netcdf fortran.