NOAA-GFDL / TCtracker

GFDL Tropical Cyclone tracker analysis tool
GNU General Public License v2.0
9 stars 4 forks source link

autoconf issue on PPAN #14

Closed jkrasting closed 1 year ago

jkrasting commented 1 year ago

@underwoo - I am trying to compile on the analysis cluster and I am hitting an error. Does this setup look right to you?

module load intel_compilers
module load intel-mpi

autoconf
configure.ac:33: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:73: error: possibly undefined macro: AM_PATH_PYTHON
underwoo commented 1 year ago

Do you really want to build with the Intel compiler?

jkrasting commented 1 year ago

I don't have to ... Is there a module environment you would recommend?

underwoo commented 1 year ago

I think you should use gfortran to build. This is due to using f2py to build a python module from the Fortran source. I just pushed an update to fix something with the f2py.

To build with gfortran, load the following modules:

gcc/11.2.0
module load grace/5.1.25
module load nco/5.0.1
module load python/3.7.7
module load pyferret/7.6.3
module load netcdf-fortran/4.5.3

Then the configure command should be:

autoreconf -if
configure
jkrasting commented 1 year ago

Looks like some sort of library mismatch now. This is from config.log:

configure:3758: checking netCDF Fortran 90 binding available
configure:3780: gfortran -c -I/app/spack/2022.01.01/linux-rhel7-x86_64/gcc-11.2.0/netcdf-fortran/4.5.3-m4arkb34bmowqtb4br3xgceig3x7tovf/include -I/app/spack/2022.01.01/linux-
rhel7-x86_64/gcc-11.2.0/netcdf-fortran/4.5.3-m4arkb34bmowqtb4br3xgceig3x7tovf/include -g -O2 -ffree-form -ffree-line-length-none  conftest.f90 >&5
conftest.f90:2.10:

      use netcdf
          1
Fatal Error: File 'netcdf.mod' opened at (1) is not a GNU Fortran module file
configure:3780: $? = 1
configure: failed program was:
|       program main
|       use netcdf
|       print*, nf90_inq_libvers()
|       end
configure:3792: result: no
configure:3797: WARNING: Unable to locate a working Fortran netCDF library.  Please specify --with-netcdf-fortran=<LOCATION> where <LOCATION> is the full path to where netCDF
 is installed.
configure:3837: error: Unable to find NetCDF Fortran library.
underwoo commented 1 year ago

I am commenting here so the thread may help someone else in the future.

This is due to using a different version of gfortran than the one used to build the netcdf fortran bindings. Loading the correct module for gfortran fixed the issue.

jkrasting commented 1 year ago

Thanks @underwoo! Environment issue solved here on my end.

underwoo commented 1 year ago

Good to hear.

jkrasting commented 1 year ago

Hi @underwoo. The compilation on PPAN has changed again. @keturner8 reported this issue to me again.

Some of the modules above have changed and now there is a conflict between python/3.9 and pyferret. Can you advise us on how to go about compiling?

cd TCtracker

module load gcc/11.2.0
module load grace/5.1.25
module load nco/5.0.1
module load python/3.9
module load pyferret/7.6.3-conda
module load netcdf-fortran/4.5.3

autoreconf -if
configure
underwoo commented 1 year ago

I think it is time to create a conda or a spack recipe for this. Trying to get it to work with the installed software environments on PPAN is getting to be difficult. I'll start getting something ready. Which method would you prefer?

jkrasting commented 1 year ago

I need a better sense of the pros/cons of each. My personal experience would lean towards conda. Would either approach allow flexibility to edit and tinker with the underlying Fortran code and modify the detection and tracking algorithms?

underwoo commented 1 year ago

Spack has an more tools that make development/debuging the package easier than conda. However, I can create a conda recipe that is designed for development of the package.