CCTM compilation

#1

Hi all

I am trying to compile CCTM but an error comes up:

mpiifort -qopenmp se_bndy_copy_info_ext.o se_pe_info_ext.o se_comm_info_ext.o se_data_send_module.o se_domain_info_ext.o se_internal_util_module.o se_data_recv_module.o se_disp_info_ext.o se_subgrid_info_ext.o se_global_sum_module.o se_global_max_module.o se_global_min_module.o se_slice_module.o se_init_module.o se_bndy_copy_module.o se_comm_module.o se_reconfig_grid_info_ext.o se_reconfig_grid_module.o se_gather_module.o se_data_copy_module.o se_term_module.o se_twoway_comm_module.o se_util_module.o se_modules.o swap_sandia.o swap_sandia_routines.o alloc_data_mod.o pinterpb_mod.o parutilio.o piomaps_mod.o boundary.o get_write_map.o growbuf.o gtndxhdv.o interpol.o pinterpb.o pio_init.o pm3err.o pm3exit.o pm3warn.o pshut3.o ptrwrite3.o pwrgrdd.o pwrite3.o readbndy.o subdmap.o wrsubdmap.o UTILIO_DEFN.o HGRD_DEFN.o VGRD_DEFN.o GRID_CONF.o CGRID_SPCS.o PA_DEFN.o PCGRID_DEFN.o AVG_CONC.o DEPVVARS.o BIDI_MOD.o LSM_MOD.o ASX_DATA_MOD.o HGSIM.o MOSAIC_MOD.o RXNS_DATA_MODULE.o BIOG_EMIS.o BEIS_DEFN.o LUS_DEFN.o LTNG_DEFN.o AEROMET_DATA.o AERO_DATA.o UDTYPES.o STK_EMIS.o STK_PRMS.o PTMAP.o PTBILIN.o SSEMIS.o bmatvec.o PTMET.o DEPV_DEFN.o STD_CONC.o CSQY_DATA.o CLOUD_OPTICS.o PHOT_MET_DATA.o DUST_EMIS.o RXNS_FUNC_MODULE.o PRECURSOR_DATA.o MGEMIS.o PT3D_DEFN.o SOA_DEFN.o AERO_EMIS.o AEROSOL_CHEMISTRY.o PAGRD_DEFN.o EMIS_DEFN.o WVEL_DEFN.o distr_env.o mpcomm_init.o advstep.o driver.o hveloc.o sciproc.o wr_aconc.o wr_cgrid.o wr_conc.o wr_init.o diffmsg.o flcheck.o grdcheck.o initscen.o load_cgrid.o opaconc.o opconc.o couplewrf.o advbc_map.o hadvyppm.o hcontvel.o hppm.o rdbcon.o x_ppm.o x_yamo.o y_ppm.o y_yamo.o zfdbc.o vppm.o zadvppmwrf.o deform.o hcdiff3d.o hdiff.o rho_j.o VDIFF_DIAG.o VDIFF_MAP.o SEDIMENTATION.o aero_sedv.o conv_cgrid.o eddyx.o matrix1.o opddep.o opddep_fst.o opddep_mos.o rddepv.o tri.o vdiffacmx.o vdiffproc.o ABFLUX_MOD.o cgrid_depv.o gas_depv_map.o m3dry.o opdepv_diag.o opdepv_fst.o opdepv_mos.o cropcal.o opemis.o tfabove.o tfbelow.o beis3.o checkmem.o chkgrid.o czangle.o getfline.o getparb.o hrno.o parsline.o tmpbeis.o wrdaymsg.o delta_zs.o fire_plmris.o openlayout.o oppt3d_diag.o plmris.o plsprd.o preplm.o ungridb2.o write3_distr.o complex_number_module.o twoway_rrtmg_aero_optics.o AERO_PHOTDATA.o PHOT_MOD.o SEAS_STRAT_O3_MIN.o PHOTOLYSIS_ALBEDO.o o3totcol.o opphot.o phot.o DEGRADE_SETUP_TOX.o hrdata_mod.o degrade_data.o degrade.o final_degrade.o find_degraded.o hrdriver.o hrg1.o hrg2.o hrg3.o hrg4.o hrinit.o hrprodloss.o hrrates.o hrsolver.o init_degrade.o AOD_DEFN.o PMDIAG_DATA.o aero_depv.o aero_driver.o aero_subs.o coags.o getpar.o isocom.o isofwd.o isorev.o opapmdiag.o opavis.o oppmdiag.o opvis.o AQ_DATA.o acmcld.o aqchem.o aq_map.o cldproc_acm.o convcld_acm.o getalpha.o hlconst.o indexn.o opwdep.o rescld.o scavwdep.o PA_GLOBAL.o PA_IPRDEF.o PA_VARS.o PA_PARSE.o PA_IPRVARS.o pa_compmech.o pa_datagen.o pa_errcheck.o pa_getcoef.o pa_getcycle.o pa_getdesc.o pa_getfamily.o pa_getiprout.o pa_getirrout.o pa_getrxns.o pa_getrxnsum.o pa_init.o pa_irr_ctl.o pa_irr.o pa_mkhdr.o pa_molcloss.o pa_molcprod.o pa_output.o pa_read.o pa_report.o pa_setup_ipr.o pa_setup_irr.o pa_update.o pa_wrtpadefn.o cksummer.o findex.o get_envlist.o lstepf.o setup_logdev.o subhdomain.o subhfile.o -L/media/maria/Backup/CMAQ_Project/PREP/mcip/src/lib/x86_64/intel/ioapi/lib -lioapi -L/media/maria/Backup/CMAQ_Project/PREP/mcip/src/lib/x86_64/intel/netcdf/lib -lnetcdff -lnetcdf -L/media/maria/Backup/CMAQ_Project/PREP/mcip/src/lib/x86_64/intel/mpi/lib -lcurl -o CCTM_v52.exe
/media/maria/Backup/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/lib/libmpifort.so: undefined reference to `PMPI_Aint_diff’

I am not a specialist about compilers or programming. I was searching on Internet a possible solution, however I didn’t find anything about it.

Do you have any idea?
Appreciate your help

Maria

0 Likes

#2

Hi Maria,

It may be something as simple of adding -lmpi to your config_cmaq.csh

config_cmaq.csh: setenv mpi_lib “-lmpi”

If this doesn’t work, please send the following information:
If you are using modules on a compute server, please use the module list command to see what compiler is loaded:

module list 

If not, use the command which mpiifort to reveal what compiler you are using:

which mpiifort
0 Likes

#3

Thank you for your reply.
I applied the change that you suggested in my config_cmaq.csh, but it didn’t work.

When I typed “which mpiifort” the result is:

/media/maria/Backup/intel/compilers_and_libraries_2019.3.199/linux/mpi/intel64/bin/mpiifort

Then, I decided to change the path in:
config_cmaq.csh: setenv MPI_LIB_DIR

But a new error comes up:
distr_env.c:(.text+0x156): undefined reference to `ompi_mpi_int’

So, I suppose that the change is not in the correct environment variable. Do I have to change the path in other place?

Maria

0 Likes

#4

Hi Maria,

Please try adding the following environment variable to your config_cmaq.csh
under the section
case intel:

setenv myLINK_FLAG "-qopenmp"

Liz

0 Likes

#5

Hi Liz

In my current config_cmaq.csh file, I have that environment variable but the error persists:

setenv IOAPI_MOD_DIR /media/maria/Backup/IOAPI3.1/Linux2_x86_64ifort/ #> I/O API precompiled modules
setenv IOAPI_INCL_DIR /media/maria/Backup/IOAPI3.1/Linux2_x86_64ifort/ #> I/O API include header files
setenv IOAPI_LIB_DIR /media/maria/Backup/IOAPI3.1/Linux2_x86_64ifort/ #> I/O API libraries
setenv NETCDF_LIB_DIR /media/maria/Backup/netcdf-4.1.3/netcdf/lib/ #> netCDF directory path
setenv NETCDF_INCL_DIR /media/maria/Backup/netcdf-4.1.3/netcdf/include/ #> netCDF directory path
setenv MPI_LIB_DIR /home/maria/Escritorio/openmpi-3.1.1/ #> MPI directory path

    #> Compiler Aliases and Flags
    setenv myFC mpiifort
    setenv myCC icc       
    setenv myFSTD "-O3 -fno-alias -mp1 -fp-model source"
    setenv myDBG  "-O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback"
    setenv myLINK_FLAG "-qopenmp"
    setenv myFFLAGS "-fixed -132"
    setenv myFRFLAGS "-free"
    setenv myCFLAGS "-O2"
    setenv extra_lib "-lcurl"
    #setenv extra_lib ""
    setenv mpi_lib "" 

I really appreciate your help

Maria

0 Likes

#6

@lizadams Hello

Please, below is the response I got while trying to configure CMAQ:

ERROR: /home/catalyst/Desktop/Build_WRF/CMAQ-5.2.1/lib/x86_64/gcc/netcdf/lib/libnetcdf.a does not exist in your CMAQ_LIB directorysource config_cmaq.csh gcc! Check your installation before proceeding with CMAQ build.

Also, while compiling ICON and BCON:
rm: No match.
mpif90: Command not found.
mpif90: Command not found.
mpif90: Command not found.
mpif90: Command not found.
mpif90: No match.

ERROR BLDMAKE Compile failed

Kindly help, please.

0 Likes

#7

Please use the following instructions to install the required software.

0 Likes

#8

Thanks for your response. But the problems still persist after installing netcdf-c-4.6.3 and netcdf-fortran-4.4.4 following your instructions.
The I/O API Version 3.2 couldn’t be installed on my system too. My system’s linux version is ‘‘x86_64-linux-gnu’’ and is not listed among the versions compatible with the I/0 API.

source config_cmaq.csh gcc 7.3.0
Compiler is set to gcc
ERROR: /home/catalyst/Desktop/Build_WRF/CMAQ-5.2.1/lib/x86_64/gcc7.3.0/netcdf/lib/libnetcdf.a does not exist in your CMAQ_LIB directorysource config_cmaq.csh gcc 7.3.0! Check your installation before proceeding with CMAQ build.

I’ll appreciate your further help. Thanks.

0 Likes

#9

Below is what I got:

Makefile:95: home/catalyst/Desktop/Build_WRF/LIBRARIES/ioapi-3.2/ioapi/Makeinclude.Linux2_x86_64gfort: No such file or directory
make: *** No rule to make target ‘home/catalyst/Desktop/Build_WRF/LIBRARIES/ioapi-3.2/ioapi/Makeinclude.Linux2_x86_64gfort’. Stop.

0 Likes

#10

Where did you get this ioapi-3.2/ioapi/ ? Going to the CMAS web-server, I see:
longleaf:download % tar tfz ioapi-3.2.tar.gz | grep gfort
ioapi/Makeinclude.Linux2_x86_64gfort_360
ioapi/Makeinclude.Linux2_x86_64gfort
ioapi/Makeinclude.WIN_x86_64gfort_medium
ioapi/Makeinclude.Linux2_ia64gfort
ioapi/Makeinclude.Linux2_x86_64gfort_365
ioapi/Makeinclude.Linux2_x86_64gfortmpi
ioapi/Makeinclude.OSX_x86_gfortran
ioapi/Makeinclude.Linux2_x86_64gfort_medium
ioapi/Makeinclude.Linux2_x86_64gfortdbg
ioapi/Makeinclude.WIN_x86gfort
ioapi/Makeinclude.WIN_x86_64gfort

and similarly on the GitHub server… You did follow the I/O API installation instructions https://cjcoats.github.io/ioapi/AVAIL.html#build didn’t you?

0 Likes