Skip to content

A question about install HRLDAS  #9

Description

@liuxiaoran6

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 -D_GFORTRAN_ # -D_HRLDAS_URBAN_
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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ 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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ 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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ 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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ 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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ 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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ 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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ 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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ 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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ -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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ 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 -D_GFORTRAN_ -D_HRLDAS_OFFLINE_ 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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ -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 -D_GFORTRAN_ 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 to decode_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 to io_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 to io_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 to io_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 to c_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

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