Intel compiler fails to build gups on Cori KNL upcxx/snapshot-2018-07-20

Issue #159 invalid
Scott Baden created an issue

The intel compiler complains in various places on KNL. (I didn't test the Intel compiler on Haswell) The code compiles with gnu on Haswell, kotten and on MacOS The error log including my envronment settings and the list of modules is attached in the singular tar ball.

gups is found in

git@bitbucket.org:sbbaden/scott.git

look in gups/upcxx

I had no way to select the speical snapshot in the Version, I assume it's OK to use dev

Comments (6)

  1. Amir Kamil

    What was your compilation command? It looks like you are compiling with -std=c++11 when you need -std=c++14 for icpc.

  2. Scott Baden reporter

    Right. I am able to compile now. Need to work out a way for the Makefile to sense which version of C++ is to be used in compilation I'm doing development on machines with gnu compilers/C++11

    At NERSC, there is INTEL_MAJOR_VERSION=18 and that's probably good enough for now.

  3. Dan Bonachea

    Need to work out a way for the Makefile to sense which version of C++ is to be used in compilation

    You should use upcxx-meta CXXFLAGS or the upcxx compiler wrapper script to automatically add the correct minimum -std version for the current install

  4. Scott Baden reporter

    We aren't using this convention in our example Makefiles! Both cannon and prog-guide are using CXX and PPFLAGS, but not CXXFLAGS Sounds like CXXFLAGS came later? CXXFLAGS is considered optional in the INSTALL.md file

    • CXXFLAGS: (optional) Compiler flags which set debug/optimization settings.

    I'm not sure why these should be optional, as you can always override default settings and you need CXXFLAGS to pick up -std=c++14 when needed

    Also, the upcxx wrapper is asking for UPCXX_MODE to be set but there's no hint in the INSTALL.md fuke that this is necessary

    upcxx cannon.cpp upcxx: error: please specify exactly one of -O or -g, otherwise set UPCXX_CODEMODE={O3,debug}

  5. Scott Baden reporter

    A cleaned up version of the Makefile that is consistent with what we need in our examples is in gups/upcxx

  6. Dan Bonachea

    We aren't using this convention in our example Makefiles

    From upcxx/example/prog-guide/Makefile in HEAD:

    CXX = $(shell $(ENV) $(UPCXX_INSTALL)/bin/upcxx-meta CXX)
    CPPFLAGS = $(shell $(ENV) $(UPCXX_INSTALL)/bin/upcxx-meta CPPFLAGS)
    CXXFLAGS = $(shell $(ENV) $(UPCXX_INSTALL)/bin/upcxx-meta CXXFLAGS)
    LDFLAGS = $(shell $(ENV) $(UPCXX_INSTALL)/bin/upcxx-meta LDFLAGS)
    LIBS = $(shell $(ENV) $(UPCXX_INSTALL)/bin/upcxx-meta LIBS)
    EXTRA_FLAGS =
    
    ...
    
    # The rule for building any example.
    %: %.cpp $(wildcard *.h) $(wildcard *.hpp)
            $(CXX) $@.cpp $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(EXTRA_FLAGS) $(LIBS) -o $@
    
  7. Log in to comment