Ask Your Question
0

error in linking ww3_gspl when compiling ww3 in coupled mode

asked 2020-07-09 14:49:42 +0200

Gump gravatar image

I am compiling ww3 in an ocean-wave coupled mode on a Mac system. An error occurs as follows:

Processing ww3_gspl

ad3 : processing ww3_gspl Linking ww3_gspl link with oasis * error in linking *

Undefined symbols for architecture x86_64: "_mpi_abort_", referenced from: ___mod_oasis_sys_MOD_oasis_abort in libpsmile.MPI1.a(mod_oasis_sys.o) ___m_dropdead_MOD_diex_ in libmpeu.a(m_dropdead.o) ___m_dropdead_MOD_die_ in libmpeu.a(m_dropdead.o) "_mpi_allgather_", referenced from: ___m_globalmap_MOD_initd_ in libmct.a(m_GlobalMap.o) "_mpi_allreduce_", referenced from: ___w3ogcmmd_MOD_rcv_fields_from_ocean in w3ogcmmd.o ___mod_oasis_mpi_MOD_oasis_mpi_maxr1 in libpsmile.MPI1.a(mod_oasis_mpi.o) ___mod_oasis_mpi_MOD_oasis_mpi_maxr0 in libpsmile.MPI1.a(mod_oasis_mpi.o) ___mod_oasis_mpi_MOD_oasis_mpi_maxi1 in libpsmile.MPI1.a(mod_oasis_mpi.o) ___mod_oasis_mpi_MOD_oasis_mpi_maxi0 in libpsmile.MPI1.a(mod_oasis_mpi.o) ___mod_oasis_mpi_MOD_oasis_mpi_minr1 in libpsmile.MPI1.a(mod_oasis_mpi.o) ___mod_oasis_mpi_MOD_oasis_mpi_minr0 in libpsmile.MPI1.a(mod_oasis_mpi.o) ... "_mpi_alltoallv_", referenced from: ___m_rearranger_MOD_rearrange_ in libmct.a(m_Rearranger.o) "_mpi_barrier_", referenced from: ___m_globalsegmap_MOD_initd_ in libmct.a(m_GlobalSegMap.o) ___mod_oasis_mpi_MOD_oasis_mpi_barrier in libpsmile.MPI1.a(mod_oasis_mpi.o) ___mod_oasis_timer_MOD_oasis_timer_print in libpsmile.MPI1.a(mod_oasis_timer.o) ___mod_oasis_timer_MOD_oasis_timer_start in libpsmile.MPI1.a(mod_oasis_timer.o) "_mpi_bcast_", referenced from: ___m_mctworld_MOD_initr_ in libmct.a(m_MCTWorld.o) ___m_attrvectcomms_MOD_bcast_ in libmct.a(m_AttrVectComms.o) ___m_attrvectcomms_MOD_gm_scatter_ in libmct.a(m_AttrVectComms.o) ___m_globalsegmap_MOD_initr_ in libmct.a(m_GlobalSegMap.o) ___mod_oasis_mpi_MOD_oasis_mpi_bcastr3 in libpsmile.MPI1.a(mod_oasis_mpi.o) ___mod_oasis_mpi_MOD_oasis_mpi_bcasti2 in libpsmile.MPI1.a(mod_oasis_mpi.o) ___mod_oasis_mpi_MOD_oasis_mpi_bcastr2 in libpsmile.MPI1.a(mod_oasis_mpi.o) ... "_mpi_comm_dup_", referenced from: ___m_mctworld_MOD_initr_ in libmct.a(m_MCTWorld.o) "_mpi_comm_free_", referenced from: ___m_mctworld_MOD_clean_ in libmct.a(m_MCTWorld.o) "_mpi_comm_rank_", referenced from: ___mod_oasis_auxiliary_routines_MOD_oasis_set_couplcomm in libpsmile.MPI1.a(mod_oasis_auxiliary_routines.o) ___mod_oasis_method_MOD_oasis_enddef in libpsmile.MPI1.a(mod_oasis_method.o) ___mod_oasis_method_MOD_oasis_init_comp in libpsmile.MPI1.a(mod_oasis_method.o) ___mod_oasis_part_MOD_oasis_part_create in libpsmile.MPI1.a(mod_oasis_part.o) ___mod_oasis_part_MOD_oasis_part_setup in libpsmile.MPI1.a(mod_oasis_part.o) ___m_mctworld_MOD_initr_ in libmct.a(m_MCTWorld.o) ___m_mctworld_MOD_initm_ in libmct.a(m_MCTWorld.o) ... "_mpi_comm_size_", referenced from: ___mod_oasis_auxiliary_routines_MOD_oasis_set_couplcomm in libpsmile.MPI1.a(mod_oasis_auxiliary_routines.o) ___mod_oasis_method_MOD_oasis_enddef in libpsmile.MPI1.a(mod_oasis_method.o) ___mod_oasis_method_MOD_oasis_init_comp in libpsmile.MPI1.a(mod_oasis_method.o) ___mod_oasis_part_MOD_oasis_part_create in libpsmile.MPI1.a(mod_oasis_part.o) ___mod_oasis_part_MOD_oasis_part_setup in libpsmile.MPI1.a(mod_oasis_part.o) ___m_mctworld_MOD_initr_ in libmct.a(m_MCTWorld.o) ___m_mctworld_MOD_initm_ in libmct.a(m_MCTWorld.o) ... "_mpi_comm_split_", referenced from: ___mod_oasis_auxiliary_routines_MOD_oasis_create_couplcomm in libpsmile.MPI1.a(mod_oasis_auxiliary_routines.o) ___mod_oasis_method_MOD_oasis_enddef in libpsmile.MPI1.a(mod_oasis_method.o) ___mod_oasis_method_MOD_oasis_init_comp in libpsmile.MPI1.a(mod_oasis_method.o) ___mod_oasis_part_MOD_oasis_part_setup in libpsmile.MPI1.a(mod_oasis_part.o) "_mpi_error_string_", referenced from: ___mod_oasis_mpi_MOD_oasis_mpi_chkerr in libpsmile.MPI1.a(mod_oasis_mpi.o) ___m_mpif90_MOD_perr_ in libmpeu.a(m_mpif90.o) "_mpi_finalize_", referenced from: ___mod_oasis_method_MOD_oasis_terminate in libpsmile.MPI1.a(mod_oasis_method.o) ___mod_oasis_mpi_MOD_oasis_mpi_finalize in libpsmile.MPI1.a(mod_oasis_mpi.o) "_mpi_gather_", referenced from: ___mod_oasis_method_MOD_oasis_init_comp in libpsmile.MPI1.a(mod_oasis_method.o) ___m_mctworld_MOD_initm_ in libmct.a(m_MCTWorld.o) ___mod_oasis_mpi_MOD_oasis_mpi_gathscatvinitr1 in libpsmile.MPI1.a(mod_oasis_mpi.o) ___mod_oasis_timer_MOD_oasis_timer_print in libpsmile.MPI1.a(mod_oasis_timer.o) ___m_fccomms_MOD_fc_gather_fp in libmpeu.a(m_FcComms.o) ___m_fccomms_MOD_fc_gather_int in libmpeu.a(m_FcComms.o) ___m_zeit_MOD_allflush_ in libmpeu.a(m_zeit.o) ... "_mpi_gatherv_", referenced from: ___mod_oasis_mpi_MOD_oasis_mpi_gathervr1 in libpsmile.MPI1.a(mod_oasis_mpi.o) ___m_fccomms_MOD_fc_gatherv_fp in libmpeu.a(m_FcComms.o) ___m_fccomms_MOD_fc_gatherv_int in libmpeu.a(m_FcComms.o) "_mpi_get_processor_name_", referenced from: ___mod_oasis_method_MOD_oasis_init_comp in libpsmile.MPI1.a(mod_oasis_method.o) "_mpi_init_", referenced from: ___mod_oasis_method_MOD_oasis_init_comp in libpsmile.MPI1.a(mod_oasis_method.o) ___mod_oasis_mpi_MOD_oasis_mpi_init in libpsmile.MPI1.a(mod_oasis_mpi.o) "_mpi_initialized_", referenced from: ___mod_oasis_method_MOD_oasis_init_comp in libpsmile.MPI1.a(mod_oasis_method.o) ___mod_oasis_mpi_MOD_oasis_mpi_initialized in libpsmile.MPI1.a(mod_oasis_mpi.o) ___m_dropdead_MOD_diex_ ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2020-07-10 10:20:17 +0200

swen gravatar image

Hi, in WW3 you have several comp examples. If you look in comp.Gnu the compilation options are: opt="-c -O3 -fno-second-underscore -ffree-line-length-none -fconvert=big-endian -J$path_m". It seems that your error may be related to the double underscore problem, so I suggest that you try this compilation option line.

edit flag offensive delete link more

Comments

part 1) Thanks for your suggestion! I have tried the comp option you suggested but the same error still occurs. Do you think it is because my OASIS is not compiled correctly? When I compiled OASIS, the directories are generated but there are some warnings in COMP.err as follows:

Gump gravatar imageGump ( 2020-07-10 14:58:48 +0200 )edit

part2 ) /opt/local/bin/ranlib: file: libmpeu.a(m_SortingTools.o) has no symbols /opt/local/bin/ranlib: file: libmpeu.a(m_realkinds.o) has no symbols /opt/local/bin/ranlib: file: libmpeu.a(m_stdio.o) has no symbols ranlib: file: libmpeu.a(m_SortingTools.o) has no symbols

Gump gravatar imageGump ( 2020-07-10 14:59:37 +0200 )edit

I have not seen this kind of warnings yet, so I don't know if your compilation is ok or not. First check that you actually have in your OASIS compiled directory: libmpeu.a, libmct.a, libscrip.a, libpsmile.MPI1

swen gravatar imageswen ( 2020-07-10 15:07:51 +0200 )edit

I just checked again and I have libmpeu.a, libmct.a, libscrip.a, libpsmile.MPI1.a in the OASIS compiled directory. Directories "build" "lib" are both created and 4 sub-directories in "build/lib" are also there.

Gump gravatar imageGump ( 2020-07-10 15:16:11 +0200 )edit

2 suggestions: - check what is in your $MPILIB - try to re-compile oasis with CC=mpicc (add the full path) - provide your full compilation line, as used during compilation to check every lib and include

swen gravatar imageswen ( 2020-07-10 15:32:08 +0200 )edit
0

answered 2020-07-09 15:30:13 +0200

swen gravatar image

updated 2020-07-09 15:35:02 +0200

Hi,

1) Can you check that you have you correctly set your OASISDIR environment variable? (it is the one used by WW3 compilation scripts to find OASIS libraries). It should point towards the directory where your OASIS libraries are compiled. 2) Can you provide details on your compilation settings (compilers, compilation options) for both OASIS and WW3?

edit flag offensive delete link more

Comments

Hi Swen, Thanks for your answer! 1)for OASIS: MAKE= /usr/bin/make; F90= $(MPIBIN)/mpif90 -I$(MPI_INCLUDE); CC= /usr/local/gfortran/bin/gcc -I$(MPI_INCLUDE); LD = $(MPIBIN)/mpif90 $(MPILIB); 2)for WW3 (the comp file): comp=mpif90; opt="-c -g -O3 -static -fconvert=big-endian -J$path_m";

Gump gravatar imageGump ( 2020-07-09 16:05:37 +0200 )edit

(to be continued) I also checked that OASISDIR is defined when compiling WW3 and it points towards the directory of OASIS libs.

Gump gravatar imageGump ( 2020-07-09 16:08:20 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-07-09 14:49:42 +0200

Seen: 191 times

Last updated: Jul 10