"make_util megan_bio_emiss": not working: command not found!

190 views
Skip to first unread message

SAHIR AZMI

unread,
May 8, 2019, 7:09:16 AM5/8/19
to wrf-chem-bio_emiss
WRF-Chem Emission guide Chapter -3 says this:-


After extracting the file be sure that the correct environment variables for your
FORTRAN compiler and netCDF libraries are set correctly by editing the make_util
script file if necessary. At this point the MEGAN source code in the MEGAN directory
can be compiled by issuing the command:

         > make_util megan_bio_emiss

 I am having files in my MEGAN directory as:-

area_mapper.dbg.f90  constants_module.f90   laiv200302_30sec.nc  laiv200307_30sec.nc  laiv200312_30sec.nc  megan_tutorial.tar.gz        README.bio_emiss
area_mapper.f90      DSW.nc                 laiv200303_30sec.nc  laiv200308_30sec.nc  Makefile             megan_xform.f90              shr200121_30sec.nc
bio_emiss.f90        hrb200121_30sec.nc     laiv200304_30sec.nc  laiv200309_30sec.nc  make_util            misc_definitions_module.f90  surfdata_xform.f90
bio_types.f90        isoall200021_30sec.nc  laiv200305_30sec.nc  laiv200310_30sec.nc  megan_bio_emiss.tar  mozbc.tar                    TAS.nc
btr200121_30sec.nc   laiv200301_30sec.nc    laiv200306_30sec.nc  laiv200311_30sec.nc  megan.data.tar.gz    ntr200121_30sec.nc           wes-coldens.tar

So, following the steps if i issue this command : 
 make_util megan_bio_emiss

 it says:-
 make_util megan_bio_emiss
bash: make_util: command not found...


Please help me out with this!


Xin Zhang

unread,
May 8, 2019, 7:45:33 AM5/8/19
to SAHIR AZMI, wrf-chem-bio_emiss
Hi Sahir,

You need to make it executable by:
chmod +x make_util
Then, it will works.

Another way:
./make_util megan_bio_emiss

Regards,
Xin

--
You received this message because you are subscribed to the Google Groups "wrf-chem-bio_emiss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wrf-chem-bio_em...@ucar.edu.

SAHIR AZMI

unread,
May 8, 2019, 3:33:21 PM5/8/19
to wrf-chem-bio_emiss, sinis...@gmail.com
I issued that command the way you told

Still, nothing is happening

I have attached a file as an attachment pic here , showing how does my file setup looks like, 
so that way you can understand it more clearly. Have a look at that pic.

Please help me!
1.PNG

Stacy Walters

unread,
May 8, 2019, 9:30:25 PM5/8/19
to SAHIR AZMI, wrf-chem-bio_emiss
Sahir,

Please return to me as attachments the following files:

make_util
Makefile

Stacy

SAHIR AZMI

unread,
May 9, 2019, 7:50:59 AM5/9/19
to wrf-chem-bio_emiss, sinis...@gmail.com

These are the files:
Makefile
Screenshot from 2019-05-09 10-24-53.png

Stacy Walters

unread,
May 9, 2019, 9:56:57 AM5/9/19
to SAHIR AZMI, wrf-chem-bio_emiss
Sahir,

It seems that the make_util file you attached is empty(size=0).  I've attached my
working make_util.  Please retrieve the file, make sure it has "execute" permission,
and then issue ./make_util ... .

Stacy

On Thu, May 9, 2019 at 7:51 AM SAHIR AZMI <sinis...@gmail.com> wrote:

These are the files:
make_util

SAHIR AZMI

unread,
May 10, 2019, 5:11:29 AM5/10/19
to wrf-chem-bio_emiss, sinis...@gmail.com
I placed the make_util file given by you in my directory alongwith my makefile.

Tried to make it executable by chmod +x command.

Still, its giving some errors. I have attached the output of the screenshots

Please , have a look!


2.PNG
1.PNG

SAHIR AZMI

unread,
May 10, 2019, 5:47:43 AM5/10/19
to wrf-chem-bio_emiss, sinis...@gmail.com

Ok, I have given the path to the netcdf library and it proceeded.

But now there is this another error showing up, please have a look :


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


Karen Lima

unread,
May 30, 2023, 10:23:21 AM5/30/23
to wrf-chem-bio_emiss, SAHIR AZMI
Hi, how are you? I had the same problem and the solution was to edit the MEGAN folder's make_util file in the following lines:

gedit make_util &
line 90: set ar_libs = -lnetcdf i changed it to -lnetcdff
line 92: set ar_libs = "${ar_libs} -lnetcdf" I added the -lnetcdff and it looks like this set ar_libs = "${ar_libs} -lnetcdf -lnetcdff".

I did ./make_util megan_bio_emiss again and it worked.

++++++++++++++++++++++
megan_bio_emiss build Ok
++++++++++++++++++++++

Hope it's useful! 

Reply all
Reply to author
Forward
0 new messages