Skip to content

Commit 240935d

Browse files
committed
Use ConfigManager metadata import for cali-annotation-perftest
1 parent 7b5e062 commit 240935d

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

scripts/run-annotation-perftest.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
depth=28
44
width=200
55

6-
EXE=`pwd`/test/cali-annotation-perftest
6+
EXE=$(pwd)/test/cali-annotation-perftest
77
ARGS="-d ${depth} -w ${width}"
88

99
# Run Caliper annotation benchmarks. Designed to run on LLNL dane (56 cores/socket)
@@ -12,19 +12,19 @@ for threads in 1 4 56
1212
do
1313
# Annotations only, no active measurement config
1414
OMP_NUM_THREADS=${threads} \
15-
${EXE} ${ARGS} -P spot,perftest.experiment=annotations
15+
${EXE} ${ARGS} -P "spot,metadata(perftest.experiment=annotations)"
1616

1717
# Aggregation (as used in e.g. runtime-report)
1818
OMP_NUM_THREADS=${threads} \
1919
CALI_SERVICES_ENABLE=aggregate,event,timestamp \
2020
CALI_EVENT_ENABLE_SNAPSHOT_INFO=false \
2121
CALI_TIMER_SNAPSHOT_DURATION=true \
22-
${EXE} ${ARGS} -P spot,perftest.experiment=aggregation
22+
${EXE} ${ARGS} -P "spot,metadata(perftest.experiment=aggregation)"
2323

2424
# Trace w/ snapshot info
2525
OMP_NUM_THREADS=${threads} \
2626
CALI_SERVICES_ENABLE=event,trace,timestamp \
27-
${EXE} ${ARGS} -P spot,perftest.experiment=trace
27+
${EXE} ${ARGS} -P "spot,metadata(perftest.experiment=trace)"
2828
done
2929

30-
mv *.cali /g/g90/boehme3/experiments/caliper/annotation-perftest/
30+
mv *.cali ${HOME}/experiments/caliper/annotation-perftest/

test/cali-annotation-perftest.cpp

+3-8
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void make_strings(const Config& cfg)
9999
}
100100
}
101101

102-
void record_globals(const Config& cfg, int threads, const cali::ConfigManager::argmap_t& extra_kv)
102+
void record_globals(const Config& cfg, int threads)
103103
{
104104
#ifdef CALIPER_HAVE_ADIAK
105105
adiak::value("perftest.tree_width", cfg.tree_width);
@@ -118,9 +118,6 @@ void record_globals(const Config& cfg, int threads, const cali::ConfigManager::a
118118
adiak::clustername();
119119
adiak::hostname();
120120

121-
for (auto& p : extra_kv)
122-
adiak::value(p.first, p.second);
123-
124121
for (size_t p = 0; cali_perftest_build_metadata[p][0]; ++p)
125122
adiak::value(cali_perftest_build_metadata[p][0], cali_perftest_build_metadata[p][1]);
126123

@@ -180,11 +177,9 @@ int main(int argc, char* argv[])
180177
return 2;
181178
}
182179

183-
cali::ConfigManager::argmap_t extra_kv;
184-
185180
cali::ConfigManager mgr;
186181
mgr.set_default_parameter("aggregate_across_ranks", "false");
187-
mgr.add(args.get("profile", "").c_str(), extra_kv);
182+
mgr.add(args.get("profile", "").c_str());
188183

189184
if (mgr.error())
190185
std::cerr << "Profiling config error: " << mgr.error_msg() << std::endl;
@@ -206,7 +201,7 @@ int main(int argc, char* argv[])
206201
cfg.channels = std::max(std::stoi(args.get("channels", "1")), 1);
207202

208203
// set global attributes before other Caliper initialization
209-
record_globals(cfg, threads, extra_kv);
204+
record_globals(cfg, threads);
210205

211206
make_strings(cfg);
212207

0 commit comments

Comments
 (0)