Skip to content

Commit 7e08779

Browse files
author
Irina P. Demeshko
committed
Merge branch 'PassDebug2Backends' into 'master'
pass build_type=Debug to backends See merge request laristra/flecsi!78
2 parents c66f012 + eb497df commit 7e08779

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

.gitlab-ci.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ variables:
4242
FLECSI_GCC_VERSION: "7.3.0"
4343
FLECSI_PYTHON_VERSION: "3.5.1"
4444
FLECSI_ENV_SOURCE_FILE: "${CI_PROJECT_DIR}/flecsi-deps-${FLECSI_MPI_PACKAGE}-${CI_COMMIT_REF_SLUG}-${CI_CONCURRENT_ID}.sh"
45-
FLECSI_SPACK_SPEC: "flecsi%gcc@${FLECSI_GCC_VERSION} ~graphviz +hdf5 backend=${RUNTIME} ^${FLECSI_MPI_PACKAGE}"
45+
FLECSI_SPACK_SPEC: "flecsi%gcc@${FLECSI_GCC_VERSION} ~graphviz +hdf5 backend=${RUNTIME}"
4646
before_script:
4747
- echo ${CI_JOB_NAME_NOSTAGE%.*}-${CI_COMMIT_REF_SLUG}
4848
- '[ "$(git rev-parse origin/$CI_COMMIT_REF_NAME)" != "$CI_COMMIT_SHA" ] && curl --header "PRIVATE-TOKEN: $MY_CI_API_TOKEN" -X POST https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/cancel'
@@ -61,7 +61,12 @@ before_script:
6161
spack repo rm laristra_flecsi || /bin/true ;
6262
spack repo add ${CI_PROJECT_DIR}/spack-repo;
6363
spack repo list;
64-
spack build-env --dump ${FLECSI_ENV_SOURCE_FILE} "${FLECSI_SPACK_SPEC}" || /bin/true;
64+
if [[ ${BUILD_TYPE} =~ "Debug" ]];
65+
then
66+
spack build-env --dump ${FLECSI_ENV_SOURCE_FILE} "${FLECSI_SPACK_SPEC} +debug_backend ^${FLECSI_MPI_PACKAGE}" || /bin/true;
67+
else
68+
spack build-env --dump ${FLECSI_ENV_SOURCE_FILE} "${FLECSI_SPACK_SPEC} ^${FLECSI_MPI_PACKAGE}" || /bin/true;
69+
fi;
6570
) 200>${DEPS_LOCK}
6671
- source ${FLECSI_ENV_SOURCE_FILE} || /bin/true
6772
- |
@@ -180,8 +185,10 @@ before_script:
180185
spack repo rm laristra_flecsi || /bin/true ;
181186
spack repo add ${CI_PROJECT_DIR}/spack-repo;
182187
spack repo list;
183-
spack install -v --only dependencies ${FLECSI_SPACK_SPEC}openmpi%gcc@${FLECSI_GCC_VERSION};
184-
spack install -v --only dependencies ${FLECSI_SPACK_SPEC}mpich%gcc@${FLECSI_GCC_VERSION};
188+
spack install -v --only dependencies ${FLECSI_SPACK_SPEC} ^openmpi%gcc@${FLECSI_GCC_VERSION};
189+
spack install -v --only dependencies ${FLECSI_SPACK_SPEC} ^mpich%gcc@${FLECSI_GCC_VERSION};
190+
spack install -v --only dependencies ${FLECSI_SPACK_SPEC} +debug_backend ^openmpi%gcc@${FLECSI_GCC_VERSION};
191+
spack install -v --only dependencies ${FLECSI_SPACK_SPEC} +debug_backend ^mpich%gcc@${FLECSI_GCC_VERSION};
185192
) 200>${DEPS_LOCK}
186193
187194
###############

spack-repo/packages/flecsi/package.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class Flecsi(CMakePackage):
2626
description='The build type to build', multi=False)
2727
variant('backend', default='mpi', values=('serial', 'mpi', 'legion', 'hpx'),
2828
description='Backend to use for distributed memory', multi=False)
29+
variant('debug_backend', default=False,
30+
description='Build Backend with Debug Mode')
2931
variant('minimal', default=False,
3032
description='Disable FindPackageMetis')
3133
variant('shared', default=True,
@@ -55,8 +57,11 @@ class Flecsi(CMakePackage):
5557
depends_on('mpi', when='backend=mpi')
5658
depends_on('mpi', when='backend=legion')
5759
depends_on('mpi', when='backend=hpx')
60+
depends_on('legion@ctrl-rep +shared +mpi build_type=Debug +hdf5', when='backend=legion +debug_backend +hdf5')
61+
depends_on('legion@ctrl-rep +shared +mpi build_type=Debug', when='backend=legion +debug_backend ~hdf5')
5862
depends_on('legion@ctrl-rep +shared +mpi +hdf5', when='backend=legion +hdf5')
5963
depends_on('legion@ctrl-rep +shared +mpi', when='backend=legion ~hdf5')
64+
depends_on('hpx@1.3.0 cxxstd=14 build_type=Debug', when='backend=hpx +debug_backend')
6065
depends_on('hpx@1.3.0 cxxstd=14', when='backend=hpx')
6166
depends_on('boost@1.70.0: cxxstd=14 +program_options')
6267
depends_on('metis@5.1.0:')

spack-repo/packages/legion/package.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ def cmake_args(self):
6969
'-DBUILD_SHARED_LIBS=%s' % ('+shared' in self.spec)]
7070

7171
if self.spec.variants['build_type'].value == 'Debug':
72-
cmake_cxx_flags.append('-DDEBUG_REALM', '-DDEBUG_LEGION', '-ggdb')
72+
cmake_cxx_flags.append('-DDEBUG_REALM')
73+
cmake_cxx_flags.append('-DDEBUG_LEGION')
74+
cmake_cxx_flags.append('-ggdb')
7375

7476
options.append('-DCMAKE_CXX_FLAGS=%s' % (" ".join(cmake_cxx_flags)))
7577

0 commit comments

Comments
 (0)