diff --git a/.circleci/checkout.sh b/.circleci/checkout.sh index daae362417f8..579832db643f 100755 --- a/.circleci/checkout.sh +++ b/.circleci/checkout.sh @@ -3,6 +3,3 @@ # Replace all ssh URLs to submodules with HTTP URLs sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules git submodule update --init -cd components/mpas-source -sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules -git submodule update --init --recursive diff --git a/.travis.yml b/.travis.yml index b920febedd12..df1e63022b34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,10 +35,6 @@ before_install: # Replace all ssh URLs to submodules with HTTP URLs - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules - git submodule update --init - - cd components/mpas-source - - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules - - git submodule update --init --recursive - - cd ../.. # Download the E3SM Singularity container - wget https://dabdceba-6d04-11e5-ba46-22000b92c6ec.e.globus.org/containers/public/e3sm.sif # Install Singularity diff --git a/components/cmake/build_model.cmake b/components/cmake/build_model.cmake index c5e49dd819e6..17c02ebb4094 100644 --- a/components/cmake/build_model.cmake +++ b/components/cmake/build_model.cmake @@ -26,7 +26,7 @@ function(build_model COMP_CLASS COMP_NAME) endif() if (COMP_NAME STREQUAL "cpl") - list(APPEND INCLDIR "${EXEROOT}/cmake-bld/mpas-source/src") + list(APPEND INCLDIR "${EXEROOT}/cmake-bld/mpas-framework/src") foreach(ITEM IN LISTS COMP_CLASSES) list(APPEND INCLDIR "${EXEROOT}/cmake-bld/cmake/${ITEM}") endforeach() diff --git a/components/cmake/build_mpas_model.cmake b/components/cmake/build_mpas_model.cmake index 53d6e388eee3..9201a07d7b74 100644 --- a/components/cmake/build_mpas_model.cmake +++ b/components/cmake/build_mpas_model.cmake @@ -33,7 +33,7 @@ function(build_mpas_models) set(CIMESRC_PATH "../cime/src") if (CORES) - add_subdirectory("mpas-source/src") + add_subdirectory("mpas-framework/src") endif() endfunction(build_mpas_models) diff --git a/components/mpas-albany-landice/src/Makefile b/components/mpas-albany-landice/src/Makefile index d7dc35bd0a92..b622a1757d0c 100644 --- a/components/mpas-albany-landice/src/Makefile +++ b/components/mpas-albany-landice/src/Makefile @@ -2,7 +2,8 @@ .SUFFIXES: .F .o .cpp .PHONY: mode_forward shared analysis_members -SHARED_INCLUDES = -I$(PWD)/../framework -I$(PWD)/../external/esmf_time_f90 -I$(PWD)/../operators +FW = ../../../mpas-framework/src +SHARED_INCLUDES = -I$(FW)/framework -I$(FW)/external/esmf_time_f90 -I$(FW)/operators SHARED_INCLUDES += -I$(PWD)/shared -I$(PWD)/analysis_members -I$(PWD)/mode_forward all: core_landice diff --git a/components/mpas-framework/src/build_core.cmake b/components/mpas-framework/src/build_core.cmake index c2c36464cbb8..cc2739837269 100644 --- a/components/mpas-framework/src/build_core.cmake +++ b/components/mpas-framework/src/build_core.cmake @@ -47,7 +47,7 @@ function(build_core CORE) add_custom_command( OUTPUT ${INC_DIR}/core_variables.inc - COMMAND ${CMAKE_BINARY_DIR}/mpas-source/src/tools/parse < ${CORE_BLDDIR}/Registry_processed.xml + COMMAND ${CMAKE_BINARY_DIR}/mpas-framework/src/tools/parse < ${CORE_BLDDIR}/Registry_processed.xml DEPENDS parse ${CORE_BLDDIR}/Registry_processed.xml WORKING_DIRECTORY ${INC_DIR} ) diff --git a/components/mpas-ocean/src/Makefile b/components/mpas-ocean/src/Makefile index 4f6eff7fdfdf..a37742cd7c44 100644 --- a/components/mpas-ocean/src/Makefile +++ b/components/mpas-ocean/src/Makefile @@ -5,11 +5,13 @@ CPPLOCALFLAGS = -DEXCLUDE_INIT_MODE $(info "EXCLUDE_INIT_MODE found") endif -OCEAN_SHARED_INCLUDES = -I$(PWD)/../framework -I$(PWD)/../external/esmf_time_f90 -I$(PWD)/../operators -OCEAN_SHARED_INCLUDES += -I$(PWD)/shared -I$(PWD)/analysis_members -I$(PWD)/mode_forward -I$(PWD)/mode_analysis -OCEAN_SHARED_INCLUDES += -I$(PWD)/BGC -I$(PWD)/cvmix/src/shared -I$(PWD)/gotm/build -I$(PWD)/gotm/build/modules +FRAMEWORK_DIR = ../../../mpas-framework/src +UP = .. +OCEAN_SHARED_INCLUDES = -I$(FRAMEWORK_DIR)/framework -I$(FRAMEWORK_DIR)/external/esmf_time_f90 -I$(FRAMEWORK_DIR)/operators +OCEAN_SHARED_INCLUDES += -I$(UP)/shared -I$(UP)/analysis_members -I$(UP)/mode_forward -I$(UP)/mode_analysis +OCEAN_SHARED_INCLUDES += -I$(UP)/BGC -I$(UP)/cvmix/src/shared -I$(UP)/gotm/build -I$(UP)/gotm/build/modules ifneq "$(EXCLUDE_INIT_MODE)" "true" - OCEAN_SHARED_INCLUDES += -I$(PWD)/mode_init + OCEAN_SHARED_INCLUDES += -I$(UP)/mode_init endif GOTM_CMAKE_FLAGS = -DGOTM_BUILD_LIBRARIES_ONLY=true -DGOTM_USE_FABM=false -DGOTM_USE_NetCDF=false -DCMAKE_Fortran_COMPILER="$(FC)" -DCMAKE_Fortran_FLAGS="$(FFLAGS)" @@ -68,14 +70,14 @@ libcvmix: if [ -e cvmix/.git ]; then \ (cd cvmix/src/shared; make all FC="$(FC)" FCFLAGS="$(FFLAGS)" FINCLUDES="$(FINCLUDES)") \ else \ - (pwd ; echo "Missing core_ocean/cvmix/.git, did you forget to 'git submodule update --init --recursive' ?"; exit 1) \ + (pwd ; echo "Missing mpas-ocean/src/cvmix/.git, did you forget to 'git submodule update --init --recursive' ?"; exit 1) \ fi libBGC: if [ -e BGC/.git ]; then \ (cd BGC; make all FC="$(FC)" FCFLAGS="$(FFLAGS)" FINCLUDES="$(FINCLUDES)") \ else \ - (echo "Missing core_ocean/BGC/.git, did you forget to 'git submodule update --init --recursive' ?"; exit 1) \ + (echo "Missing mpas-ocean/src/BGC/.git, did you forget to 'git submodule update --init --recursive' ?"; exit 1) \ fi libgotm: diff --git a/components/mpas-ocean/src/build_options.mk b/components/mpas-ocean/src/build_options.mk index e979a3b0a33e..cea9e4665ae4 100644 --- a/components/mpas-ocean/src/build_options.mk +++ b/components/mpas-ocean/src/build_options.mk @@ -8,7 +8,7 @@ FCINCLUDES += -I$(ROOT_DIR)/core_ocean/mode_forward -I$(ROOT_DIR)/core_ocean/mod FCINCLUDES += -I$(ROOT_DIR)/core_ocean/shared -I$(ROOT_DIR)/core_ocean/analysis_members FCINCLUDES += -I$(ROOT_DIR)/core_ocean/cvmix/src/shared FCINCLUDES += -I$(ROOT_DIR)/core_ocean/BGC -FCINCLUDES += -I$(ROOT_DIR)/core_ocean/gotm/include +FCINCLUDES += -I$(ROOT_DIR)/core_ocean/gotm/build/modules override CPPFLAGS += -DCORE_OCEAN report_builds: diff --git a/components/mpas-seaice/src/analysis_members/Makefile b/components/mpas-seaice/src/analysis_members/Makefile index 4999f0382a78..da2f7e44ccab 100644 --- a/components/mpas-seaice/src/analysis_members/Makefile +++ b/components/mpas-seaice/src/analysis_members/Makefile @@ -15,14 +15,16 @@ mpas_seaice_analysis_driver.o: $(MEMBERS) clean: $(RM) *.o *.i *.mod *.f90 +FW = ../../../mpas-framework/src + .F.o: $(RM) $@ $*.mod ifeq "$(GEN_F90)" "true" $(CPP) $(CPPFLAGS) $(CPPINCLUDES) $< > $*.f90 - $(FC) $(FFLAGS) -c $*.f90 -I../../external/esmf_time_f90 -I../../framework -I../../operators -I../column -I../shared -I../model_forward $(FCINCLUDES) + $(FC) $(FFLAGS) -c $*.f90 -I$(FW)/external/esmf_time_f90 -I$(FW)/framework -I$(FW)/operators -I../column -I../shared -I../model_forward $(FCINCLUDES) else - $(FC) $(CPPFLAGS) $(FFLAGS) -c $*.F -I../../external/esmf_time_f90 -I../../framework -I../../operators -I../column -I../shared -I../model_forward $(CPPINCLUDES) $(FCINCLUDES) + $(FC) $(CPPFLAGS) $(FFLAGS) -c $*.F -I$(FW)/external/esmf_time_f90 -I$(FW)/framework -I$(FW)/operators -I../column -I../shared -I../model_forward $(CPPINCLUDES) $(FCINCLUDES) endif .c.o: - $(CC) $(CPPFLAGS) $(CFLAGS) $(CINCLUDES) -I../../external/esmf_time_f90 -I../../framework -I../../operators -I../column -I../shared -I../model_forward -c $< + $(CC) $(CPPFLAGS) $(CFLAGS) $(CINCLUDES) -I$(FW)/external/esmf_time_f90 -I$(FW)/framework -I$(FW)/operators -I../column -I../shared -I../model_forward -c $< diff --git a/components/mpas-seaice/src/model_forward/Makefile b/components/mpas-seaice/src/model_forward/Makefile index 523922976e65..cc97d64aa6bd 100644 --- a/components/mpas-seaice/src/model_forward/Makefile +++ b/components/mpas-seaice/src/model_forward/Makefile @@ -18,12 +18,14 @@ else FFLAGS_noSMP := $(FFLAGS) endif +FW = ../../../mpas-framework/src + .F.o: $(RM) $@ $*.mod ifeq "$(GEN_F90)" "true" $(CPP) $(CPPFLAGS) $(CPPINCLUDES) $< > $*.f90 - $(FC) $(FFLAGS_noSMP) -c $*.f90 $(FCINCLUDES) -I../../framework -I../../operators -I../../external/esmf_time_f90 -I../column -I../shared + $(FC) $(FFLAGS_noSMP) -c $*.f90 $(FCINCLUDES) -I$(FW)/framework -I$(FW)/operators -I$(FW)/external/esmf_time_f90 -I../column -I../shared else - $(FC) $(CPPFLAGS) $(FFLAGS_noSMP) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I../../framework -I../../operators -I../../external/esmf_time_f90 -I../column -I../shared + $(FC) $(CPPFLAGS) $(FFLAGS_noSMP) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I$(FW)/framework -I$(FW)/operators -I$(FW)/external/esmf_time_f90 -I../column -I../shared endif diff --git a/components/mpas-seaice/src/shared/Makefile b/components/mpas-seaice/src/shared/Makefile index 52bcb7571039..06c417313202 100644 --- a/components/mpas-seaice/src/shared/Makefile +++ b/components/mpas-seaice/src/shared/Makefile @@ -81,12 +81,14 @@ mpas_seaice_core_interface.o: mpas_seaice_core.o clean: $(RM) *.o *.i *.mod *.f90 +FW = ../../../mpas-framework/src + .F.o: $(RM) $@ $*.mod ifeq "$(GEN_F90)" "true" $(CPP) $(CPPFLAGS) $(CPPINCLUDES) $< > $*.f90 - $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../../framework -I../../operators -I../../external/esmf_time_f90 -I../column + $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I$(FW)/framework -I$(FW)/operators -I$(FW)/external/esmf_time_f90 -I../column else - $(FC) $(CPPFLAGS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I../../framework -I../../operators -I../../external/esmf_time_f90 -I../column + $(FC) $(CPPFLAGS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I$(FW)/framework -I$(FW)/operators -I$(FW)/external/esmf_time_f90 -I../column endif