Main menu

Navigation

Generate Domain Files Issue

7 posts / 0 new
Last post
veera.atmsc@...
Generate Domain Files Issue

Hello,


I am trying to create domains and I am fine up to creating mapping files.

But I am facing issues on installing gen_domain for creating domain files.

I loaded the required modules (Fortran, NetCDF, ESMF, CC, etc.,.) and created the required machine files as well. (I hope the problem is with linking netcdf with FORTRAN 90 - but I have loaded the module correctly)

But after configuring, during gmake, I am getting following errors.

 

 

pgf95  -o ../gen_domain gen_domain.o   -time -Wl,--allow-multiple-definition  

gen_domain.o: In function `gen_domain':

/scratch/cas/staff/veeru1.cstaff/cam/cesm1_2_0/mapping/gen_domain_files/src/./gen_domain.F90:234: undefined reference to `nf_open_'

/scratch/cas/staff/veeru1.cstaff/cam/cesm1_2_0/mapping/gen_domain_files/src/./gen_domain.F90:242: undefined reference to `nf_get_att_text_'

/scratch/cas/staff/veeru1.cstaff/cam/cesm1_2_0/mapping/gen_domain_files/src/./gen_domain.F90:243: undefined reference to `nf_get_att_text_'

/scratch/cas/staff/veeru1.cstaff/cam/cesm1_2_0/mapping/gen_domain_files/src/./gen_domain.F90:245: undefined reference to `nf_get_att_text_'

/scratch/cas/staff/veeru1.cstaff/cam/cesm1_2_0/mapping/gen_domain_files/src/./gen_domain.F90:247: undefined reference to `nf_get_att_text_'

/scratch/cas/staff/veeru1.cstaff/cam/cesm1_2_0/mapping/gen_domain_files/src/./gen_domain.F90:250: undefined reference to `nf_get_att_text_'

gen_domain.o:/scratch/cas/staff/veeru1.cstaff/cam/cesm1_2_0/mapping/gen_domain_files/src/./gen_domain.F90:252: more undefined references to `nf_get_att_text_' follow

gen_domain.o: In function `gen_domain':

/scratch/cas/staff/veeru1.cstaff/cam/cesm1_2_0/mapping/gen_domain_files/src/./gen_domain.F90:264: undefined reference to `nf_inq_varid_'

/scratch/cas/staff/veeru1.cstaff/cam/cesm1_2_0/mapping/gen_domain_files/src/./gen_domain.F90:265: undefined reference to `nf_get_var_int_'

 

 

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

I have cut down the errors here.. In the code everything which starts with 'nf_' are undefined

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

 

 

gmake: *** [../gen_domain] Error 2

 

 

Kindly help me to solve this issue.

 

Thanks,

Veeramanikandan

jedwards

You are somehow not defining NetCDF paths correctly.  I would expect this line:

pgf95  -o ../gen_domain gen_domain.o   -time -Wl,--allow-multiple-definition  

to look like 

pgf95  -o ../gen_domain gen_domain.o   -time -Wl,--allow-multiple-definition  -I /path/to/netcdf/include -I /path/to/netcdf/include


Try rerunning with the NETCDF_PATH on the command line:

make NETCDF_PATH=/path/to/netcdf

 

CESM Software Engineer

veera.atmsc@...

I tried using the command

make NETCDF_PATH=/path/to/netcdf

I still face the same problem. I can able to configure and simulate models in CESM (for someother cases).  Can there be any other reasons? Or is configuring and running other cases not related this problem?
jedwards

Did you use the actual path to your netcdf install?   Send the make command that you used and the output from make.

CESM Software Engineer

veera.atmsc@...

Hello jedwards,

I used the following command

 

gmake NETCDF_PATH=/home/cas/staff/veeru1.cstaff/NETCDF4.1


I have attached the make output here.


Thanks,

Veeramanikandan

Attachment: 
jedwards

pgf95 -o ../gen_domain gen_domain.o -time -Wl,--allow-multipledefinition

should include a -I flag with the path to the netcdf include directory and a -L with the path to the netcdf lib directory and -lnetcdf -lnetcdff

it looks like there is a bug in the Makefile, try changing

LDFLAGS  += $(USER_LDFLAGS) 

to 

LDFLAGS  += $(USER_LDFLAGS) -L$(LIB_NETCDF) -lnetcdf -lnetcdff 

CESM Software Engineer

veera.atmsc@...

Hello Jadwards,

Thank you so much. It works well.

But instead of LDFLAGS  += $(USER_LDFLAGS) -L$(LIB_NETCDF) -lnetcdf -lnetcdff

I used LDFLAGS  += $(USER_LDFLAGS) -L$(LIB_NETCDF) -lnetcdff -lnetcdf

as per --> https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11133.html  
Log in or register to post comments

Who's new

  • Nicholas.Davis@...
  • numarsanifa@...
  • bingdian_46@...
  • mxy2832029@...
  • nthg2000@...