From 23f870d7b69f67a84bc7a712d7d91d420db2dbc7 Mon Sep 17 00:00:00 2001 From: Veronique Legrand <vlegrand@pasteur.fr> Date: Wed, 30 May 2018 17:10:01 +0200 Subject: [PATCH] bug fixed in handling options --- _modules/main_utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_modules/main_utils.py b/_modules/main_utils.py index c3542e9..682d8e7 100644 --- a/_modules/main_utils.py +++ b/_modules/main_utils.py @@ -279,16 +279,16 @@ class InputDerivedDataArgs: # Here gather user input parameters and former global variable that define how the data will be processed from a technical point of view (ex: multicore,gpu...) class technicalParms: def __init__(self,core,gpu,mean): - if gpu != 0 and core != 1: - print "Choose either multicore or gpu!" - exit(1) - self.core=core + self.core = core if core == None: self.core = 1 + if gpu ==True and self.core > 1: + print "Choose either multicore or gpu!" + exit(1) self.limit_coverage = max(50, mean * 2) / self.core self.gpu=gpu if gpu == None: - self.gpu = 0 + self.gpu = False # Checks options consistency and instantiates data structure for main. -- GitLab