Skip to content
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

WPS compile :Syntax error in argument list #259

Open
aganji2 opened this issue Sep 23, 2024 · 11 comments
Open

WPS compile :Syntax error in argument list #259

aganji2 opened this issue Sep 23, 2024 · 11 comments

Comments

@aganji2
Copy link

aganji2 commented Sep 23, 2024

I am trying to compile WPS, but I got the error below.

==============================================================================================

Version 4.6.0

Linux nia-login02.scinet.local 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

GNU Fortran (GCC) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

==============================================================================================

**** Compiling WPS and all utilities ****

make[1]: Entering directory `~/WRFmodel/WPS/geogrid/src'
/bin/rm -f module_debug.o module_debug.mod
/scinet/niagara/software/2019b/opt/base/gcc/13.2.0/bin/cpp -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -D_GEOGRID -DUSE_JPEG2000 -DUSE_PNG -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_netcdf -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_grib_share -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_grib1 -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_int -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/inc -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/netcdf/include module_debug.F > module_debug.f90
mpif90 -ffree-form -O -fconvert=big-endian -frecord-marker=4 -fallow-argument-mismatch -c module_debug.f90 -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_netcdf -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_grib_share -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_grib1 -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_int -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/inc -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/netcdf/include
/bin/rm -f gridinfo_module.o gridinfo_module.mod
/scinet/niagara/software/2019b/opt/base/gcc/13.2.0/bin/cpp -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -D_GEOGRID -DUSE_JPEG2000 -DUSE_PNG -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_netcdf -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_grib_share -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_grib1 -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_int -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/inc -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/netcdf/include gridinfo_module.F > gridinfo_module.f90
gridinfo_module.F:470:25: warning: missing terminating ' character
470 | ! If the user hasn't supplied a known_x and known_y, assume the center of domain 1
| ^
mpif90 -ffree-form -O -fconvert=big-endian -frecord-marker=4 -fallow-argument-mismatch -c gridinfo_module.f90 -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_netcdf -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_grib_share -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_grib1 -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/external/io_int -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/WPS/../WRF/inc -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/netcdf/include
gridinfo_module.F:308:73:

308 | 'A valid wrf_core must be specified in the namelist. '// &
| 1
Error: Syntax error in argument list at (1)
gridinfo_module.F:309:21:

309 | 'Currently, only "ARW" and "NMM" are supported.')
| 1
Error: Invalid character in name at (1)
gridinfo_module.F:312:73:

@weiwangncar
Copy link
Collaborator

@aganji2 Did you compile WRF first?

@aganji2
Copy link
Author

aganji2 commented Sep 23, 2024

Yes, I compiled for em_real (3d real case) and em_quarter_ss (3d ideal case); it was successful, and all the required exe files were generated. I copied the last part of the log file here:

build started: Sun Sep 22 20:22:49 EDT 2024
build completed: Sun Sep 22 20:24:44 EDT 2024

---> Executables successfully built <---

-rwxr-x--- 1 ganjiarm mhatzo 44406136 Sep 22 20:21 main/ideal.exe
-rwxr-x--- 1 ganjiarm mhatzo 46616808 Sep 22 20:24 main/ndown.exe
-rwxr-x--- 1 ganjiarm mhatzo 46756112 Sep 22 20:24 main/real.exe
-rwxr-x--- 1 ganjiarm mhatzo 45908416 Sep 22 20:24 main/tc.exe
-rwxr-x--- 1 ganjiarm mhatzo 55250928 Sep 22 20:22 main/wrf.exe

@weiwangncar
Copy link
Collaborator

@aganji2 I tried with gcc 13.2.0 on our system, and it compiles WPS just fine. So not sure yet what your problem is.

@aganji2
Copy link
Author

aganji2 commented Sep 23, 2024

The error arises when trying to call the mprintf subroutine, specifically with the string that is being split across two lines. The continuation character & is intended to indicate that the statement continues on the next line, but the compiler is not recognizing the syntax correctly. for Example for
780 | call mprintf(.true., INFORM, 'For %s, couldn''t find interpolator sequence for '// &
| 1
Error: Syntax error in argument list at (1)

Is there any flag that I have to add for compilation? I copied configure.wps here:

COMPRESSION_LIBS = -L/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/grib2/lib -ljasper -lpng -lz
COMPRESSION_INC = -I/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/grib2/include
FDEFS = -DUSE_JPEG2000 -DUSE_PNG
SFC = gfortran
SCC = gcc
DM_FC = mpif90
DM_CC = mpicc
FC = $(SFC)
CC = $(SCC)
LD = $(FC)
FFLAGS = $(FORMAT_FREE) -O -fconvert=big-endian -frecord-marker=4
F77FLAGS = $(FORMAT_FIXED) -O -fconvert=big-endian -frecord-marker=4
FORMAT_FREE = -ffree-form
FORMAT_FIXED = -ffixed-form
FCCOMPAT = -fallow-argument-mismatch
FCSUFFIX =
FNGFLAGS = $(FFLAGS)
LDFLAGS =
CFLAGS =
CPP = /usr/bin/cpp -P -traditional
CPPFLAGS = -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL
RANLIB = ranlib

@weiwangncar
Copy link
Collaborator

@aganji2 Which compile option did you choose when you typed 'configure'? Can you show me the option line?

@aganji2
Copy link
Author

aganji2 commented Sep 23, 2024

I tested both 1 and 3:
(py38WRF) ganjiarm@nia-login06:~/models/MainModel/WRFmodel/WPS$ ./configure
Will use NETCDF in dir: /gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/netcdf
Found what looks like a valid WRF I/O library in ../WRF
Found Jasper environment variables for GRIB2 support...
$JASPERLIB = /gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/grib2/lib
$JASPERINC = /gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/grib2/include

Please select from among the following supported platforms.

  1. Linux x86_64, gfortran (serial)
  2. Linux x86_64, gfortran (serial_NO_GRIB2)
  3. Linux x86_64, gfortran (dmpar)
  4. Linux x86_64, gfortran (dmpar_NO_GRIB2)
  5. Linux x86_64, PGI compiler (serial)
  6. Linux x86_64, PGI compiler (serial_NO_GRIB2)
  7. Linux x86_64, PGI compiler (dmpar)
  8. Linux x86_64, PGI compiler (dmpar_NO_GRIB2)
  9. Linux x86_64, PGI compiler, SGI MPT (serial)
  10. Linux x86_64, PGI compiler, SGI MPT (serial_NO_GRIB2)
  11. Linux x86_64, PGI compiler, SGI MPT (dmpar)
  12. Linux x86_64, PGI compiler, SGI MPT (dmpar_NO_GRIB2)
  13. Linux x86_64, IA64 and Opteron (serial)
  14. Linux x86_64, IA64 and Opteron (serial_NO_GRIB2)
  15. Linux x86_64, IA64 and Opteron (dmpar)
  16. Linux x86_64, IA64 and Opteron (dmpar_NO_GRIB2)
  17. Linux x86_64, Intel oneAPI compilers (serial)
  18. Linux x86_64, Intel oneAPI compilers (serial_NO_GRIB2)
  19. Linux x86_64, Intel oneAPI compilers (dmpar)
  20. Linux x86_64, Intel oneAPI compilers (dmpar_NO_GRIB2)
  21. Linux x86_64, Intel Classic compilers (serial)
  22. Linux x86_64, Intel Classic compilers (serial_NO_GRIB2)
  23. Linux x86_64, Intel Classic compilers (dmpar)
  24. Linux x86_64, Intel Classic compilers (dmpar_NO_GRIB2)
  25. Linux x86_64, Intel Classic compilers, SGI MPT (serial)
  26. Linux x86_64, Intel Classic compilers, SGI MPT (serial_NO_GRIB2)
  27. Linux x86_64, Intel Classic compilers, SGI MPT (dmpar)
  28. Linux x86_64, Intel Classic compilers, SGI MPT (dmpar_NO_GRIB2)
  29. Linux x86_64, Intel Classic compilers, IBM POE (serial)
  30. Linux x86_64, Intel Classic compilers, IBM POE (serial_NO_GRIB2)
  31. Linux x86_64, Intel Classic compilers, IBM POE (dmpar)
  32. Linux x86_64, Intel Classic compilers, IBM POE (dmpar_NO_GRIB2)
  33. Linux x86_64 g95 compiler (serial)
  34. Linux x86_64 g95 compiler (serial_NO_GRIB2)
  35. Linux x86_64 g95 compiler (dmpar)
  36. Linux x86_64 g95 compiler (dmpar_NO_GRIB2)
  37. Cray XE/XC CLE/Linux x86_64, Cray compiler (serial)
  38. Cray XE/XC CLE/Linux x86_64, Cray compiler (serial_NO_GRIB2)
  39. Cray XE/XC CLE/Linux x86_64, Cray compiler (dmpar)
  40. Cray XE/XC CLE/Linux x86_64, Cray compiler (dmpar_NO_GRIB2)
  41. Cray XC CLE/Linux x86_64, Intel Classic compilers (serial)
  42. Cray XC CLE/Linux x86_64, Intel Classic compilers (serial_NO_GRIB2)
  43. Cray XC CLE/Linux x86_64, Intel Classic compilers (dmpar)
  44. Cray XC CLE/Linux x86_64, Intel Classic compilers (dmpar_NO_GRIB2)

Enter selection [1-44] : 3

Configuration successful. To build the WPS, type: compile

Testing for NetCDF, C and Fortran compiler

This installation NetCDF is 64-bit
C compiler is 64-bit
Fortran compiler is 64-bit

@weiwangncar
Copy link
Collaborator

@aganji2 Did you install the grib2 library separately from compiling WPS?

@aganji2
Copy link
Author

aganji2 commented Sep 23, 2024

I installed it from

/home/m/mhatzo/ganjiarm/models/MainModel/WRFmodel/LIBRARIES/jasper-1.900.1

before WPS compiling using this command:

./configure --prefix=/gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/grib2

@weiwangncar
Copy link
Collaborator

@aganji2 Can you first do 'clean -a' to remove all built code, and then do 'configure --build-grib2-libs' ? This will build grib2/png/zlib libraries from the code included from the WPS tar file. I wonder if the newer grib2 code downloaded is newer than what we support in WPS.

@aganji2
Copy link
Author

aganji2 commented Sep 23, 2024

I used the command in the WPS folder, and got the same error types for mprintf subroutine (please see below). However the number of options for compile reduced:

797 | call mprintf(.true., INFORM, 'Could not find interpolator sequence for requested resolution '// &
| 1
Error: Syntax error in argument list at (1)

(py38WRF) ganjiarm@nia-login02:~/models/MainModel/WRFmodel/WPS$ ./configure --build-grib2-libs
Will use NETCDF in dir: /gpfs/fs0/scratch/m/mhatzo/ganjiarm/Models/MainModel/WRFmodel/LIBRARIES/netcdf
Found what looks like a valid WRF I/O library in ../WRF


The zlib, libpng, and JasPer libraries will be compiled from source and
installed in /home/m/mhatzo/ganjiarm/models/MainModel/WRFmodel/WPS/grib2 .

The environment variables JASPERLIB and JASPERINC will be ignored.



Please select from among the following supported platforms.

  1. Linux x86_64, gfortran (serial)
  2. Linux x86_64, gfortran (dmpar)
  3. Linux x86_64, PGI compiler (serial)
  4. Linux x86_64, PGI compiler (dmpar)
  5. Linux x86_64, PGI compiler, SGI MPT (serial)
  6. Linux x86_64, PGI compiler, SGI MPT (dmpar)
  7. Linux x86_64, IA64 and Opteron (serial)
  8. Linux x86_64, IA64 and Opteron (dmpar)
  9. Linux x86_64, Intel oneAPI compilers (serial)
  10. Linux x86_64, Intel oneAPI compilers (dmpar)
  11. Linux x86_64, Intel Classic compilers (serial)
  12. Linux x86_64, Intel Classic compilers (dmpar)
  13. Linux x86_64, Intel Classic compilers, SGI MPT (serial)
  14. Linux x86_64, Intel Classic compilers, SGI MPT (dmpar)
  15. Linux x86_64, Intel Classic compilers, IBM POE (serial)
  16. Linux x86_64, Intel Classic compilers, IBM POE (dmpar)
  17. Linux x86_64 g95 compiler (serial)
  18. Linux x86_64 g95 compiler (dmpar)
  19. Cray XE/XC CLE/Linux x86_64, Cray compiler (serial)
  20. Cray XE/XC CLE/Linux x86_64, Cray compiler (dmpar)
  21. Cray XC CLE/Linux x86_64, Intel Classic compilers (serial)
  22. Cray XC CLE/Linux x86_64, Intel Classic compilers (dmpar)

Enter selection [1-22] : 2

Configuration successful. To build the WPS, type: compile

Testing for NetCDF, C and Fortran compiler

This installation NetCDF is 64-bit
C compiler is 64-bit
Fortran compiler is 64-bit

@weiwangncar
Copy link
Collaborator

@aganji2 Let's wait for others to comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants