Problem with MEGAN compiling

415 views
Skip to first unread message

s.e.ne...@gmail.com

unread,
Oct 3, 2017, 6:08:42 PM10/3/17
to wrf-chem-bio_emiss

Hello everyone,

 

I have faced a problem in compiling MEGAN model. I have loaded required libraries (NETcdf and PGI compiler). However,

> make_util megan_bio_emiss

command still doesn't work. The error is:

command not found.

I have tried other ways such as 
> make -f make_util
and also other ways but I cannot compile MEGAN yet. I was wondering if anyone had similar problem and could help me to find how can I compile MEGAN.
Thanks in advance for your help.


Best,

Soroush

Stacy Walters

unread,
Oct 3, 2017, 9:57:08 PM10/3/17
to s.e.ne...@gmail.com, wrf-chem-bio_emiss
Soroush,

Please try the command:

./make_util megan_bio_emiss

Stacy

Soroush E. Neyestani

unread,
Oct 4, 2017, 10:59:57 AM10/4/17
to Stacy Walters, wrf-chem-bio_emiss
Thank you for the reply Stacy. But it doesn't help. Now the permission denied error appears. I have also tried it on my personal computer as root, but I received the same error. So I think the problem might be from the code and not from the user access.
I would appreciate it if you can give other suggestions for this problem.

Thanks,
Soroush

Stacy Walters

unread,
Oct 4, 2017, 11:02:36 AM10/4/17
to Soroush E. Neyestani, wrf-chem-bio_emiss
Soroush,

The error you are getting is a system level error.  Basically the op system can not find
the command

make_util

Can you verify that this script file, make_util, is in the directory you are trying to run from.

I assure you this is not an error with the code.

Stacy

Soroush E. Neyestani

unread,
Oct 4, 2017, 11:41:26 AM10/4/17
to Stacy Walters, wrf-chem-bio_emiss
Yes, make_util script file is in the run directory.
Anyway thanks for the comment. I am looking for the solution and I'll share it if find anything.

Soroush

Guido Conto Echeverria

unread,
Oct 5, 2017, 3:31:46 PM10/5/17
to wrf-chem-bio_emiss
Hello
Soroush

If you use ubuntu try to get permissions to the file make_util, with the command


>sudo chmod 777 make_util


Then you run it, it should work.

My problem is that running does not generate the executable megan_bio_emiss. I have configured netcdf correctly, but I do not know why the program looks for another location that I have not written in the make_util and I get the following error:


=============================================================================
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-attio.o): In function `nf_put_att_int1_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-attio.c:29: undefined reference to `nc_put_att_schar'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-attio.o): In function `nf_get_att_int1_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-attio.c:47: undefined reference to `nc_get_att_schar'
\
\
\
\

/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-varaio.o): In function `nf_get_vara_int_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-varaio.c:115: undefined reference to `nc_get_vara_int'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-varaio.o): In function `nf_put_vara_real_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-varaio.c:130: undefined reference to `nc_put_vara_float'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-varaio.o): In function `nf_get_vara_real_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-varaio.c:142: undefined reference to `nc_get_vara_float'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-varaio.o): In function `nf_put_vara_double_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-varaio.c:150: undefined reference to `nc_put_vara_double'
/home/guido/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(fort-varaio.o): In function `nf_get_vara_double_':
/home/guido/Build_WRF/LIBRARIES/netcdf-4.1.3/fortran/fort-varaio.c:157: undefined reference to `nc_get_vara_double'
/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

Someone happened to this by compiling megan bio_emiss, could they help me?
Thank you.

regards,

Guido

s.e.ne...@gmail.com

unread,
Oct 9, 2017, 2:41:59 PM10/9/17
to wrf-chem-bio_emiss
Hi Guido,

Thank you for the comment. for me (on CentOS 6.5) the command for getting permission was a little different:
chmod +x ./make_util
and after that:
./make_util megan_bio_emiss

I had exactly the same error you mentioned on my personal computer (with gfortran compiler). However, when I tried it on another system with PGI compiler, I faced no error. I'm not sure if my compiler (gfortran) is not loaded correctly or the code has problems with gfortran (I have to add that I had no similar problem with compiler for other programs).
Do you have any other system with different compiler?
Sorry that I cannot be more helpful.

Best,
Soroush 

Guido Conto Echeverria

unread,
Oct 9, 2017, 5:21:54 PM10/9/17
to wrf-chem-bio_emiss

Hello Soroush

Very well that you have solved it.

I unfortunately only have fortran compiler, I'll keep trying and reading to see how I can solve it.
Also in the manuals are very persistent in the use of the same compiler for the whole model, so I only have one.

If you know something about MEGAN or MOZART (I have the same problem in both) let me know.

Thank you very much


Best,
Guido
Reply all
Reply to author
Forward
0 new messages