Commits

Takeshi Nakazato authored and Ville Suoranta committed cffd9dc77f7 Merge
Pull request #572: CAS-13713 do not override OpenMP configuration

Merge in CASA/casa6 from CAS-13713 to master * commit '22a3bba8911dc8e82b1dfde77b3dbe6b8c6293f9': (21 commits) CAS-13713 skip OpenMP tests on macOS CAS-13713 bug fix on environment_variable_manager CAS-13713 renaming variables CAS-13713 properly handle the case that OMP_NUM_THREADS is zero CAS-13713 refactoring pattern matching CAS-13713 refinement of assertion CAS-13713 define variable to hold OMP_NUM_THREADS value as int CAS-13713 add test for unsetting OMP_NUM_THREADS CAS-13713 replace print statement with casalog.post CAS-13713 bug fix on regex CAS-13713 turning precondition into assertion CAS-13713 correct handling of environment variable CAS-13713 put assertion out of if block CAS-13713 grammatical fix CAS-13713 added supplementary comment on default value, -1, for nthreads CAS-13713 add test for OMP_NUM_THREADS env var. CAS-13713 more fix on omp parallelization CAS-13713 respect numThreads_ CAS-13713 respect OMP_NUM_THREADS environment variable CAS-13713 do not call omp_set_num_threads() ...

casatasks/src/private/task_sdatmcor.py

Modified
589 589 ),
590 590 ATMListParameterConfigurator(
591 591 key='layerTemperatures', user_input=user_inputs['layertemperature'],
592 592 impl_default=[], default_unit='K',
593 593 is_mandatory=False, is_effective=user_inputs['atmdetail']
594 594 )
595 595 ]
596 596
597 597 config = dict(itertools.chain(*parameters))
598 598
599 + # number of threads for OpenMP
600 + # if config['nthreads'] is set to -1, task will decide number of threads automatically
601 + config['nthreads'] = int(os.getenv('OMP_NUM_THREADS', -1))
602 +
599 603 return config
600 604
601 605
602 606 @sdutil.sdtask_decorator
603 607 def sdatmcor(
604 608 infile=None, datacolumn=None, outfile=None, overwrite=None,
605 609 field=None, spw=None, scan=None, antenna=None,
606 610 correlation=None, timerange=None, intent=None,
607 611 observation=None, feed=None, msselect=None,
608 612 outputspw=None,

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut