CMAQ5.3 CCTM undefined reference error

Hello,
Any one has any suggestions on the compiling errors below:
Many thanks!

I used the gcc version 8.3.0; netcdf-c-4.6.0; netcdf-fortran-4.5.0; mpich-3.3.1; ioapi-3.2; no errors on icon, bcon ad micp


distr_env.o: In function `distr_env_’:

distr_env.c:(.text+0xc0): undefined reference to `ompi_mpi_comm_world’

distr_env.c:(.text+0xc7): undefined reference to `ompi_mpi_int’

distr_env.c:(.text+0xe1): undefined reference to `ompi_mpi_char’

distr_env.c:(.text+0xe7): undefined reference to `ompi_mpi_comm_world’

distr_env.c:(.text+0xf4): undefined reference to `ompi_mpi_comm_world’

distr_env.c:(.text+0x112): undefined reference to `ompi_mpi_comm_world’

distr_env.c:(.text+0x119): undefined reference to `ompi_mpi_int’

distr_env.c:(.text+0x13b): undefined reference to `ompi_mpi_char’

distr_env.c:(.text+0x141): undefined reference to `ompi_mpi_comm_world’

collect2: error: ld returned 1 exit status

make: *** [CCTM_v53.exe] Error 1


This looks like something in the build was done with OpenMPI instead of mpich – as a diagnostic, go to the directory for your MPI library and do nm lib. MPICH symbols have all-caps MPI in their prefixes; oOpenMPI ones have ompi_.

I did not find any “ompi_” in MPI lib. “something in the build was done with *OpenMPI”, which means that the CMAQ modules are builded by “openmpi” or others, such as ioapi? Any suggestion to fixed it? switch to openmpi?

It looks, in particular, as though distr_env.c was compiled with an OpenMPI mpicc, not with the corresponding MPICH mpicc. Try removing it (and maybe all the .o files) and re-building.

I need help with the same problem, did anyone get a solution?

Please try following one of the tutorials that are available