From b3c0ea1d129acec24999f0aadee11847ca87ebd6 Mon Sep 17 00:00:00 2001 From: zshaheen Date: Mon, 8 Jan 2018 15:07:27 -0800 Subject: [PATCH 1/2] Possible multiprocessing fix. --- acme_diags/driver/zonal_mean_2d_driver.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/acme_diags/driver/zonal_mean_2d_driver.py b/acme_diags/driver/zonal_mean_2d_driver.py index c9406a869..9f1708c36 100755 --- a/acme_diags/driver/zonal_mean_2d_driver.py +++ b/acme_diags/driver/zonal_mean_2d_driver.py @@ -74,6 +74,12 @@ def run_diag(parameter): ref_name = parameter.ref_name regions = parameter.regions + if getattr(parameter, 'multiprocessing', False): + # only force mpl when running with multiprocessing + print('FORCING MPL') + print('FORCING MPL') + parameter.backend = 'mpl' + for season in seasons: try: filename1 = utils.get_test_filename(parameter, season) From 71f10e7614cb81a61a85f951c8bf736b8865e7b5 Mon Sep 17 00:00:00 2001 From: Zeshawn Shaheen Date: Thu, 11 Jan 2018 10:37:07 -0800 Subject: [PATCH 2/2] Cleanup. --- acme_diags/driver/zonal_mean_2d_driver.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/acme_diags/driver/zonal_mean_2d_driver.py b/acme_diags/driver/zonal_mean_2d_driver.py index 9f1708c36..c0a45a07a 100755 --- a/acme_diags/driver/zonal_mean_2d_driver.py +++ b/acme_diags/driver/zonal_mean_2d_driver.py @@ -76,8 +76,6 @@ def run_diag(parameter): if getattr(parameter, 'multiprocessing', False): # only force mpl when running with multiprocessing - print('FORCING MPL') - print('FORCING MPL') parameter.backend = 'mpl' for season in seasons: