Skip to content

NetCDF branch of Adcirpolate build fails with different error messages #1

@jasonfleming

Description

@jasonfleming

@caseydietrich @wwlwpd I have been working on the docker container for the NetCDF branch of Adcirpolate today and ran into an issue with building the Adcirpolate code with CMake. Actually, there were two different error messages, depending on whether I was building the code in the docker image or on the command line of my desktop machine.

When building the docker image, the screen output from CMake and make complains about a Fortran format string:

Step 42/46 : RUN cmake ./CMakeLists.txt
 ---> Running in de2ed595cdc7
-- The Fortran compiler identification is GNU 9.3.0
-- Check for working Fortran compiler: /usr/bin/mpif90
-- Check for working Fortran compiler: /usr/bin/mpif90  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/mpif90 supports Fortran 90
-- Checking whether /usr/bin/mpif90 supports Fortran 90 -- yes
+> The config file for ESMF library is found.
-- Configuring done
-- Generating done
-- Build files have been written to: /root/jadcirpolate-NetCDF
Removing intermediate container de2ed595cdc7
 ---> 1564aa1d8a85
Step 43/46 : RUN make all
 ---> Running in 821f21dedb93
Scanning dependencies of target adcirpolate
[ 14%] Building Fortran object CMakeFiles/adcirpolate.dir/errors_and_msgs.f90.o
/root/jadcirpolate-NetCDF/errors_and_msgs.f90:49:22:

   49 |       write (*, "(A)"), in_message
      |                      1
Warning: Legacy Extension: Comma before i/o item list at (1)
/root/jadcirpolate-NetCDF/errors_and_msgs.f90:43:45:

   43 |       write (*, "(A, I4, A, I6, A, A, A, A)"), error_message
      |                                             1
Warning: Legacy Extension: Comma before i/o item list at (1)
/root/jadcirpolate-NetCDF/errors_and_msgs.f90:35:45:

   35 |       write (*, "(A, I4, A, I6, A, A, A, A)"), "Processor ", localPet, &
      |                                             1
Warning: Legacy Extension: Comma before i/o item list at (1)
/root/jadcirpolate-NetCDF/errors_and_msgs.f90:26:49:

   26 |          write (*, "(A, I4, A, I6, A, A, A, I4)"), "Processor ", localPet, &
      |                                                 1
Warning: Legacy Extension: Comma before i/o item list at (1)
[ 28%] Building Fortran object CMakeFiles/adcirpolate.dir/adcirpolate.f90.o
/root/jadcirpolate-NetCDF/adcirpolate.f90:757:73:

  757 |       CHECK_ERR_CODE(localPet, rc)
      |                                                                         1
Warning: Legacy Extension: Comma before i/o item list at (1)
/root/jadcirpolate-NetCDF/adcirpolate.f90:660:73:

  660 |       CHECK_ERR_CODE(localPet, rc)
      |                                                                         1
Warning: Legacy Extension: Comma before i/o item list at (1)
/root/jadcirpolate-NetCDF/adcirpolate.f90:150:73:

  150 |       CHECK_ERR_CODE(localPet, rc)
      |                                                                         1
Warning: Legacy Extension: Comma before i/o item list at (1)
/root/jadcirpolate-NetCDF/adcirpolate.f90:120:73:

  120 |       CHECK_ERR_CODE(0, rc)
      |                                                                         1
Warning: Legacy Extension: Comma before i/o item list at (1)
[ 42%] Building Fortran object CMakeFiles/adcirpolate.dir/netcdfio.f90.o
/root/jadcirpolate-NetCDF/netcdfio.f90:904:33:

  904 |             read(ncatts(ia,2),'(i)') iatt
      |                                 1
Error: Nonnegative width required in format string at (1)
make[2]: *** [CMakeFiles/adcirpolate.dir/build.make:128: CMakeFiles/adcirpolate.dir/netcdfio.f90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:104: CMakeFiles/adcirpolate.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
The command '/bin/sh -c make all' returned a non-zero code: 2

When building Adcirpolate on the command line, I got the following error message about not being able to find netcdf.inc (I'm not sure how to tell it the location of netcdf ... nothing jumped out at me in the CMakeLists.txt file):

jason@kitt:/srv/work/asgs.dev/jadcirpolate$ cmake ./CMakeLists.txt
-- The Fortran compiler identification is GNU 9.3.0
-- Check for working Fortran compiler: /usr/bin/mpif90
-- Check for working Fortran compiler: /usr/bin/mpif90  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/mpif90 supports Fortran 90
-- Checking whether /usr/bin/mpif90 supports Fortran 90 -- yes
+> The config file for ESMF library is found.
-- Configuring done
-- Generating done
-- Build files have been written to: /srv/work/asgs.dev/jadcirpolate
jason@kitt:/srv/work/asgs.dev/jadcirpolate$ make all
Scanning dependencies of target adcirpolate
[ 14%] Building Fortran object CMakeFiles/adcirpolate.dir/errors_and_msgs.f90.o
/srv/work/asgs.dev/jadcirpolate/errors_and_msgs.f90:49:22:

   49 |       write (*, "(A)"), in_message
      |                      1
Warning: Legacy Extension: Comma before i/o item list at (1)
/srv/work/asgs.dev/jadcirpolate/errors_and_msgs.f90:43:45:

   43 |       write (*, "(A, I4, A, I6, A, A, A, A)"), error_message
      |                                             1
Warning: Legacy Extension: Comma before i/o item list at (1)
/srv/work/asgs.dev/jadcirpolate/errors_and_msgs.f90:35:45:

   35 |       write (*, "(A, I4, A, I6, A, A, A, A)"), "Processor ", localPet, &
      |                                             1
Warning: Legacy Extension: Comma before i/o item list at (1)
/srv/work/asgs.dev/jadcirpolate/errors_and_msgs.f90:26:49:

   26 |          write (*, "(A, I4, A, I6, A, A, A, I4)"), "Processor ", localPet, &
      |                                                 1
Warning: Legacy Extension: Comma before i/o item list at (1)
[ 28%] Building Fortran object CMakeFiles/adcirpolate.dir/adcirpolate.f90.o
/srv/work/asgs.dev/jadcirpolate/adcirpolate.f90:757:73:

  757 |       CHECK_ERR_CODE(localPet, rc)
      |                                                                         1
Warning: Legacy Extension: Comma before i/o item list at (1)
/srv/work/asgs.dev/jadcirpolate/adcirpolate.f90:660:73:

  660 |       CHECK_ERR_CODE(localPet, rc)
      |                                                                         1
Warning: Legacy Extension: Comma before i/o item list at (1)
/srv/work/asgs.dev/jadcirpolate/adcirpolate.f90:150:73:

  150 |       CHECK_ERR_CODE(localPet, rc)
      |                                                                         1
Warning: Legacy Extension: Comma before i/o item list at (1)
/srv/work/asgs.dev/jadcirpolate/adcirpolate.f90:120:73:

  120 |       CHECK_ERR_CODE(0, rc)
      |                                                                         1
Warning: Legacy Extension: Comma before i/o item list at (1)
[ 42%] Building Fortran object CMakeFiles/adcirpolate.dir/netcdfio.f90.o
/srv/work/asgs.dev/jadcirpolate/netcdfio.f90:5: Error: Can't open included file 'netcdf.inc'
make[2]: *** [CMakeFiles/adcirpolate.dir/build.make:128: CMakeFiles/adcirpolate.dir/netcdfio.f90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:104: CMakeFiles/adcirpolate.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

I'm pretty stumped, please let me know if you have any insights.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions