Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CICE compile error undefined but referenced #380

Closed
tusinami opened this issue Nov 25, 2019 · 3 comments
Closed

CICE compile error undefined but referenced #380

tusinami opened this issue Nov 25, 2019 · 3 comments

Comments

@tusinami
Copy link

I am sorry for posting a new thread here but i tried a few times but just can't open https://bb.cgd.ucar.edu/forums/cice-consortium-model-development , which returns a 404 error.

i am a beginner in CICE and tring to compile CICE in serial. I installed gcc , gfortran and netcdf with yum. When i tries to compile CICE. at first i got the error 'can't find netcdf.mod', i searched a bit and copy the netcdf.mod from /usr/lib64/gfortran/modeles to /usr/include. and the problem disappears. and when CICE is trying to generate the executable file , i got the current error and i still have no idea how to fix it. I put some bried error message down below. Any suggestion may help.

ERROR MESSAGE
gfortran -c -O2 -ffree-line-length-none -fconvert=big-endian -finit-real=nan -O2 -DFORTRANUNDERSCORE -Dncdf -I. -I/usr/include /home/wangxiong/CICE/cicecore/drivers/cice/CICE.F90
gcc -c -O2 -DFORTRANUNDERSCORE -Dncdf -I/usr/include /home/wangxiong/CICE/cicecore/cicedynB/infrastructure/ice_shr_reprosum86.c
gfortran -o /home/wangxiong/mycase2/run/cice CICE.o CICE_FinalMod.o CICE_InitMod.o CICE_RunMod.o ice_arrays_column.o ice_blocks.o ice_boundary.o ice_broadcast.o ice_calendar.o ice_communicate.o ice_constants.o ice_diagnostics.o ice_diagnostics_bgc.o ice_distribution.o ice_domain.o ice_domain_size.o ice_dyn_eap.o ice_dyn_evp.o ice_dyn_evp_1d.o ice_dyn_shared.o ice_exit.o ice_fileunits.o ice_flux.o ice_flux_bgc.o ice_forcing.o ice_forcing_bgc.o ice_gather_scatter.o ice_global_reductions.o ice_grid.o ice_history.o ice_history_bgc.o ice_history_drag.o ice_history_mechred.o ice_history_pond.o ice_history_shared.o ice_history_write.o ice_init.o ice_init_column.o ice_kinds_mod.o ice_read_write.o ice_reprosum.o ice_restart.o ice_restart_column.o ice_restart_driver.o ice_restart_shared.o ice_restoring.o ice_shr_reprosum86.o ice_spacecurve.o ice_state.o ice_step_mod.o ice_timers.o ice_transport_driver.o ice_transport_remap.o icepack_aerosol.o icepack_age.o icepack_algae.o icepack_atmo.o icepack_brine.o icepack_firstyear.o icepack_flux.o icepack_intfc.o icepack_itd.o icepack_kinds.o icepack_mechred.o icepack_meltpond_cesm.o icepack_meltpond_lvl.o icepack_meltpond_topo.o icepack_mushy_physics.o icepack_ocean.o icepack_orbital.o icepack_parameters.o icepack_shortwave.o icepack_therm_0layer.o icepack_therm_bl99.o icepack_therm_itd.o icepack_therm_mushy.o icepack_therm_shared.o icepack_therm_vertical.o icepack_tracers.o icepack_warnings.o icepack_zbgc.o icepack_zbgc_shared.o icepack_zsalinity.o -L/usr/lib64 -lnetcdf

ice_domain.o:in function ‘__ice_domain_MOD_init_domain_distribution’:
ice_domain.F90: (.text+0x2772):‘__netcdf_MOD_nf90_open’ undefined but referenced
ice_domain.F90: (.text+0x27a1):‘__netcdf_MOD_nf90_inq_varid’ undefined but referenced
ice_domain.F90: (.text+0x27c9):‘__netcdf_MOD_nf90_get_var_2d_eightbytereal’ undefined but referenced
ice_domain.F90: (.text+0x27d6):‘__netcdf_MOD_nf90_close’ undefined but referenced

collect2: error :ld returned 1
gmake: *** [/home/wangxiong/mycase2/run/cice] error 1

./cice.build: COMPILE FAILED

@phil-blain
Copy link
Member

Hi @tusinami,

I see you found the new link to the bulletin board and posted your questions there :
https://xenforo.cgd.ucar.edu/cesm/threads/cice-compile-undefined-but-referenced.4930/
I will answer there.

Thanks for reminding us that we still need to change our links.

@tusinami
Copy link
Author

Hi @phil-blain

Thank you for your reply. I have already seen your reply on https://bb.cgd.ucar.edu/cesm/threads/cice-compile-undefined-but-referenced.4930/ and solved the problem with your help.

Thank you so much.

@phil-blain
Copy link
Member

I think this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants