nobs include path broken on clang

Issue #136 resolved
Dan Bonachea created an issue

As of yesterday's perturbation to the upcxx header include structure in 1f3f934 , nobs is now breaking the compilation on clang across macOS and Linux:

http://upc-bugs.lbl.gov/upc_tests/showlog.php?date=2018-04-05&config=EX-dirac-ibv-clang&opt=dbg&log=upcxx

where it drops the necessary GASNet include path:

/usr/local/pkg/openmpi-3.0.0/clang-5.0.0/bin/mpicxx -Wno-unused-command-line-argument -std=c++11 -D_GNU_SOURCE=1 -I/home/upcnightly/EX-dirac-ibv-clang/runtime/bld/dbg/upcxx/.nobs/art/e15af02af9865558b39073c315239fd0d9eaf673 -DUPCXX_ASSERT_ENABLED=1 -DUPCXX_BACKEND=1 -DUPCXX_BACKEND_GASNET_SEQ=1 -DUPCXX_LPC_INBOX_lockfree=1 -DNOBS_DISCOVERY -MM -MT x /home/upcnightly/EX-dirac-ibv-clang/runtime/bld/dbg/upcxx/src/atomic.cpp

/home/upcnightly/EX-dirac-ibv-clang/runtime/bld/dbg/upcxx/src/atomic.cpp:6:12: fatal error: 'gasnet_ratomic.h' file not found
  #include 
           ^~~~~~~~~~~~~~~~~~
1 error generated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pkg/openmpi-3.0.0/clang-5.0.0/bin/mpicxx -Wno-unused-command-line-argument -std=c++11 -D_GNU_SOURCE=1 -I/home/upcnightly/EX-dirac-ibv-clang/runtime/bld/dbg/upcxx/.nobs/art/e15af02af9865558b39073c315239fd0d9eaf673 -DUPCXX_ASSERT_ENABLED=1 -DUPCXX_BACKEND=1 -DUPCXX_BACKEND_GASNET_SEQ=1 -DUPCXX_LPC_INBOX_lockfree=1 -DNOBS_DISCOVERY -MM -MT x /home/upcnightly/EX-dirac-ibv-clang/runtime/bld/dbg/upcxx/src/vis.cpp

/home/upcnightly/EX-dirac-ibv-clang/runtime/bld/dbg/upcxx/src/vis.cpp:4:10: fatal error: 'gasnet_vis.h' file not found
#include  //
         ^~~~~~~~~~~~~~
1 error generated.

This has been an issue several times before with similar changes - the nobs include path implementation seems to be very brittle in practice.

John - can you please look into this?

We really need a fix for this ongoing nobs issue.

Comments (2)

  1. john bachan

    How do I reproduce the environment? My attempts have been pcp-d-1 and pcp-d-5, module unload gcc-*** and module load clang/5.0.0. Then I set CC=clang CXX=clang++. But everything still works.

    Nevermind, I've reproduced it.

  2. john bachan

    Fix issue 136. src/atomic.cpp and src/vis.cpp weren't guarding gasnet includes with #if !NOBS_DISCOVERY. Since gasnet provides no "sanctioned" way to detect if its headers are safe to include (lacks a -DGASNET) we just rely on the fact that they won't include anything nobs discovery cares about so we don't include them at all.

    Fix issue 134. src/vis.hpp was using std::vector without doing #include <vector>.

    → <<cset 37be4f1a4403>>

  3. Log in to comment