Skip to content

PeleC stopped building with the Intel compiler #429

@jrood-nrel

Description

@jrood-nrel

After the baselib_f stuff changed it seems to have broken our ability to build PeleC with the Intel compiler due to it not linking stdc++ any longer and now it also seems to produce duplicate main functions during linking. Here is the diff of how I solved it for us in the meantime, but not sure of the best way for it to be solved generally.

$ git diff Tools/GNUMake/comps/intel.mak
diff --git a/Tools/GNUMake/comps/intel.mak b/Tools/GNUMake/comps/intel.mak
index 81f73914f..0c5f0a6f0 100644
--- a/Tools/GNUMake/comps/intel.mak
+++ b/Tools/GNUMake/comps/intel.mak
@@ -23,15 +23,15 @@ ifeq ($(DEBUG),TRUE)
 
   CXXFLAGS += -g -O0 -traceback -Wcheck
   CFLAGS   += -g -O0 -traceback -Wcheck
-  FFLAGS   += -g -O0 -traceback -check bounds,uninit,pointers
-  F90FLAGS += -g -O0 -traceback -check bounds,uninit,pointers
+  FFLAGS   += -g -O0 -traceback -check bounds,uninit,pointers -nofor_main
+  F90FLAGS += -g -O0 -traceback -check bounds,uninit,pointers -nofor_main
 
 else
 
   CXXFLAGS += -g -O2 -ip -qopt-report=5 -qopt-report-phase=vec
   CFLAGS   += -g -O2 -ip -qopt-report=5 -qopt-report-phase=vec
-  FFLAGS   += -g -O2 -ip -qopt-report=5 -qopt-report-phase=vec
-  F90FLAGS += -g -O2 -ip -qopt-report=5 -qopt-report-phase=vec
+  FFLAGS   += -g -O2 -ip -qopt-report=5 -qopt-report-phase=vec -nofor_main
+  F90FLAGS += -g -O2 -ip -qopt-report=5 -qopt-report-phase=vec -nofor_main
 
 endif
 
@@ -72,7 +72,7 @@ ifeq ($(USE_OMP),TRUE)
   override XTRALIBS += -lifcoremt
 endif
 
-LINK_WITH_FORTRAN_COMPILER ?= $(USE_F_INTERFACES)
+LINK_WITH_FORTRAN_COMPILER ?= TRUE
 
 ifeq ($(LINK_WITH_FORTRAN_COMPILER),TRUE)
   override XTRALIBS += -lstdc++

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions