Ask Your Question
0

fatal error: netcdf.inc jobcomp from [Scarlett Martinez]

asked 2019-02-05 11:33:25 +0100

GildasC gravatar image

Hi everybody! I'm gong to start work with croco, I have two questons... 1) Is there a forum for croco or is this just like agrif? 2) when I compile croco with jobcomp I GET:

gfortran -c -O3 -fdefault-real-8 -fdefault-double-8 -mcmodel=medium wvlcty_.f -o wvlcty.o cpp -traditional -DLinux -P -I -IROMSFILES/AGRIF_INC checkdims.F | ./mpc > checkdims_.f checkdims.F:37:2: fatal error: netcdf.inc: No such file or directory

^
compilation terminated. gfortran -c -O3 -fdefault-real-8 -fdefault-double-8 -mcmodel=medium checkdims_.f -o checkdims.o f951: Error: Unexpected end of file in ‘checkdims_.f’ Makedefs:13: recipe for target 'checkdims.o' failed make: * [checkdims.o] Error 1 mv: cannot stat 'croco': No such file or directory

Could someone tell me what is causing this error? or how can I fix it? Many thanks in advance!

Marmo.

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
0

answered 2019-02-06 11:07:32 +0100

swen gravatar image

Check your netcdf library (NETCDFLIB) and include (NETCDFINC) paths in jobcomp

edit flag offensive delete link more
0

answered 2020-03-05 15:04:38 +0100

Rachid gravatar image

Hi You can try to edit jobcomp and hard-code the path for netcdf, replace around line 60 the lines

NETCDFLIB=$(nf-config --flibs)

NETCDFINC=-I$(nf-config --includedir)

by something like

NETCDFLIB="-L/usr/local/netcdf-f/lib -lnetcdff -L/usr/local/netcdf-c/lib -lnetcdf"

NETCDFINC=-I/usr/local/netcdf-f/include -I/usr/local/netcdf-c/include"

Rachid

edit flag offensive delete link more

Comments

Thank you so much Rachid. I forgot edit the jobcomp file directly.

mariathdz gravatar imagemariathdz ( 2020-03-05 18:31:57 +0100 )edit
0

answered 2020-03-04 22:18:54 +0100

Hello everybody!

I think I have the same error. I'm using a macOS Mojave (10.14.16). I downloaded the last version of CROCO and using: • a C compiler —> g++7 • a Fortran compiler —> gfortran7 • a Netcdf library netcdf-c-4.7.3 and netcdf-fortran-4.5.2 • MPI libraries and compilers if running in parallel —> OpenMPI

When I run jobcomp, first export: export NETCDFLIB="-L/usr/local/netcdf-f/lib -lnetcdff -L/usr/local/netcdf-c/lib -lnetcdf -lnetcdf -lm" export NETCDFINC="-I/usr/local/netcdf-f/include" export NF_CONFIG=/usr/local/netcdf-f/bin/nf-config

Then: ./jobcomp

but I obtained the next error:

OPERATING SYSTEM IS: Darwin ./jobcomp: line 60: nf-config: command not found ./jobcomp: line 61: nf-config: command not found file namelist_pisces exists in Run directory Checking COMPILEAGRIF... Checking COMPILEMPI... Checking COMPILEXIOS... Checking COMPILEOASIS... Checking COMPILEOMP... cpp -traditional -DLinux -P -I -ICROCOFILES/AGRIF_INC mpc.F > mpc_.f .... and continued the compilation with some warnings, and finally:

Undefined symbols for architecture x86_64: "_nf_close_", referenced from: _closecdf_ in closecdf.o _wrt_his_ in wrt_his.o _wrt_rst_ in wrt_rst.o _get_initial_ in get_initial.o "_nf_create_", referenced from: _def_his_ in def_his.o _def_rst_ in def_rst.o "_nf_def_dim_", referenced from: _def_his_ in def_his.o _def_rst_ in def_rst.o "_nf_def_var_", referenced from: _def_grid_3d_ in def_grid_3d.o _def_his_ in def_his.o _def_rst_ in def_rst.o "_nf_enddef_", referenced from: _def_his_ in def_his.o _def_rst_ in def_rst.o "_nf_get_att_double_", referenced from: _set_cycle_ in set_cycle.o "_nf_get_att_text_", referenced from: _get_initial_ in get_initial.o "_nf_get_var1_double_", referenced from: _set_cycle_ in set_cycle.o _get_initial_ in get_initial.o _get_stflux_ in get_stflux.o _get_srflux_ in get_srflux.o "_nf_get_vara_double_", referenced from: _nf_fread_ in nf_fread.o _nf_fread_x_ in nf_fread_x.o _nf_fread_y_ in nf_fread_y.o _nf_read_bry_ns_ in nf_read_bry.o _nf_read_bry_ew_ in nf_read_bry.o "_nf_get_vara_int_", referenced from: _get_initial_ in get_initial.o "_nf_inq_", referenced from: _checkdims_ in checkdims.o "_nf_inq_attname_", referenced from: _set_cycle_ in set_cycle.o "_nf_inq_dim_", referenced from: _checkdims_ in checkdims.o _set_cycle_ in set_cycle.o "_nf_inq_var_", referenced from: _set_cycle_ in set_cycle.o "_nf_inq_varid_", referenced from: _def_his_ in def_his.o _def_rst_ in def_rst.o _wrt_grid_ in wrt_grid.o _get_initial_ in get_initial.o _get_stflux_ in get_stflux.o _get_srflux_ in get_srflux.o "_nf_inq_varndims_", referenced from: _get_stflux_ in get_stflux.o _get_srflux_ in get_srflux.o "_nf_open_", referenced from: _def_his_ in def_his.o _def_rst_ in def_rst.o _get_initial_ in get_initial.o _get_stflux_ in get_stflux.o _get_srflux_ in get_srflux.o "_nf_put_att_double_", referenced from: _put_global_atts_ in put_global_atts.o _def_grid_3d_ in def_grid_3d.o "_nf_put_att_int_", referenced from: _put_global_atts_ in put_global_atts.o "_nf_put_att_text_", referenced from: _put_global_atts_ in put_global_atts.o _nf_add_attribute_ in nf_add_attribute.o _def_grid_3d_ in def_grid_3d.o _def_his_ in def_his.o _def_rst_ in def_rst.o "_nf_put_var1_double_", referenced from: _wrt_grid_ in wrt_grid.o _wrt_his_ in wrt_his.o _wrt_rst_ in wrt_rst.o "_nf_put_var1_text_", referenced from: _wrt_grid_ in wrt_grid.o "_nf_put_var_double_", referenced from: _wrt_grid_ in wrt_grid.o "_nf_put_vara_double_", referenced from: _nf_fwrite_ in nf_fread.o _nf_fwrite_x_ in nf_fread_x.o _nf_fwrite_y_ in nf_fread_y.o "_nf_put_vara_int_", referenced from: _wrt_his_ in wrt_his.o _wrt_rst_ in wrt_rst.o "_nf_set_fill_", referenced from: _def_his_ in def_his.o "_nf_strerror_", referenced from: _nf_read_bry_ns_ in nf_read_bry.o _nf_read_bry_ew_ in nf_read_bry.o "_nf_sync_ ... (more)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-02-05 11:33:25 +0100

Seen: 967 times

Last updated: Mar 05