#2078: thorn vectors fails if vectorizatin is disabled -----------------------------------+---------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Keywords: Vectors | -----------------------------------+---------------------------------------- At least in one case (gcc 7.2) thorn Vectors seems to fail with a message that overloading is not allowed in line 671 of vectors.h {{{ explicit constexpr vectype(scalar_t const &a) : v(props::set1(a)) {} }}} if vectorization is disabled (VECTORISE=no). My guess would be that in this case scalar_t and vector_t are the same and a conflict exists (or some other assumption is violated).
I'll provide more details once I have a a nicer testcase.
#2078: thorn vectors fails if vectorizatin is disabled ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Vectors ------------------------------------+---------------------------------------
Comment (by eschnett):
I cannot repeat this on MacOS with gcc 7.2.0.
Without vectorization, the types "scalar_t" and "vector_t" are indeed the same. However, "vectype" is a different type -- it is a C++ class wrapping "vector_t", and providing a more modern interface.
Can you post the full error message?
#2078: thorn vectors fails if vectorization is disabled ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Vectors ------------------------------------+---------------------------------------
#2078: thorn vectors fails if vectorization is disabled ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Vectors ------------------------------------+---------------------------------------
Comment (by rhaas):
Ok, got a test case:
{{{ diff --git a/Vectors/src/vectors.cc b/Vectors/src/vectors.cc index a2725d3..ffbf9b2 100644 --- a/Vectors/src/vectors.cc +++ b/Vectors/src/vectors.cc @@ -7,5 +7,8 @@ extern "C" int Vectors_Startup(void) { CCTK_VInfo(CCTK_THORNSTRING, "Using vector size %d for architecture %s", CCTK_REAL_VEC_SIZE, vec_architecture); + + CCTK_REAL myscal = 42.; + vectype<CCTK_REAL> myvec(myscal); return 0; } }}} which fails with: {{{ n file included from /data/rhaas/postdoc/gr/cactus/ET_trunk/configs/sim/build/Vectors/vectors.cc:1:0: /data/rhaas/postdoc/gr/cactus/ET_trunk/arrangements/CactusUtils/Vectors/src/vectors.h: In instantiation of ‘class vectype<double>’: /data/rhaas/postdoc/gr/cactus/ET_trunk/configs/sim/build/Vectors/vectors.cc:12:34: required from here /data/rhaas/postdoc/gr/cactus/ET_trunk/arrangements/CactusUtils/Vectors/src/vectors.h:671:22: error: ‘constexpr vectype<T>::vectype(const scalar_t&) [with T = double; vectype<T>::scalar_t = double]’ cannot be overloaded explicit constexpr vectype(scalar_t const &a) : v(props::set1(a)) {} ^~~~~~~ /data/rhaas/postdoc/gr/cactus/ET_trunk/arrangements/CactusUtils/Vectors/src/vectors.h:670:13: error: with ‘constexpr vectype<T>::vectype(const vector_t&) [with T = double; vectype<T>::vector_t = double]’ constexpr vectype(vector_t const &x) : v(x) {} ^~~~~~~ }}} I attach a tarball of the modified Vectors thorn as well as config-info.
#2078: thorn vectors fails if vectorization is disabled ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: eschnett Type: defect | Status: assigned Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Vectors ------------------------------------+--------------------------------------- Changes (by rhaas):
* owner: => eschnett * status: new => assigned
#2078: thorn vectors fails if vectorization is disabled ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: eschnett Type: defect | Status: assigned Priority: major | Milestone: ET_2018_02 Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Vectors ------------------------------------+--------------------------------------- Changes (by rhaas):
* milestone: => ET_2018_02
Comment:
@eschnett: ping
#2078: thorn vectors fails if vectorization is disabled ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: eschnett Type: defect | Status: closed Priority: major | Milestone: ET_2018_02 Component: EinsteinToolkit thorn | Version: development version Resolution: fixed | Keywords: Vectors ------------------------------------+--------------------------------------- Changes (by rhaas):
* status: assigned => closed * resolution: => fixed
#2078: thorn vectors fails if vectorization is disabled ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: eschnett Type: defect | Status: closed Priority: major | Milestone: ET_2018_02 Component: EinsteinToolkit thorn | Version: development version Resolution: fixed | Keywords: Vectors ------------------------------------+---------------------------------------
Comment (by rhaas):
Applied in git hash db84c98c "CarpetLib: use O1 in bbox.cc for all Intel
17.0 compilers" of Carpet for carpet master and git hash 703ac0d3
"CarpetLib: use O1 in bbox.cc for all Intel >17.0 compilers" in ET_2017_06.
trac@lists.einsteintoolkit.org