Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit ec39501

Browse files
authored
Fixes compilation error with reportinglib (#474)
* Fixed compilation issue with reportinglib * Enable reportinglib in coreneuron CI * Add libsonata reports tests to the CI
1 parent 2b64fe7 commit ec39501

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,9 @@ if(CORENRN_ENABLE_REPORTING)
211211
add_definitions("-DENABLE_SONATA_REPORTS")
212212
elseif(reportinglib_FOUND)
213213
add_definitions("-DENABLE_BIN_REPORTS")
214-
set(ENABLE_BIN_REPORTS ON)
215214
else() # sonata_FOUND
216215
if(TARGET sonata::sonata_report)
217216
add_definitions("-DENABLE_SONATA_REPORTS")
218-
set(ENABLE_SONATA_REPORTS ON)
219217
set(reportinglib_INCLUDE_DIR "")
220218
set(reportinglib_LIBRARY "")
221219
else()

coreneuron/io/reports/report_handler.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace coreneuron {
1414

1515
void ReportHandler::create_report(double dt, double tstop, double delay) {
16-
#if defined(ENABLE_BIN_REPORTSLIB) || defined(ENABLE_SONATA_REPORTS)
16+
#if defined(ENABLE_BIN_REPORTS) || defined(ENABLE_SONATA_REPORTS)
1717
if (m_report_config.start < t) {
1818
m_report_config.start = t;
1919
}
@@ -75,10 +75,10 @@ void ReportHandler::create_report(double dt, double tstop, double delay) {
7575
std::cerr << "[WARNING] : Reporting is disabled. Please recompile with either libsonata or "
7676
"reportinglib. \n";
7777
}
78-
#endif // defined(ENABLE_BIN_REPORTSLIB) || defined(ENABLE_SONATA_REPORTS)
78+
#endif // defined(ENABLE_BIN_REPORTS) || defined(ENABLE_SONATA_REPORTS)
7979
}
8080

81-
#if defined(ENABLE_BIN_REPORTSLIB) || defined(ENABLE_SONATA_REPORTS)
81+
#if defined(ENABLE_BIN_REPORTS) || defined(ENABLE_SONATA_REPORTS)
8282
void ReportHandler::register_soma_report(const NrnThread& nt,
8383
ReportConfiguration& config,
8484
const VarsToReport& vars_to_report) {
@@ -323,6 +323,6 @@ std::vector<int> ReportHandler::map_gids(const NrnThread& nt) const {
323323
}
324324
return nodes_gid;
325325
}
326-
#endif // defined(ENABLE_BIN_REPORTSLIB) || defined(ENABLE_SONATA_REPORTS)
326+
#endif // defined(ENABLE_BIN_REPORTS) || defined(ENABLE_SONATA_REPORTS)
327327

328328
} // Namespace coreneuron

tests/jenkins/install_coreneuron.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set -x
66
source ${JENKINS_DIR:-.}/_env_setup.sh
77

88
reportinglib_dir=$(spack location --install-dir --latest reportinglib%intel)
9+
libsonata_report_dir=$(spack location --install-dir --latest libsonata-report%intel)
910

1011
CORENRN_TYPE="$1"
1112

@@ -61,8 +62,8 @@ elif [ "${CORENRN_TYPE}" = "AoS" ] || [ "${CORENRN_TYPE}" = "SoA" ]; then
6162
-DCMAKE_BUILD_TYPE=Debug \
6263
-DCORENRN_ENABLE_SOA=$CORENRN_ENABLE_SOA \
6364
-DCORENRN_ENABLE_OPENMP=$ENABLE_OPENMP \
64-
-DCORENRN_ENABLE_BIN_REPORTS=ON \
65-
-DCMAKE_PREFIX_PATH=$reportinglib_dir \
65+
-DCORENRN_ENABLE_REPORTING=ON \
66+
-DCMAKE_PREFIX_PATH="$reportinglib_dir;$libsonata_report_dir" \
6667
-DTEST_MPI_EXEC_BIN="mpirun" \
6768
-DTEST_EXEC_PREFIX="mpirun;-n;2" \
6869
-DAUTO_TEST_WITH_SLURM=OFF \

tests/jenkins/install_neuron_reportinglib.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ set -e
2222
set -x
2323
source ${JENKINS_DIR:-.}/_env_setup.sh
2424

25-
# Install reportinglib with spack to run reportinglib tests
25+
# Install reportinglib & libsonata with spack to run reporting tests
2626
spack install reportinglib%intel
27+
spack install libsonata-report%intel
2728

2829
patch_neuron
2930
spack install neuron+debug@develop~legacy-unit

0 commit comments

Comments
 (0)