Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

ccsm3.5 bcast pop2 compiler error

I have been trying to build ccsm3.5 on a linux cluster with the Portland compiler (7.2-3) and mpich2. I get through the cpl, ice, and lnd, but am getting the following error in the ocn:

PGF90-S-0155-Could not resolve generic procedure mpi_bcast (/share/partition7/ccsm3.5-for-Ben/code/Test35/ocn/obj/source/POP_BroadcastMod.F90: 2328)
0 inform, 0 warnings, 1 severes, 0 fatal for pop_broadcastarraylogd6
gmake: *** [POP_BroadcastMod.o] Error 2
(and whereever bcast is called within POP-BroadcastMod.F90).

When I check in our mpif.h code, Bcast does not exist, although it does exist within mpi.h. I see other examples on-line of people including mpif.h to call Bcast, so it seems like it should be included, but I'm not sure if CCSM3.5 uses C++ in certain cases, since CPPDEFs are defined within the Makefile. Is it possible that mpich2 is configured incorrectly since Bcast is not in mpif.h?

I've have copied below the compiler flags I am using within the Macros.Linux file (actually the entire file), as I think these may also be the issue.

CPP := NONE
CPPFLAGS :=
CPPDEFS := -DLINUX -DFORTRANUNDERSCORE -DNO_SHR_VMATH -DHIDE_SHR_MSG

FC := /share/apps/mpich/pgi/bin/mpif90 -byteswapio
FFLAGS := -c -g -DLINUX

CC := mpicc
CFLAGS := -c -DUSE_GCC

LDFLAGS := --staticlink

FIXEDFLAGS :=
FREEFLAGS :=
MOD_SUFFIX := mod
LD := $(FC)
AR := ar
INCLDIR := -I. -I/share/apps/netcdf-4.0.1/include -I/usr/include
SLIBS := -lnetcdf
ULIBS := -L$(LIBROOT) -lcsm_share -lmct -lmpeu -lmph

ifeq ($(MODEL),cam)
CPPDEFS += $(CAM_CPPDEFS) -DNO_R16 -DCAM
endif

ifeq ($(MODEL),pop)
CPPDEFS := $(CPPDEFS) -DPOSIX -Dimpvmix -Dcoupled -DNPROC_X=$(NX) -DNPROC_Y=$(NY)
FIXEDFLAGS := -byteswapio
endif

ifeq ($(MODEL),pop2)
CPPDEFS := $(CPPDEFS) -Dcoupled -DCCSMCOUPLED -DNPROC_X=$(NX) -DNPROC_Y=$(NY)
endif

ifeq ($(MODEL),cice)
CPPDEFS := $(CPPDEFS) -DCCSM -D_MPI -Dncdf -DNXGLOB=$(NXGLOB) -DNYGLOB=$(NYGLOB) -DNCAT=$(NCAT) -
DBLCKX=$(BLCKX) -DBLCKY=$(BLCKY) -DMXBLCKS=$(MXBLCKS)
FIXEDFLAGS := -byteswapio
endif

ifeq ($(MODEL),clm)
CPPDEFS += $(CLM_CPPDEFS)
endif

ifeq ($(SINGLE_EXEC),TRUE)
CPPDEFS := $(CPPDEFS) -DSINGLE_EXEC

ifeq ($(MODEL),xatm)
CPPDEFS += -DDEAD_ATM
endif
ifeq ($(MODEL),xice)
CPPDEFS += -DDEAD_ICE
endif
ifeq ($(MODEL),xlnd)
CPPDEFS += -DDEAD_LND
endif
ifeq ($(MODEL),xocn)
CPPDEFS += -DDEAD_OCN
endif

endif

#===============================================================================
# set CPP options for different scientific scenarios
#===============================================================================

ifneq ($(CCSM_BGC),none)
CPPDEFS += -D$(CCSM_BGC)
endif

# placeholder for DUST once it is fully implemented
# ifeq ($(CCSM_DUST),TRUE)
# CPPDEFS += -DDUST
# endif

ifeq ($(THREAD),TRUE)
CPPDEFS += -D_OPENMP -DTHREADED_OMP
FREEFLAGS += -mp
LDFLAGS += -mp
endif

Thanks for any thoughts.

Ben
 
Top