#2548: Compilation failure: "const" assignment in LoopControl/src/loopcontrol.cc
Reporter: Bernard Kelly
Status: new
Milestone: ET_2021_05
Version: ET_2021_05
Type: bug
Priority: blocker
Component: EinsteinToolkit thorn
Changes (by Bernard Kelly):
Fresh download & first compilation of the latest ETK release. Compilation fails during LoopControl because a dynamic variable is used to set a const constexpr parameter “lc\_random\_range”. Here’s the error message:
`COMPILING Carpet/LoopControl/src/loopcontrol.cc /gpfs/scratch/bjk0015/codes/Cactus_ET_2021_05/arrangements/Carpet/LoopControl/src/loopcontrol.cc(70): error: function call must have a constant value in a constant expression lc_random.max() - lc_random.min() + 1; ^`
`/gpfs/scratch/bjk0015/codes/Cactus_ET_2021_05/arrangements/Carpet/LoopControl/src/loopcontrol.cc(70): error: function call must have a constant value in a constant expression lc_random.max() - lc_random.min() + 1;`
… though it’s useful to see the full assignment, which begins the line before \(line 69\):
`minstd_rand::result_type const constexpr lc_random_range = lc_random.max() - lc_random.min() + 1;`
Fix: take out the “const” and “constexpr” descriptors from the lc\_random\_range declaration. git diff is attached.
Further notes:
The compilation is on the WVU machine Spruce Knob, using the Intel 17.0.1 compiler. I’m using the following configuration options:
CC=icc
CFLAGS=-Ofast -qopenmp -xHost -align -std=gnu99
CPP=cpp
CPPFLAGS=-DMPICH\_IGNORE\_CXX\_SEEK
CPP\_DEBUG\_FLAGS=-DCARPET\_DEBUG
CPP\_OPENMP\_FLAGS=-fopenmp
CROSS\_COMPILE=yes
CXX=icpc
CXXFLAGS=-Ofast -qopenmp -xHost -align -std=gnu\+\+11
CXX\_DEBUG\_FLAGS=-O0
CXX\_NO\_OPTIMISE\_FLAGS=-O0
CXX\_OPENMP\_FLAGS=-fopenmp
CXX\_OPTIMISE\_FLAGS=-Ofast
CXX\_PROFILE\_FLAGS=-pg
C\_DEBUG\_FLAGS=-O0
C\_LINE\_DIRECTIVES=yes
C\_NO\_OPTIMISE\_FLAGS=-O0
C\_OPENMP\_FLAGS=-fopenmp
C\_OPTIMISE\_FLAGS=-Ofast
C\_PROFILE\_FLAGS=-pg
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2548/compilation-failu…
#2548: Compilation failure: "const" assignment in LoopControl/src/loopcontrol.cc
Reporter: Bernard Kelly
Status: new
Milestone: ET_2021_05
Version: ET_2021_05
Type: bug
Priority: blocker
Component: EinsteinToolkit thorn
Fresh download & first compilation of the latest ETK release. Compilation fails during LoopControl because a dynamic variable is used to set a const constexpr parameter “lc\_random\_range”. Here’s the error message:
`COMPILING Carpet/LoopControl/src/loopcontrol.cc
/gpfs/scratch/bjk0015/codes/Cactus_ET_2021_05/arrangements/Carpet/LoopControl/src/loopcontrol.cc(70): error: function call must have a constant value in a constant expression
lc_random.max() - lc_random.min() + 1;
^
/gpfs/scratch/bjk0015/codes/Cactus_ET_2021_05/arrangements/Carpet/LoopControl/src/loopcontrol.cc(70): error: function call must have a constant value in a constant expression
lc_random.max() - lc_random.min() + 1;`
… though it’s useful to see the full assignment, which begins the line before \(line 69\):
`
minstd_rand::result_type const constexpr lc_random_range =
lc_random.max() - lc_random.min() + 1;`
Fix: take out the “const” and “constexpr” descriptors from the lc\_random\_range declaration. git diff is attached.
Further notes:
The compilation is on the WVU machine Spruce Knob, using the Intel 17.0.1 compiler. I’m using the following configuration options:
CC=icc
CFLAGS=-Ofast -qopenmp -xHost -align -std=gnu99
CPP=cpp
CPPFLAGS=-DMPICH\_IGNORE\_CXX\_SEEK
CPP\_DEBUG\_FLAGS=-DCARPET\_DEBUG
CPP\_OPENMP\_FLAGS=-fopenmp
CROSS\_COMPILE=yes
CXX=icpc
CXXFLAGS=-Ofast -qopenmp -xHost -align -std=gnu\+\+11
CXX\_DEBUG\_FLAGS=-O0
CXX\_NO\_OPTIMISE\_FLAGS=-O0
CXX\_OPENMP\_FLAGS=-fopenmp
CXX\_OPTIMISE\_FLAGS=-Ofast
CXX\_PROFILE\_FLAGS=-pg
C\_DEBUG\_FLAGS=-O0
C\_LINE\_DIRECTIVES=yes
C\_NO\_OPTIMISE\_FLAGS=-O0
C\_OPENMP\_FLAGS=-fopenmp
C\_OPTIMISE\_FLAGS=-Ofast
C\_PROFILE\_FLAGS=-pg
attachment: git_diff_loopcontrol_dot_cc.txt (https://api.bitbucket.org/2.0/repositories/einsteintoolkit/tickets/issues/2…)
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2548/compilation-failu…
#2547: Compilation failure: "invalid type" errors in Vectors vmask code
Reporter: Bernard Kelly
Status: new
Milestone: ET_2021_05
Version: ET_2021_05
Type: bug
Priority: blocker
Component: EinsteinToolkit thorn
Fresh download & first compilation of latest ETK release: compilation fails during Vectors thorn because of issues with “vmask” code:
`In file included from /gpfs/scratch/bjk0015/codes/Cactus_ET_2021_05/arrangements/CactusUtils/Vectors/src/vectors.cc(1):
/gpfs/scratch/bjk0015/codes/Cactus_ET_2021_05/arrangements/CactusUtils/Vectors/src/vectors.h(1228): error: invalid type for defaulted constructor
vmask(vmask &&) = default;
^
In file included from /gpfs/scratch/bjk0015/codes/Cactus_ET_2021_05/arrangements/CactusUtils/Vectors/src/vectors.cc(1):
/gpfs/scratch/bjk0015/codes/Cactus_ET_2021_05/arrangements/CactusUtils/Vectors/src/vectors.h(1230): error: invalid type for defaulted assignment operator
vmask &operator=(vmask &&) = default;`
I can fix this issue by commenting out the definition of the “vmask” structure, and the following code that calls it – which is apparently not used in the rest of the code anyway. git diff is attached here.
Further notes:
The compilation is on the WVU machine Spruce Knob, using the Intel 17.0.1 compiler. I’m using the following configuration options:
CC=icc
CFLAGS=-Ofast -qopenmp -xHost -align -std=gnu99
CPP=cpp
CPPFLAGS=-DMPICH\_IGNORE\_CXX\_SEEK
CPP\_DEBUG\_FLAGS=-DCARPET\_DEBUG
CPP\_OPENMP\_FLAGS=-fopenmp
CROSS\_COMPILE=yes
CXX=icpc
CXXFLAGS=-Ofast -qopenmp -xHost -align -std=gnu\+\+11
CXX\_DEBUG\_FLAGS=-O0
CXX\_NO\_OPTIMISE\_FLAGS=-O0
CXX\_OPENMP\_FLAGS=-fopenmp
CXX\_OPTIMISE\_FLAGS=-Ofast
CXX\_PROFILE\_FLAGS=-pg
C\_DEBUG\_FLAGS=-O0
C\_LINE\_DIRECTIVES=yes
C\_NO\_OPTIMISE\_FLAGS=-O0
C\_OPENMP\_FLAGS=-fopenmp
C\_OPTIMISE\_FLAGS=-Ofast
C\_PROFILE\_FLAGS=-pg
attachment: git_diff_vectors_dot_h.txt (https://api.bitbucket.org/2.0/repositories/einsteintoolkit/tickets/issues/2…)
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2547/compilation-failu…
#2546: CarpetIOHDF5: Don't set "delta" attribute to zero for zero-width components
Reporter: Erik Schnetter
Status: new
Milestone:
Version: development version
Type: enhancement
Priority: minor
Component:
Comment (by Roland Haas):
Please review.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2546/carpetiohdf5-dont…
#2546: CarpetIOHDF5: Don't set "delta" attribute to zero for zero-width components
Reporter: Erik Schnetter
Status: new
Milestone:
Version: development version
Type: enhancement
Priority: minor
Component:
Carpet’s HDF5 format outputs a `delta` attribute that describes the grid spacing for each written chunk. Currently `delta` is always set to zero for zero-width components, i.e. e.g. for 2d arrays. This confuses post-processing tools.
This pull request passes the actual grid spacing to the writer routine, and writes the correct grid spacing into the attribute.
The pull request is at [https://bitbucket.org/eschnett/carpet/pull-requests/46](https://bitbucket.o… .
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2546/carpetiohdf5-dont…