From 04ca0652814bed46eba6a5782c9284908ca5f3f8 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 29 Feb 2024 20:09:11 -0500 Subject: [PATCH] Only one rank opens --- benchmarks/Benchmark_usqcd.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/benchmarks/Benchmark_usqcd.cc b/benchmarks/Benchmark_usqcd.cc index 526e5659..7b1fddd4 100644 --- a/benchmarks/Benchmark_usqcd.cc +++ b/benchmarks/Benchmark_usqcd.cc @@ -842,10 +842,14 @@ public: int main (int argc, char ** argv) { - - FP = fopen("Benchmark_usqcd.csv","w"); Grid_init(&argc,&argv); + if (GlobalSharedMemory::WorldRank==0) { + FP = fopen("Benchmark_usqcd.csv","w"); + } else { + FP = fopen("/dev/null","w"); + } + CartesianCommunicator::SetCommunicatorPolicy(CartesianCommunicator::CommunicatorPolicySequential); #ifdef KNL LebesgueOrder::Block = std::vector({8,2,2,2});