diff --git a/CEP/Pipeline/recipes/sip/master/bbs_reducer.py b/CEP/Pipeline/recipes/sip/master/bbs_reducer.py index 5fda848e56d55e3bc278e8898c1125beef19e4c3..25bab0248d2594ef79d032b65076c6daa5f51621 100644 --- a/CEP/Pipeline/recipes/sip/master/bbs_reducer.py +++ b/CEP/Pipeline/recipes/sip/master/bbs_reducer.py @@ -26,6 +26,11 @@ class bbs_reducer(BaseRecipe, RemoteCommandRecipeMixIn): '-p', '--parset', help="BBS configuration parset" ), + 'nthreads': ingredient.IntField( + '--nthreads', + default=8, + help="Number of threads per process" + ), 'executable': ingredient.ExecField( '--executable', help="The full path to the BBS-reducer executable" @@ -115,7 +120,10 @@ class bbs_reducer(BaseRecipe, RemoteCommandRecipeMixIn): self.inputs['executable'], self.inputs['parset'], self.environment - ] + ], + resources={ + "cores": self.inputs['nthreads'] + } ) ) self._schedule_jobs(self.jobs) diff --git a/CEP/Pipeline/recipes/sip/master/imager_bbs.py b/CEP/Pipeline/recipes/sip/master/imager_bbs.py index c17450c4bff8b07dfc038c4e4de812d06f90a7e8..809c2f182fe9dce88e7586e044108f6856760d62 100644 --- a/CEP/Pipeline/recipes/sip/master/imager_bbs.py +++ b/CEP/Pipeline/recipes/sip/master/imager_bbs.py @@ -36,6 +36,11 @@ class imager_bbs(BaseRecipe, RemoteCommandRecipeMixIn): '-p', '--parset', help="BBS configuration parset" ), + 'nthreads': ingredient.IntField( + '--nthreads', + default=8, + help="Number of threads per process" + ), 'bbs_executable': ingredient.StringField( '--bbs-executable', help="BBS standalone executable (bbs-reducer)" @@ -128,7 +133,10 @@ class imager_bbs(BaseRecipe, RemoteCommandRecipeMixIn): arguments = [self.inputs['bbs_executable'], self.inputs['parset'], ms_list_path, parmdb_list_path, sourcedb_list_path] - jobs.append(ComputeJob(host, node_command, arguments)) + jobs.append(ComputeJob(host, node_command, arguments, + resources={ + "cores": self.inputs['nthreads'] + })) # start and wait till all are finished self._schedule_jobs(jobs) diff --git a/CEP/Pipeline/recipes/sip/tasks.cfg.CEP4.in b/CEP/Pipeline/recipes/sip/tasks.cfg.CEP4.in index 895a78d7a965ebbc2e1e8f71fcc1d530692865fc..c6708c6933294ec9ce2951a041815ad7fa6eac7a 100644 --- a/CEP/Pipeline/recipes/sip/tasks.cfg.CEP4.in +++ b/CEP/Pipeline/recipes/sip/tasks.cfg.CEP4.in @@ -1,6 +1,5 @@ [ndppp] nproc = 0 -nthreads = 8 [setupparmdb] nproc = 0 diff --git a/CEP/Pipeline/recipes/sip/tasks.cfg.in b/CEP/Pipeline/recipes/sip/tasks.cfg.in index ab6fcb96cbe487190693196e1e850dcb62b40240..5d6d46b8fb8c76200b44616a2e79fd513bd9992b 100644 --- a/CEP/Pipeline/recipes/sip/tasks.cfg.in +++ b/CEP/Pipeline/recipes/sip/tasks.cfg.in @@ -86,6 +86,7 @@ makesourcedb_path = %(lofarroot)s/bin/makesourcedb [imager_bbs] recipe = imager_bbs bbs_executable = %(lofarroot)s/bin/bbs-reducer +nthreads = 8 [imager_source_finding] recipe = imager_source_finding @@ -106,6 +107,7 @@ parset = %(runtime_directory)s/%(job_name)s/parsets/bbs.parset instrument_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/instrument.mapfile sky_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/sky.mapfile data_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/bbs.mapfile +nthreads = 8 [selfcal_awimager] recipe = selfcal_awimager