From 3c7a4106ed20d92f4352cdb6e3394c2a8762ba44 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 7 May 2018 17:26:39 +0100 Subject: [PATCH] Trap for deadly empty comm thread option --- lib/util/Init.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util/Init.cc b/lib/util/Init.cc index 45a37a02..7dc8230e 100644 --- a/lib/util/Init.cc +++ b/lib/util/Init.cc @@ -385,6 +385,7 @@ void Grid_init(int *argc,char ***argv) if( GridCmdOptionExists(*argv,*argv+*argc,"--comms-threads") ){ arg= GridCmdOptionPayload(*argv,*argv+*argc,"--comms-threads"); GridCmdOptionInt(arg,CartesianCommunicator::nCommThreads); + assert(CartesianCommunicator::nCommThreads > 0); } if( GridCmdOptionExists(*argv,*argv+*argc,"--cacheblocking") ){ arg= GridCmdOptionPayload(*argv,*argv+*argc,"--cacheblocking");