Open liuxiaoran6 opened 6 years ago
Hi Liuxiaoran,
Have you solved this issue? I have the same errors trying to compile HRLDASv4.0 on my Ubuntu machine with gfortran.
Thank you,
Patrick
Hydro.exe has been compiled successfully. The error happens in building utilities. You can ignore if you only use model. Wei Yu
Thank you Wei Yu for your response, and good to know. Still interested in fixing the error in case I want to test the utilities.
Also, I do not get these errors when using ifort compiler, so I hope to come up with solution for gfortran. Any further information is much appreciated.
Thank you,
Patrick
Thank you Wei Yu for your response, and good to know. Still interested in fixing the error in case I want to test the utilities.
Also, I do not get these errors when using ifort compiler, so I hope to come up with solution for gfortran. Any further information is much appreciated.
Thank you,
Patrick
Hi drnimbusrain I have solved this issue. Delete the "-fno-underscoring" in user_build_options,and then you can install the HRLDAS I don't know why do this can install THANK YOU Liu Xiaoran
Thank you Liu Xiaoran, that solved the issue in creating both hrldas and create_forcing executable on ubuntu with gfortran.
Regards,
Patrick
Hi I have the same error when I compile the HRLDAS 4.0 . I deleted “ -fno-underscoring” to compile the HRLDAS 4.0,but still showed the “ undefined reference to c_gribopen“error,what should I do to overcome this error?Any further information is much appreciated.
Dear All, While issuing make command with gfortran and ifort options, I got following error...
Entering directory `/home/drdinesh/Desktop/sm-wrf/hrldas/hrldas-release-3.7.1/hrldas3.7.1/Utility_routines'
rm -f module_date_utilities.f90 /usr/bin/cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_date_utilities.F > module_date_utilities.f90 /usr/bin/gfortran -o module_date_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none module_date_utilities.f90 module_date_utilities.f90:1.1:
/* Copyright (C) 1991-2012 Free Software Foundation, Inc. 1 Error: Invalid character in name at (1) module_date_utilities.f90:2.3:
This file is part of the GNU C Library. 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:4.3:
The GNU C Library is free software; you can redistribute it and/or 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:4.39:
The GNU C Library is free software; you can redistribute it and/or 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:5.3:
modify it under the terms of the GNU Lesser General Public 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:6.3:
License as published by the Free Software Foundation; either 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:6.57:
License as published by the Free Software Foundation; either 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:7.3:
version 2.1 of the License, or (at your option) any later version. 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:9.3:
The GNU C Library is distributed in the hope that it will be useful, 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:10.3:
but WITHOUT ANY WARRANTY; without even the implied warranty of 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:10.29:
but WITHOUT ANY WARRANTY; without even the implied warranty of 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:11.3:
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:12.3:
Lesser General Public License for more details. 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:14.3:
You should have received a copy of the GNU Lesser General Public 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:15.3:
License along with the GNU C Library; if not, see 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:15.41:
License along with the GNU C Library; if not, see 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:16.4:
http://www.gnu.org/licenses/. */ 1 Error: Invalid character in name at (1) module_date_utilities.f90:19.1:
/* This header is separate from features.h so that the compiler can 1 Error: Invalid character in name at (1) module_date_utilities.f90:20.3:
include it implicitly at the start of every compilation. It must 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:21.3:
not itself include
Hi,
I'm having a similar issue as dineshjnu2020. Using gfortran on Ubuntu 18.04.
Regards,
Hugo
Dear All, While issuing make command with gfortran and ifort options, I got following error...
Entering directory `/home/drdinesh/Desktop/sm-wrf/hrldas/hrldas-release-3.7.1/hrldas3.7.1/Utility_routines'
rm -f module_date_utilities.f90 /usr/bin/cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_date_utilities.F > module_date_utilities.f90 /usr/bin/gfortran -o module_date_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none module_date_utilities.f90 module_date_utilities.f90:1.1:
/* Copyright (C) 1991-2012 Free Software Foundation, Inc. 1 Error: Invalid character in name at (1) module_date_utilities.f90:2.3:
This file is part of the GNU C Library. 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:4.3:
The GNU C Library is free software; you can redistribute it and/or 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:4.39:
The GNU C Library is free software; you can redistribute it and/or 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:5.3:
modify it under the terms of the GNU Lesser General Public 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:6.3:
License as published by the Free Software Foundation; either 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:6.57:
License as published by the Free Software Foundation; either 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:7.3:
version 2.1 of the License, or (at your option) any later version. 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:9.3:
The GNU C Library is distributed in the hope that it will be useful, 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:10.3:
but WITHOUT ANY WARRANTY; without even the implied warranty of 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:10.29:
but WITHOUT ANY WARRANTY; without even the implied warranty of 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:11.3:
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:12.3:
Lesser General Public License for more details. 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:14.3:
You should have received a copy of the GNU Lesser General Public 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:15.3:
License along with the GNU C Library; if not, see 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:15.41:
License along with the GNU C Library; if not, see 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:16.4:
http://www.gnu.org/licenses/. */ 1 Error: Invalid character in name at (1) module_date_utilities.f90:19.1:
/* This header is separate from features.h so that the compiler can 1 Error: Invalid character in name at (1) module_date_utilities.f90:20.3:
include it implicitly at the start of every compilation. It must 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:21.3:
not itself include
or any other header that includes 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:22.4: because the implicit include comes before any feature 1 Error: Invalid character in name at (1) module_date_utilities.f90:23.3: test macros that may be defined in a source file before it first 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:24.3: explicitly includes a system header. GCC knows the name of this 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:25.3: header in order to preinclude it. */ 1 Error: Unclassifiable statement at (1) module_date_utilities.f90:27.1: /* We do support the IEC 559 math functionality, real and complex. */ 1 Error: Invalid character in name at (1) Fatal Error: Error count reached limit of 25. make[1]: *** [module_date_utilities.o] Error 1 make[1]: Leaving directory `/home/drdinesh/Desktop/sm-wrf/hrldas/hrldas-release-3.7.1/hrldas3.7.1/Utility_routines' make: *** [all] Error 2 Can anybody help. I a trying to install HRLDAS 3.7 on centos 7. Regards Dr Dinesh
DI you figure it out? I'm having the same issue. CHeers!
Hi,
I'm having a similar issue as dineshjnu2020. Using gfortran on Ubuntu 18.04.
Regards,
Hugo
Hi HUgo. DId y figure it out the issue? I'm having the same problem Cheers, MIshel
The problem is that for every line, every F90 action, the file '/usr/include/stdc-predef.h' is read.
A workaround : First, save a copy of stdc-predef.h . Then delete all the "text information". Like the attached stdc-predef.h . Source: https://www.linuxquestions.org/questions/slackware-14/invalid-character-in-name-at-1-usr-include-stdc-predef-h-2-3-included-at-c_po-4175542242/
It has worked out pretty well for me. I wish good luck for others. Cheers Dr Dinesh
Hi Dr Dinesh! THanks for your reply. I did what you just suggested, and now I'm having issues regarding another file (module_noahMP_hrldas_driver.f) as follows:
(cd Utility_routines; make) make[1]: Entering directory `/home/HRLDAS/src/HRLDAS-v3.6/Utility_routines'
rm -f module_date_utilities.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_date_utilities.F > module_date_utilities.f gfortran -o module_date_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_date_utilities.f
rm -f module_model_constants.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_model_constants.F > module_model_constants.f gfortran -o module_model_constants.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_model_constants.f
rm -f module_wrf_utilities.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_wrf_utilities.F > module_wrf_utilities.f gfortran -o module_wrf_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_wrf_utilities.f
rm -f kwm_string_utilities.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE kwm_string_utilities.F > kwm_string_utilities.f gfortran -o kwm_string_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none kwm_string_utilities.f
make[1]: Leaving directory /home/HRLDAS/src/HRLDAS-v3.6/Utility_routines' (cd Noah; make) make[1]: Entering directory
/home/HRLDAS/src/HRLDAS-v3.6/Noah'
rm -f module_sf_myjsfc.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_sf_myjsfc.F > module_sf_myjsfc.f gfortran -o module_sf_myjsfc.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_myjsfc.f
rm -f module_sf_sfclay.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_sf_sfclay.F > module_sf_sfclay.f gfortran -o module_sf_sfclay.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_sfclay.f
rm -f module_sf_noahmplsm.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_sf_noahmplsm.F > module_sf_noahmplsm.f gfortran -o module_sf_noahmplsm.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_noahmplsm.f
rm -f module_sf_noahmp_glacier.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_sf_noahmp_glacier.F > module_sf_noahmp_glacier.f gfortran -o module_sf_noahmp_glacier.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_noahmp_glacier.f
rm -f module_sf_noahmp_groundwater.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_sf_noahmp_groundwater.F > module_sf_noahmp_groundwater.f gfortran -o module_sf_noahmp_groundwater.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_noahmp_groundwater.f
rm -f module_sf_noahmpdrv.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_sf_noahmpdrv.F > module_sf_noahmpdrv.f gfortran -o module_sf_noahmpdrv.o -c -I. -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none module_sf_noahmpdrv.f
make[1]: Leaving directory /home/HRLDAS/src/HRLDAS-v3.6/Noah' (cd IO_code; make) make[1]: Entering directory
/home/HRLDAS/src/HRLDAS-v3.6/IO_code'
rm -f module_hrldas_netcdf_io.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_hrldas_netcdf_io.F > module_hrldas_netcdf_io.f gfortran -o module_hrldas_netcdf_io.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none -I../Utility_routines -I/home/HRLDAS/LIBRARIES/netcdf/include module_hrldas_netcdf_io.f
rm -f module_NoahMP_hrldas_driver.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_NoahMP_hrldas_driver.F > module_NoahMP_hrldas_driver.f gfortran -o module_NoahMP_hrldas_driver.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none -I. \ -I../Noah -I../Utility_routines -I/home/HRLDAS/LIBRARIES/netcdf/include module_NoahMP_hrldas_driver.f module_NoahMP_hrldas_driver.f:334.18:
REAL, DIMENSION(MAX_SOIL_LEVELS) :: soil_thick_input ! depth to soil in 1 Error: Expression at (1) must be of INTEGER type, found REAL module_NoahMP_hrldas_driver.f:334.18:
REAL, DIMENSION(MAX_SOIL_LEVELS) :: soil_thick_input ! depth to soil in 1 Error: Expression at (1) must be of INTEGER type, found REAL module_NoahMP_hrldas_driver.f:334.54:
REAL, DIMENSION(MAX_SOIL_LEVELS) :: soil_thick_input ! depth to soil in 1 Error: The module or main program array 'soil_thick_input' at (1) must have constant shape make[1]: [module_NoahMP_hrldas_driver.o] Error 1 make[1]: Leaving directory `/home/HRLDAS/src/HRLDAS-v3.6/IO_code' make: [all] Error 2
Any thoughts? Really appreciate your help, in advance. Thanks, MIshel
The error seems to be associated with netcdf library. I updated netcdf library by installing both netcdf-fortran and netcdf-c library and that worked for me. I think HRLDAS need both libraries of netcdf.
And some errors are also associated with OS specific which need some exploration on useful resources e. g. user forum of ubuntu/fedora/debian or whatever OS any body uses.
I hope this may help you.
Dr Dinesh
Hi! I Don't remember exactly what I did to solve the issue, but I think it had a lot to do with the netcdf libraries, as dineshjnu2020 said. I also made some changes in the user_build_options file, here is the configuration I'm using:
COMPILERF90 = /usr/bin/gfortran-7 FREESOURCE = -ffree-form -ffree-line-length-none F90FLAGS = -g -fconvert=big-endian -fbounds-check -fno-range-check MODFLAG = -I LDFLAGS = CPP = /usr/bin/cpp-7 CPPFLAGS = -P -traditional -DGFORTRAN # -D_HRLDASURBAN LIBS = LIBJASPER = -ljpeg -L/usr/local/lib -ljasper INCJASPER = -I/usr/local/include/jasper NETCDFMOD = -I/usr/local/include NETCDFLIB = -L/usr/local/lib -lnetcdf -lnetcdff BZIP2 = YES BZIP2_LIB = -lbz2 BZIP2_INCLUDE = -I/usr/local/include RM = rm -f CC = /usr/bin/gcc-7
After addressing both questions I manage to install the model, the only error that I get now is when I try to run the model with the dynamic vegetation option turned on.
I hope this information can be useful.
Hi Dinesh and Hugo: First of all, thank again for your feedback! I tried to install updated versions of netcdf (netcdf c an fortran) and finally, my user_build_options file remains as follow:
COMPILERF90 = gfortran FREESOURCE = -ffree-form -ffree-line-length-none F90FLAGS = -g -fconvert=big-endian -fbounds-check -fno-range-check MODFLAG = -I LDFLAGS = CPP = cpp CPPFLAGS = -C -P -traditional -DGFORTRAN # -D_HRLDASURBAN LIBS = LIBJASPER = -ljpeg -L/usr/lib64/ -ljasper INCJASPER = -I/usr/include NETCDFMOD = -I/usr/lib64/gfortran/modules/ NETCDFLIB = -L/usr/lib64/ -lnetcdf -lnetcdff BZIP2 = YES BZIP2_LIB = -lbz2 BZIP2_INCLUDE = -I/usr/include RM = rm -f CC = cc
But still, my outputs are:
[root@3b14ea545daf HRLDAS-v3.6]# make
(cd Utility_routines; make)
make[1]: Entering directory /home/HRLDAS/HRLDAS-v3.6/Utility_routines' make[1]: Nothing to be done for
all'.
make[1]: Leaving directory /home/HRLDAS/HRLDAS-v3.6/Utility_routines' (cd Noah; make) make[1]: Entering directory
/home/HRLDAS/HRLDAS-v3.6/Noah'
make[1]: Nothing to be done for all'. make[1]: Leaving directory
/home/HRLDAS/HRLDAS-v3.6/Noah'
(cd IO_code; make)
make[1]: Entering directory `/home/HRLDAS/HRLDAS-v3.6/IO_code'
rm -f module_NoahMP_hrldas_driver.f cpp -C -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_NoahMP_hrldas_driver.F > module_NoahMP_hrldas_driver.f gfortran -o module_NoahMP_hrldas_driver.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -ffree-form -ffree-line-length-none -I. \ -I../Noah -I../Utility_routines -I/usr/lib64/gfortran/modules/ module_NoahMP_hrldas_driver.f module_NoahMP_hrldas_driver.f:334.18:
REAL, DIMENSION(MAX_SOIL_LEVELS) :: soil_thick_input ! depth to soil in 1 Error: Expression at (1) must be of INTEGER type, found REAL module_NoahMP_hrldas_driver.f:334.18:
REAL, DIMENSION(MAX_SOIL_LEVELS) :: soil_thick_input ! depth to soil in 1 Error: Expression at (1) must be of INTEGER type, found REAL module_NoahMP_hrldas_driver.f:334.54:
REAL, DIMENSION(MAX_SOIL_LEVELS) :: soil_thick_input ! depth to soil in 1 Error: The module or main program array 'soil_thick_input' at (1) must have constant shape make[1]: [module_NoahMP_hrldas_driver.o] Error 1 make[1]: Leaving directory `/home/HRLDAS/HRLDAS-v3.6/IO_code' make: [all] Error 2
Previously, I've tried with Ubuntu 20.04 and I had the same results. Therefore, this new version was run in CentOS 7. as is suggested in the manual available for HRLDAS version 3.4.
Any another suggestion, is more than welcome! Have a nice day, Mishel
I would suggest to check your user_build_options carefully so that compilation can get all the libraries (GCC, GFOTRAN and other associated Libs).
I have used the following options:
COMPILERF90 = /usr/bin/gfortran FREESOURCE = -ffree-form -ffree-line-length-none F90FLAGS = -g -fconvert=big-endian -fbounds-check -fno-range-check MODFLAG = -I LDFLAGS = -L/usr/lib64 CPP = /usr/bin/cpp CPPFLAGS = -I/usr/include -I -C -P -traditional -DGFORTRAN # -D_HRLDASURBAN LIBS = LIBJASPER = -ljpeg -L/home/supplibs/lib -ljasper INCJASPER = -I/home/supplibs/include NETCDFMOD = -I/home/supplibs/include NETCDFLIB = -L/home/supplibs/lib -lnetcdf -lnetcdff BZIP2 = NO BZIP2_LIB = -lbz2 BZIP2_INCLUDE = -I/home/supplibs/include RM = rm -f CC = /usr/bin/gcc
There is another way to set all the paths for libs, include and bins in your bash environment so that the HRLDAS can get these locations by default. CENTOS 8 may respond better.
Hope, this may work.
Dr Dinesh
Dear all,
I had similar problems installing HRLDAS. In my case, it came all down to the installation of the netcdf and jasper libraries. Using newer netcdf-c (4.7.4) and netcdf-fortran (4.5.2) libraries and fiddling around with the configure options solved the netcdf issues. For Jasper, I used the old version (1.900.1) and it only worked when I installed it with the option --disable-libjpeg.
Now all executables work, but I am still wondering if this was the right way.
May I ask how you installed netcdf and Jasper libraries?
Best regards, Julian
This works for me:
Change "LIBJASPER = -ljpeg -L/home/supplibs/lib -ljasper" to "LIBJASPER = -L/home/supplibs/lib -ljasper -ljpeg"
After that change, everything works smoothly. One important lesson I took is always put the dependencies in the back when compiling things! Hope it helps.
Can someone kindly tell me , what is the size of the executable hrldas.exe , after installation? for my case it is 2.1mb . I have denied the bzip2 option.
The size of hrldas.exe executable I got is about 7.7 mb.
Can someone kindly tell me , what is the size of the executable hrldas.exe , after installation? for my case it is 2.1mb . I have denied the bzip2 option.
Can u share the user_build_option file. Please tell me the version you are using ??
Can u share the user_build_option file. Please tell me the version you are using ??
Sure - I am using intel compiler:
COMPILERF90 = mpif90 MPPFLAG = YES FREESOURCE = -free F90FLAGS = -convert big_endian -g -O0 -fpe0 # -traceback MODFLAG = -I ../MPP HYDRO_LIB = ../MPP/mpp_land.o ../MPP/CPL_WRF.o LDFLAGS = CPP = cpp CPPFLAGS = -P -traditional -DMPP_LAND # -DSPATIAL_SOIL LIBS = LIBJASPER = -ljasper INCJASPER = -I/usr/include/jasper NETCDFMOD = -I/glade/u/apps/derecho/23.06/spack/opt/spack/netcdf/4.9.2/oneapi/2023.0.0/iijr/include NETCDFLIB = -L/glade/u/apps/derecho/23.06/spack/opt/spack/netcdf/4.9.2/oneapi/2023.0.0/iijr/lib -lnetcdf -lnetcdff BZIP2 = NO
RM = rm -f CC = cc
Note I also don't use BZIP2 (BZIP2=NO).
HELLO I want to install the hrldas 3.7.1 in my Ubuntu 17.04 . I choose the gfortran for my linux system, I modify the "user_build_options"like this
COMPILERF90 = /usr/bin/gfortran-7 FREESOURCE = -ffree-form -ffree-line-length-none F90FLAGS = -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring MODFLAG = -I LDFLAGS =
CPP = /usr/bin/cpp-6 CPPFLAGS = -P -traditional -DGFORTRAN # -D_HRLDASURBAN LIBS =
LIBJASPER = -ljpeg -L/usr/local/JASPER/lib -ljasper INCJASPER = -I/usr/local/JASPER/include NETCDFMOD = -I/usr/local/netcdf/include NETCDFLIB = -L/usr/local/netcdf/lib -lnetcdf -lnetcdff BZIP2 = NO BZIP2_LIB = -lbz2 BZIP2_INCLUDE = -I/opt/local/include RM = rm -f CC = /usr/bin/gcc-6
But when I type 'make' . I encountered an error like this
lxr@ubuntu:~/hrldas-release-3.7.1/HRLDAS$ make (cd Utility_routines; make) make[1]: Entering directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/Utility_routines'
rm -f module_date_utilities.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_date_utilities.F > module_date_utilities.f90 /usr/bin/gfortran-7 -o module_date_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none module_date_utilities.f90
rm -f module_model_constants.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_model_constants.F > module_model_constants.f90 /usr/bin/gfortran-7 -o module_model_constants.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none module_model_constants.f90
rm -f module_wrf_utilities.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_wrf_utilities.F > module_wrf_utilities.f90 /usr/bin/gfortran-7 -o module_wrf_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none module_wrf_utilities.f90
rm -f kwm_string_utilities.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE kwm_string_utilities.F > kwm_string_utilities.f90 /usr/bin/gfortran-7 -o kwm_string_utilities.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none kwm_string_utilities.f90
make[1]: Leaving directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/Utility_routines' (cd phys; make) make[1]: Entering directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/phys'
rm -f module_sf_noahmplsm.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_sf_noahmplsm.F > module_sf_noahmplsm.f90 /usr/bin/gfortran-7 -o module_sf_noahmplsm.o -c -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none module_sf_noahmplsm.f90
rm -f module_sf_noahmp_glacier.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_sf_noahmp_glacier.F > module_sf_noahmp_glacier.f90 /usr/bin/gfortran-7 -o module_sf_noahmp_glacier.o -c -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none module_sf_noahmp_glacier.f90
rm -f module_sf_noahmp_groundwater.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_sf_noahmp_groundwater.F > module_sf_noahmp_groundwater.f90 /usr/bin/gfortran-7 -o module_sf_noahmp_groundwater.o -c -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none module_sf_noahmp_groundwater.f90
rm -f module_sf_noahmpdrv.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_sf_noahmpdrv.F > module_sf_noahmpdrv.f90 /usr/bin/gfortran-7 -o module_sf_noahmpdrv.o -c -I../Utility_routines -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none module_sf_noahmpdrv.f90
make[1]: Leaving directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/phys' (cd IO_code; make) make[1]: Entering directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/IO_code'
rm -f module_hrldas_netcdf_io.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE -I/usr/local/netcdf/include module_hrldas_netcdf_io.F > module_hrldas_netcdf_io.f90 /usr/bin/gfortran-7 -o module_hrldas_netcdf_io.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none -I ../MPP -I../Utility_routines -I/usr/local/netcdf/include module_hrldas_netcdf_io.f90
rm -f module_NoahMP_hrldas_driver.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE module_NoahMP_hrldas_driver.F > module_NoahMP_hrldas_driver.f90 /usr/bin/gfortran-7 -o module_NoahMP_hrldas_driver.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none -I -I. \ -I../phys -I../Utility_routines -I/usr/local/netcdf/include module_NoahMP_hrldas_driver.f90 f951: Warning: Nonexistent include directory ‘-I.’ [-Wmissing-include-dirs]
rm -f main_hrldas_driver.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -D_HRLDASOFFLINE main_hrldas_driver.F > main_hrldas_driver.f90 /usr/bin/gfortran-7 -o main_hrldas_driver.o -c -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -ffree-form -ffree-line-length-none -I ../MPP -I. \ -I../phys -I../Utility_routines -I/usr/local/netcdf/include main_hrldas_driver.f90
make[1]: Leaving directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/IO_code' (cd run; make) make[1]: Entering directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/run'
echo " -Wl,-rpath, -L -lhdf5 -lz" -Wl,-rpath, -L -lhdf5 -lz /usr/bin/gfortran-7 -o hrldas.exe -I../IO_code -I../phys ../IO_code/main_hrldas_driver.o ../IO_code/module_hrldas_netcdf_io.o ../phys/module_sf_noahmpdrv.o ../phys/module_sf_noahmplsm.o ../phys/module_sf_noahmp_glacier.o ../phys/module_sf_noahmp_groundwater.o ../Utility_routines/module_wrf_utilities.o ../Utility_routines/module_model_constants.o ../Utility_routines/module_date_utilities.o ../Utility_routines/kwm_string_utilities.o ../IO_code/module_NoahMP_hrldas_driver.o -L/usr/local/netcdf/lib -lnetcdf -lnetcdff
make[1]: Leaving directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/run' (cd HRLDAS_forcing; make) make[1]: Entering directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing' (cd lib; make) make[2]: Entering directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib'
rm -f module_grib2_tables.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO module_grib2_tables.F > module_grib2_tables.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include module_grib2_tables.f90
rm -f module_mapinfo.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO module_mapinfo.F > module_mapinfo.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include module_mapinfo.f90
rm -f kwm_date_utilities.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO kwm_date_utilities.F > kwm_date_utilities.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include kwm_date_utilities.f90
rm -f module_grib_common.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO module_grib_common.F > module_grib_common.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include module_grib_common.f90
rm -f module_grib1.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO module_grib1.F > module_grib1.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include module_grib1.f90
rm -f module_grib2.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO module_grib2.F > module_grib2.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include module_grib2.f90
rm -f trig_degrees.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO trig_degrees.F > trig_degrees.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include trig_degrees.f90
rm -f module_llxy.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO module_llxy.F > module_llxy.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include module_llxy.f90
rm -f module_input_data_structure.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO module_input_data_structure.F > module_input_data_structure.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include module_input_data_structure.f90
rm -f arguments_module.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO arguments_module.F > arguments_module.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include arguments_module.f90
rm -f gbytesys.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO gbytesys.F > gbytesys.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include gbytesys.f90
rm -f swap4f.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO swap4f.F > swap4f.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include swap4f.f90 /usr/bin/gcc-6 -c -D_BZIP_NO cio.c cio.c:31:15: warning: return type defaults to ‘int’ [-Wimplicit-int]
define copen copen_
cio.c:72:1: note: in expansion of macro ‘copen’ copen(nunit, name, mode, err, oflag) ^~~~~ cio.c:36:16: warning: return type defaults to ‘int’ [-Wimplicit-int]
define bnseek bnseek_
cio.c:148:1: note: in expansion of macro ‘bnseek’ bnseek(fd, bread, mode, iprint) ^
~cio.c: In function ‘bnseek_’: cio.c:179:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘off_t {aka long int}’ [-Wformat=] printf(" lseek return=%d, mode=%d\n", i, mode); ^ cio.c: At top level: cio.c:33:16: warning: return type defaults to ‘int’ [-Wimplicit-int]define bnread bnread_
cio.c:186:1: note: in expansion of macro ‘bnread’ bnread(fd, buf, nbuf, bread, ios, idiag) ^
~cio.c:34:16: warning: return type defaults to ‘int’ [-Wimplicit-int]define bnwrit bnwrit_
cio.c:237:1: note: in expansion of macro ‘bnwrit’ bnwrit(fd, buf, nbuf, bwritten, err, idiag) ^
~cio.c:32:16: warning: return type defaults to ‘int’ [-Wimplicit-int]define cclose cclose_
cio.c:271:1: note: in expansion of macro ‘cclose’ cclose(nunit, iprint, err) ^
~rm -f kwm_grid_utilities.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO kwm_grid_utilities.F > kwm_grid_utilities.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include kwm_grid_utilities.f90
rm -f kwm_timing_utilities.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO kwm_timing_utilities.F > kwm_timing_utilities.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include kwm_timing_utilities.f90
rm -f kwm_string_utilities.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO kwm_string_utilities.F > kwm_string_utilities.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include kwm_string_utilities.f90 /usr/bin/gcc-6 -c swap4c.c
rm -f get_unused_unit.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO get_unused_unit.F > get_unused_unit.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include get_unused_unit.f90 /usr/bin/gcc-6 -c -I/usr/local/JASPER/include decode_jpeg2000.c /usr/bin/gcc-6 -c -D_BZIP_NO io_f.c
rm -f module_grib.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO module_grib.F > module_grib.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include module_grib.f90
rm -f module_geo_em.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN -DBIT32 -D_BZIP_NO module_geo_em.F > module_geo_em.f90 /usr/bin/gfortran-7 -c -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I/usr/local/netcdf/include module_geo_em.f90 rm -f libsmda.a ar q libsmda.a module_grib2.o module_grib2_tables.o trig_degrees.o module_input_data_structure.o arguments_module.o gbytesys.o swap4f.o module_llxy.o cio.o kwm_date_utilities.o kwm_grid_utilities.o kwm_timing_utilities.o kwm_string_utilities.o swap4c.o get_unused_unit.o decode_jpeg2000.o io_f.o module_mapinfo.o module_grib1.o module_grib.o module_grib_common.o module_geo_em.o ar: creating libsmda.a make[2]: Leaving directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib' (make -f Makefile all) make[2]: Entering directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing'
rm -f create_forcing.f90 /usr/bin/cpp-6 -P -traditional -DGFORTRAN create_forcing.F > create_forcing.f90 /usr/bin/gfortran-7 -ffree-form -ffree-line-length-none -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -c -I/usr/local/netcdf/include -I./lib -I./lib create_forcing.f90 (cd lib; make) make[3]: Entering directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib' make[3]: Nothing to be done for 'all'. make[3]: Leaving directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib' /usr/bin/gfortran-7 -o create_forcing.exe -I./lib -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring -I./lib create_forcing.o \ -L./lib -lsmda -L/usr/local/netcdf/lib -lnetcdf -lnetcdff -ljpeg -L/usr/local/JASPER/lib -ljasper ./lib/libsmda.a(module_grib2.o): In function
__module_grib2_MOD_fortran_decode_jpeg2000': /home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib/module_grib2.f90:148: undefined reference to
info_jpeg2000' /home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib/module_grib2.f90:156: undefined reference todecode_jpeg2000' ./lib/libsmda.a(module_grib.o): In function
module_grib_MOD_findgrib': /home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib/module_grib.f90:186: undefined reference toio_fread' /home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib/module_grib.f90:203: undefined reference to
io_fread' /home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib/module_grib.f90:223: undefined reference toio_fread' /home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib/module_grib.f90:280: undefined reference to
io_ftell' ./lib/libsmda.a(module_grib.o): In function `module_grib_MOD_getgrib': /home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib/module_grib.f90:114: undefined reference toio_fread' ./lib/libsmda.a(module_grib.o): In function
__module_grib_MOD_gribclose': /home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib/module_grib.f90:77: undefined reference toc_close' ./lib/libsmda.a(module_grib.o): In function
__module_grib_MOD_gribopen': /home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing/lib/module_grib.f90:67: undefined reference to `c_gribopen' collect2: error: ld returned 1 exit status Makefile:28: recipe for target 'create_forcing.exe' failed make[2]: [create_forcing.exe] Error 1 make[2]: Leaving directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing' Makefile:12: recipe for target 'default' failed make[1]: [default] Error 2 make[1]: Leaving directory '/home/lxr/hrldas-release-3.7.1/HRLDAS/HRLDAS_forcing' Makefile:8: recipe for target 'all' failed make: *** [all] Error 2”undefined reference to `info_jpeg2000' “ I don't know how to solve these undefined reference problems.
I have not changed any other code. So I hope you an solve my problem.
By the way ,I can successfully install the HRLDAS-3.6 in my conputer.(didn't change the gnu,netcdf,jasper et al)
I'm looking forward to your reply. Many thanks and best wishes!
liuxiaoran