Closed matthewhoffman closed 6 years ago
@mgduda , this is the fix for the bug we were seeing in E3SM using the release branch. When cice/develop was merged into develop, support for C++ compilers was accidentally lost in the ESM Makefiles. Here is the diff that was included in the merge commit:
diff --git a/src/Makefile.in.ACME b/src/Makefile.in.ACME
index ad507cf3a..7e78ac649 100644
--- a/src/Makefile.in.ACME
+++ b/src/Makefile.in.ACME
@@ -41,7 +41,6 @@ RM = rm -f
CPP = cpp -P -traditional
FC=$(MPIFC)
CC=$(MPICC)
-CXX=$(MPICXX)
NETCDF=$(NETCDF_PATH)
PNETCDF=$(PNETCDF_PATH)
PIO=$(INSTALL_SHAREDPATH)/pio
@@ -71,7 +70,7 @@ all:
@echo $(CPPINCLUDES)
@echo $(FCINCLUDES)
( $(MAKE) mpas RM="$(RM)" CPP="$(CPP)" NETCDF="$(NETCDF)" PNETCDF="$(PNETCDF)" \
- PIO="$(PIO)" FC="$(FC)" CC="$(CC)" CXX="$(CXX)" SFC="$(SFC)" SCC="$(SCC)" \
+ PIO="$(PIO)" FC="$(FC)" CC="$(CC)" SFC="$(SFC)" SCC="$(SCC)" \
CPPFLAGS="$(CPPFLAGS)" CPPINCLUDES="$(CPPINCLUDES)" FCINCLUDES="$(FCINCLUDES)" \
FFLAGS="$(FFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" )
@@ -83,7 +82,7 @@ mpas: externals frame ops dycore drver
ar ru lib$(COMPONENT).a $(DRIVER)/*.o
externals:
- ( cd external; $(MAKE) FC="$(FC)" SFC="$(SFC)" CC="$(CC)" CXX="$(CXX)" SCC="$(SCC)" FFLAGS="$(FFLAGS)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" NETCDF="$(NETCDF)" CORE="$(CORE)" ezxml-lib )
+ ( cd external; $(MAKE) FC="$(FC)" SFC="$(SFC)" CC="$(CC)" SCC="$(SCC)" FFLAGS="$(FFLAGS)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" NETCDF="$(NETCDF)" CORE="$(CORE)" ezxml-lib )
drver: externals frame ops dycore
( cd $(DRIVER); $(MAKE) CPPFLAGS="$(CPPFLAGS)" CPPINCLUDES="$(CPPINCLUDES)" FREEFLAGS="$(FREEFLAGS)" all )
The fix was very straightforward - just undo the diff above. I'm assigning you because it touches both the ACME and CESM versions. I confirmed the fix eliminates the bug in E3SM.
See #558 for the original introduction of this code. Still not sure how it got removed.
This looks good to me.
Merge commit 1b3de97f inadvertently removed support for C++ compilers in the ESM Makefiles. This merge reinserts the lines that were removed. It has been branched from the commit that introduced the bug (1b3de97f).