MEGAN pre-processor installing and compillng

Posts related to the installation of WRF Chemistry

MEGAN pre-processor installing and compillng

Postby jwsmith9 » Thu Sep 05, 2013 3:44 pm

I get the series of error statements below when I execute the following the command below. The compilation seems to do fine all the way up to the forming the bio_emiss.f90 files. Does anyone have experience with compiling MEGAN with gfortran.

./make_util megan_bio_emiss
=============================================================================
Using /usr/bin/gfortran fortran compiler
=============================================================================
=============================================================================
netcdf top level directory = /data/starfs1/libs/netcdf-4.1.3
=============================================================================
/usr/bin/gfortran -g -c -I/data/starfs1/libs/netcdf-4.1.3/include misc_definitions_module.f90
/usr/bin/gfortran -g -c -I/data/starfs1/libs/netcdf-4.1.3/include constants_module.f90
/usr/bin/gfortran -g -c -I/data/starfs1/libs/netcdf-4.1.3/include bio_types.f90
/usr/bin/gfortran -g -c -I/data/starfs1/libs/netcdf-4.1.3/include area_mapper.f90
/usr/bin/gfortran -g -c -I/data/starfs1/libs/netcdf-4.1.3/include bio_emiss.f90
bio_emiss.f90:1231.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_byte ), message
1
Error: Syntax error in argument list at (1)
bio_emiss.f90:1231.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_byte ), message
1
Warning: Line truncated at (1)
bio_emiss.f90:1235.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_short ), message
1
Error: Syntax error in argument list at (1)
bio_emiss.f90:1235.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_short ), message
1
Warning: Line truncated at (1)
bio_emiss.f90:1237.132:

al, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_int ), message )
1
Warning: Line truncated at (1)
bio_emiss.f90:1239.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_real ), message
1
Error: Syntax error in argument list at (1)
bio_emiss.f90:1239.132:

bal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_real ), message
1
Warning: Line truncated at (1)
bio_emiss.f90:1241.132:

lobal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_dbl ), message
1
Error: Syntax error in argument list at (1)
bio_emiss.f90:1241.132:

lobal, attr_name(:slen), attr_xtype, attr_len, attrs(m)%attr_dbl ), message
1
Warning: Line truncated at (1)
make: *** [bio_emiss.o] Error 1
Failed to build megan_bio_emiss


Thanks,
Jonathan
jwsmith9
 
Posts: 7
Joined: Tue Jun 19, 2012 12:19 pm

Re: MEGAN pre-processor installing and compillng

Postby Guido_c » Thu Oct 12, 2017 11:31 am

Hello everyone,

I have a similar problem with MEGAN, could you solve it? let me know please.
My problem is that when I try to execute make_util megan_bio_emiss the executable is not generated. My error is as follows:
=============================================================================
Using gfortran fortran compiler
=============================================================================
=============================================================================
netcdf top level directory = /home/guido/Build_WRF/LIBRARIES/netcdf
=============================================================================
gfortran -g -ffree-line-length-none -c -I/home/guido/Build_WRF/LIBRARIES/netcdf/include misc_definitions_module.f90
gfortran -g -ffree-line-length-none -c -I/home/guido/Build_WRF/LIBRARIES/netcdf/include constants_module.f90
gfortran -g -ffree-line-length-none -c -I/home/guido/Build_WRF/LIBRARIES/netcdf/include bio_types.f90
gfortran -g -ffree-line-length-none -c -I/home/guido/Build_WRF/LIBRARIES/netcdf/include area_mapper.f90
gfortran -g -ffree-line-length-none -c -I/home/guido/Build_WRF/LIBRARIES/netcdf/include bio_emiss.f90
gfortran -o megan_bio_emiss misc_definitions_module.o constants_module.o bio_types.o area_mapper.o bio_emiss.o -L/home/guido/Build_WRF/LIBRARIES/netcdf/lib -lnetcdf -lnetcdff
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-attio.o): In function `nf_put_att_text_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-attio.c:14: undefined reference to `nc_put_att_text'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-attio.o): In function `nf_get_att_text_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-attio.c:21: undefined reference to `nc_get_att_text'
//
//
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-lib.o): In function `f2c_counts':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-lib.c:116: undefined reference to `nc_inq_varndims'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-lib.o):/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-lib.c:138: more undefined references to `nc_inq_varndims' follow
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-misc.o): In function `nf_inq_libvers_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-misc.c:20: undefined reference to `nc_inq_libvers'
//
//
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-varaio.o): In function `nf_put_vara_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-varaio.c:160: undefined reference to `nc_put_vara'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-varaio.o): In function `nf_get_vara_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-varaio.c:163: undefined reference to `nc_get_vara'
collect2: error: ld returned 1 exit status
Makefile:45: recipe for target 'megan_bio_emiss' failed
make: *** [megan_bio_emiss] Error 1
Failed to build megan_bio_emiss

I installed netcdf using the manual compiling wrf (with precompiled code netcdf-4.1.3).
I have netcdf library installed on the correct path, I do not understand what the problem is with the library.
Could someone please help me?

This is my .tcshrc here my set environmental:

    ############# NCL variables #################

    setenv NCARG_ROOT /usr/local/ncl-6.3.0
    setenv PATH $NCARG_ROOT/bin:$PATH

    ################### NETCDF #########################

    setenv LD_LIBRARY_PATH
    setenv LD_LIBRARY_PATH /home/guido/Build_WRF/LIBRARIES/netcdf/lib:LD_LIBRARY_PATH

    ############# HDF5 variables #################

    setenv HDF5_LIBS /usr/lib/x86_64-linux-gnu
    setenv LD_LIBRARY_PATH
    setenv LD_LIBRARY_PATH /usr/local/hdf5-1.10.1/hdf5/lib:$LD_LIBRARY_PATH

    #######################################################

    ####### Set environment variables for NetCDF #######

    setenv DIR /home/guido/Build_WRF/LIBRARIES
    setenv CC gcc
    setenv CXX g++
    setenv FC gfortran
    setenv FCFLAGS -m64
    setenv F77 gfortran
    setenv F90 gfortran
    setenv FFLAGS -m64
    setenv PATH $DIR/netcdf/bin:$PATH
    setenv NETCDF $DIR/netcdf
    setenv NETCDF_DIR $DIR/netcdf

    #######################################################

    ####### Set environment variables for Mpich #######
    # This library is necessary to build WRF in parallel

    setenv PATH $DIR/mpich/bin:$PATH

    #######################################################

    ### Set environment variables for zlib, libpng, and JasPer ###
    # A compression library necessary for compiling WPS
    # (specifically ungrib) with GRIB2 capability

    setenv LDFLAGS -L$DIR/grib2/lib
    setenv CPPFLAGS -I$DIR/grib2/include

    #######################################################

    ####### Set environment variables for JasPer ######

    setenv JASPERLIB $DIR/grib2/lib
    setenv JASPERINC $DIR/grib2/include

    #######################################################

    ######## Set environment variables for WRF ########

    setenv WRFIO_NCD_LARGE_FILE_SUPPORT 1

    #######################################################

    ##### Set environment variables for WRF-Chem ######

    setenv WRF_EM_CORE 1
    setenv EM_CORE 1
    setenv NMM_CORE 0
    setenv WRF_CHEM 1
    setenv WRF_KPP 0
    setenv YACC '/usr/bin/yacc -d'
    setenv FLEX_LIB_DIR /usr/lib/x86_64-linux-gnu
    setenv PATH /usr/lib:$PATH

Best,
Guido
Guido_c
 
Posts: 6
Joined: Tue Mar 14, 2017 3:18 pm
Location: Argentina

Re: MEGAN pre-processor installing and compillng

Postby kwthomas » Thu Oct 12, 2017 6:29 pm

Hi Guido...

Your gfortran code is looking for "nc_put_att_text_" and your netcdf (C) library is using
"nc_put_att_text", without the trailing underscore.

Check the instructions for building libnetcdf.a and libnetcdff.a and see if there is a way to handle this.

If not, rebuld your netcdff library to use "-fno-underscoring" when compiling. Do the same
for WRF.
Kevin W. Thomas
Center for Analysis and Prediction of Storms
University of Oklahoma
kwthomas
 
Posts: 279
Joined: Thu Aug 07, 2008 6:53 pm

Re: MEGAN pre-processor installing and compillng

Postby changminjiang » Tue Jun 07, 2022 5:38 am

Hellow sir I've met the same problem :
area_mapper.o: In function `handle_ncerr':
/scratch/sahir/largefile/MEGAN/area_mapper.f90:1855: undefined reference to `nf_strerror_'
area_mapper.o: In function `__area_mapper_MOD_area_interp':
/scratch/sahir/largefile/MEGAN/area_mapper.f90:242: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/area_mapper.f90:244: undefined reference to `nf_get_var_int2_'
bio_emiss.o: In function `handle_ncerr':
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1283: undefined reference to `nf_strerror_'
bio_emiss.o: In function `set_bioemiss_glb_atts':
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1231: undefined reference to `nf_put_att_int1_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1233: undefined reference to `nf_put_att_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1235: undefined reference to `nf_put_att_int2_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1237: undefined reference to `nf_put_att_int_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1239: undefined reference to `nf_put_att_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1241: undefined reference to `nf_put_att_double_'
bio_emiss.o: In function `get_bioemiss_glb_atts':
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1134: undefined reference to `nf_inq_natts_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1152: undefined reference to `nf_inq_attname_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1155: undefined reference to `nf_inq_att_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1165: undefined reference to `nf_get_att_int1_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1168: undefined reference to `nf_get_att_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1175: undefined reference to `nf_get_att_int2_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1182: undefined reference to `nf_get_att_int_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1189: undefined reference to `nf_get_att_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1196: undefined reference to `nf_get_att_double_'
bio_emiss.o: In function `write_bioemiss_attributes':
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1096: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1098: undefined reference to `nf_put_att_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1100: undefined reference to `nf_put_att_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1102: undefined reference to `nf_put_att_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1104: undefined reference to `nf_put_att_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1107: undefined reference to `nf_put_att_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1110: undefined reference to `nf_put_att_int_'
bio_emiss.o: In function `write_bioemiss':
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:894: undefined reference to `nf_create_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:900: undefined reference to `nf_def_dim_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:902: undefined reference to `nf_def_dim_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:904: undefined reference to `nf_def_dim_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:906: undefined reference to `nf_def_dim_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:908: undefined reference to `nf_def_dim_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:915: undefined reference to `nf_def_var_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:918: undefined reference to `nf_def_var_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:920: undefined reference to `nf_def_var_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:922: undefined reference to `nf_def_var_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:924: undefined reference to `nf_def_var_'
bio_emiss.o:/scratch/sahir/largefile/MEGAN/bio_emiss.f90:926: more undefined references to `nf_def_var_' follow
bio_emiss.o: In function `write_bioemiss':
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1005: undefined reference to `nf_put_att_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1011: undefined reference to `nf_put_att_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1014: undefined reference to `nf_put_att_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1023: undefined reference to `nf_enddef_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1031: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1033: undefined reference to `nf_put_vara_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1037: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1039: undefined reference to `nf_put_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1041: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1043: undefined reference to `nf_put_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1045: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1047: undefined reference to `nf_put_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1049: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1051: undefined reference to `nf_put_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1053: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1055: undefined reference to `nf_put_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1057: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1059: undefined reference to `nf_put_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1061: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1063: undefined reference to `nf_put_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1070: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1072: undefined reference to `nf_put_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1074: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1076: undefined reference to `nf_put_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1078: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1080: undefined reference to `nf_put_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:1086: undefined reference to `nf_close_'
bio_emiss.o: In function `megan2_bioemiss':
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:454: undefined reference to `nf_open_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:459: undefined reference to `nf_inq_dimid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:461: undefined reference to `nf_inq_dimlen_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:463: undefined reference to `nf_inq_dimid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:465: undefined reference to `nf_inq_dimlen_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:483: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:485: undefined reference to `nf_get_var_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:499: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:501: undefined reference to `nf_get_var_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:782: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:788: undefined reference to `nf_get_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:794: undefined reference to `nf_get_vara_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:863: undefined reference to `nf_close_'
bio_emiss.o: In function `wrf_file':
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:287: undefined reference to `nf_open_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:292: undefined reference to `nf_inq_dimid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:294: undefined reference to `nf_inq_dimlen_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:296: undefined reference to `nf_inq_dimid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:298: undefined reference to `nf_inq_dimlen_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:303: undefined reference to `nf_get_att_int_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:309: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:316: undefined reference to `nf_get_var_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:320: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:322: undefined reference to `nf_get_var_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:332: undefined reference to `nf_get_att_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:335: undefined reference to `nf_get_att_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:338: undefined reference to `nf_get_att_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:341: undefined reference to `nf_get_att_real_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:344: undefined reference to `nf_get_att_real_'
bio_emiss.o:/scratch/sahir/largefile/MEGAN/bio_emiss.f90:347: more undefined references to `nf_get_att_real_' follow
bio_emiss.o: In function `wrf_file':
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:362: undefined reference to `nf_inq_varid_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:364: undefined reference to `nf_get_var_text_'
/scratch/sahir/largefile/MEGAN/bio_emiss.f90:380: undefined reference to `nf_close_'
collect2: error: ld returned 1 exit status
make: *** [megan_bio_emiss] Error 1
Failed to build megan_bio_emiss
thanks a lot in advance for help
changminjiang
 
Posts: 1
Joined: Tue Jun 07, 2022 5:28 am


Return to Installation

Who is online

Users browsing this forum: No registered users and 2 guests