Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

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_' followgen_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

CSEG and Liaisons
Staff member
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  [/i]to look like [/i]pgf95  -o ../gen_domain gen_domain.o   -time -Wl,--allow-multiple-definition  -I /path/to/netcdf/include -I /path/to/netcdf/include[/i]
[/i]Try rerunning with the NETCDF_PATH on the command line:[/i]make NETCDF_PATH=/path/to/netcdf[/i] 
 
I tried using the commandmake NETCDF_PATH=/path/to/netcdfI 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

CSEG and Liaisons
Staff member
Did you use the actual path to your netcdf install?   Send the make command that you used and the output from make.
 
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
 

jedwards

CSEG and Liaisons
Staff member
pgf95 -o ../gen_domain gen_domain.o -time -Wl,--allow-multipledefinitionshould 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 -lnetcdffit looks like there is a bug in the Makefile, try changingLDFLAGS  += $(USER_LDFLAGS) to LDFLAGS  += $(USER_LDFLAGS) -L$(LIB_NETCDF) -lnetcdf -lnetcdff 
 
Hello Jadwards,Thank you so much. It works well.But instead of LDFLAGS  += $(USER_LDFLAGS) -L$(LIB_NETCDF) -lnetcdf -lnetcdffI used LDFLAGS  += $(USER_LDFLAGS) -L$(LIB_NETCDF) -lnetcdff -lnetcdfas per --> https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11133.html  
 
Top