From fab3826800d6a2706e12b262cfb4dddb5a75eecd Mon Sep 17 00:00:00 2001 From: Alexey Kozlov Date: Tue, 23 Jan 2018 14:21:43 +0100 Subject: [PATCH] quartets: do not close unopened file in non-master MPI processes (fixes a segfault at the end of quartet computation) --- examl/quartets.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examl/quartets.c b/examl/quartets.c index cabea69..3457eba 100644 --- a/examl/quartets.c +++ b/examl/quartets.c @@ -611,5 +611,6 @@ void computeQuartets(tree *tr, analdef *adef) assert(0); } - fclose(f); + if(processID == 0) + fclose(f); }