Skip to content

Commit f3c7572

Browse files
committed
Bug fix of multiprocessing in Mac python>=3.8
1 parent 281fa77 commit f3c7572

10 files changed

+48
-18
lines changed

LiCSBAS_lib/LiCSBAS_inv_lib.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
=========
99
Changelog
1010
=========
11+
v1.4.1 20201116 Yu Morioshita, GSI
12+
- Bug fix of multiprocessing in Mac python>=3.8
1113
v1.4 20200703 Yu Morioshita, GSI
1214
- Replace problematic terms
1315
v1.3 20200103 Yu Morioshita, Uni of Leeds and GSI
@@ -25,6 +27,7 @@
2527
import numpy as np
2628
import datetime as dt
2729
import multiprocessing as multi
30+
multi.set_start_method('fork') # for python >=3.8 in Mac
2831
from astropy.stats import bootstrap
2932
from astropy.utils import NumpyRNGContext
3033
import LiCSBAS_tools_lib as tools_lib

bin/LiCSBAS01_get_geotiff.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
v1.6 20200911 Yu Morishita, GSI
3+
v1.6.1 20201116 Yu Morishita, GSI
44
55
========
66
Overview
@@ -38,6 +38,8 @@
3838
"""
3939
#%% Change log
4040
'''
41+
v1.6.1 20201116 Yu Morishita, GSI
42+
- Bug fix of multiprocessing in Mac python>=3.8
4143
v1.6 20200911 Yu Morishita, GSI
4244
- Parallel downloading
4345
- Check time stamp and size
@@ -69,6 +71,7 @@
6971
import numpy as np
7072
import datetime as dt
7173
import multiprocessing as multi
74+
multi.set_start_method('fork') # for python >=3.8 in Mac
7275
import LiCSBAS_tools_lib as tools_lib
7376

7477
class Usage(Exception):
@@ -85,7 +88,7 @@ def main(argv=None):
8588
argv = sys.argv
8689

8790
start = time.time()
88-
ver=1.6; date=20200911; author="Y. Morishita"
91+
ver='1.6.1'; date=20201116; author="Y. Morishita"
8992
print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True)
9093
print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True)
9194

bin/LiCSBAS02_ml_prep.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
v1.7.1 20201028 Yu Morishita, GSI
3+
v1.7.2 202011116 Yu Morishita, GSI
44
55
========
66
Overview
@@ -48,6 +48,8 @@
4848
"""
4949
#%% Change log
5050
'''
51+
v1.7.2 20201116 Yu Morishita, GSI
52+
- Bug fix of multiprocessing in Mac python>=3.8
5153
v1.7.1 20201028 Yu Morishita, GSI
5254
- Update how to get n_para
5355
v1.7 20201020 Yu Morishita, GSI
@@ -87,6 +89,7 @@
8789
import numpy as np
8890
import subprocess as subp
8991
import multiprocessing as multi
92+
multi.set_start_method('fork') # for python >=3.8 in Mac
9093
import LiCSBAS_io_lib as io_lib
9194
import LiCSBAS_tools_lib as tools_lib
9295
import LiCSBAS_plot_lib as plot_lib
@@ -105,7 +108,7 @@ def main(argv=None):
105108
argv = sys.argv
106109

107110
start = time.time()
108-
ver="1.7.1"; date=20201028; author="Y. Morishita"
111+
ver="1.7.2"; date=202011116; author="Y. Morishita"
109112
print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True)
110113
print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True)
111114

bin/LiCSBAS03op_GACOS.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
v1.5.1 20201028 Yu Morishita, GSI
3+
v1.5.2 20201116 Yu Morishita, GSI
44
55
========
66
Overview
@@ -51,6 +51,8 @@
5151
"""
5252
#%% Change log
5353
'''
54+
v1.5.2 20201116 Yu Morishita, GSI
55+
- Bug fix of multiprocessing in Mac python>=3.8
5456
v1.5.1 20201028 Yu Morishita, GSI
5557
- Update how to get n_para
5658
v1.5 20200909 Yu Morishita, GSI
@@ -81,6 +83,7 @@
8183
import numpy as np
8284
import gdal
8385
import multiprocessing as multi
86+
multi.set_start_method('fork') # for python >=3.8 in Mac
8487
import LiCSBAS_io_lib as io_lib
8588
import LiCSBAS_tools_lib as tools_lib
8689
import LiCSBAS_plot_lib as plot_lib
@@ -155,7 +158,7 @@ def main(argv=None):
155158
argv = sys.argv
156159

157160
start = time.time()
158-
ver="1.5.1"; date=20201028; author="Y. Morishita"
161+
ver="1.5.2"; date=20201116; author="Y. Morishita"
159162
print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True)
160163
print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True)
161164

bin/LiCSBAS04op_mask_unw.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
v1.3.1 20201028 Yu Morishita, GSI
3+
v1.3.2 20201116 Yu Morishita, GSI
44
55
========
66
Overview
@@ -42,6 +42,8 @@
4242
"""
4343
#%% Change log
4444
'''
45+
v1.3.2 20201116 Yu Morishita, GSI
46+
- Bug fix of multiprocessing in Mac python>=3.8
4547
v1.3.1 20201028 Yu Morishita, GSI
4648
- Update how to get n_para
4749
v1.3 20200909 Yu Morishita, GSI
@@ -63,6 +65,7 @@
6365
import time
6466
import numpy as np
6567
import multiprocessing as multi
68+
multi.set_start_method('fork') # for python >=3.8 in Mac
6669
import LiCSBAS_io_lib as io_lib
6770
import LiCSBAS_tools_lib as tools_lib
6871
import LiCSBAS_plot_lib as plot_lib
@@ -80,7 +83,7 @@ def main(argv=None):
8083
argv = sys.argv
8184

8285
start = time.time()
83-
ver="1.3.1"; date=20201028; author="Y. Morishita"
86+
ver="1.3.2"; date=20201116; author="Y. Morishita"
8487
print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True)
8588
print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True)
8689

bin/LiCSBAS05op_clip_unw.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
v1.2.1 20201028 Yu Morishita, GSI
3+
v1.2.2 20201116 Yu Morishita, GSI
44
55
========
66
Overview
@@ -42,6 +42,8 @@
4242
"""
4343
#%% Change log
4444
'''
45+
v1.2.2 20201116 Yu Morishita, GSI
46+
- Bug fix of multiprocessing in Mac python>=3.8
4547
v1.2.1 20201028 Yu Morishita, GSI
4648
- Update how to get n_para
4749
v1.2 20200909 Yu Morishita, GSI
@@ -63,6 +65,7 @@
6365
import time
6466
import numpy as np
6567
import multiprocessing as multi
68+
multi.set_start_method('fork')
6669
import LiCSBAS_io_lib as io_lib
6770
import LiCSBAS_tools_lib as tools_lib
6871
import LiCSBAS_plot_lib as plot_lib
@@ -81,7 +84,7 @@ def main(argv=None):
8184
argv = sys.argv
8285

8386
start = time.time()
84-
ver="1.2.1"; date=20201028; author="Y. Morishita"
87+
ver="1.2.2"; date=20201116; author="Y. Morishita"
8588
print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True)
8689
print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True)
8790

bin/LiCSBAS12_loop_closure.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
v1.5.1 20201028 Yu Morishita, GSI
3+
v1.5.2 20201116 Yu Morishita, GSI
44
55
========
66
Overview
@@ -61,6 +61,8 @@
6161
"""
6262
#%% Change log
6363
'''
64+
v1.5.2 20201116 Yu Morishita, GSI
65+
- Bug fix of multiprocessing in Mac python>=3.8
6466
v1.5.1 20201028 Yu Morishita, GSI
6567
- Update how to get n_para
6668
v1.5 20201016 Yu Morishita, GSI
@@ -92,6 +94,7 @@
9294
import numpy as np
9395
import datetime as dt
9496
import multiprocessing as multi
97+
multi.set_start_method('fork') # for python >=3.8 in Mac
9598
import SCM
9699
import LiCSBAS_io_lib as io_lib
97100
import LiCSBAS_loop_lib as loop_lib
@@ -114,7 +117,7 @@ def main(argv=None):
114117
argv = sys.argv
115118

116119
start = time.time()
117-
ver="1.5.1"; date=20201028; author="Y. Morishita"
120+
ver="1.5.2"; date=20201116; author="Y. Morishita"
118121
print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True)
119122
print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True)
120123

bin/LiCSBAS13_sb_inv.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
v1.4.3 20201104 Yu Morishita, GSI
3+
v1.4.4 20201116 Yu Morishita, GSI
44
55
========
66
Overview
@@ -72,6 +72,8 @@
7272
"""
7373
#%% Change log
7474
'''
75+
v1.4.4 20201116 Yu Morishita, GSI
76+
- Bug fix of multiprocessing in Mac python>=3.8
7577
v1.4.3 20201104 Yu Morishita, GSI
7678
- Bug fix when n_pt_unnan=0 in a patch
7779
v1.4.2 20201028 Yu Morishita, GSI
@@ -107,6 +109,7 @@
107109
import numpy as np
108110
import datetime as dt
109111
import multiprocessing as multi
112+
multi.set_start_method('fork') # for python >=3.8 in Mac
110113
import SCM
111114
import LiCSBAS_io_lib as io_lib
112115
import LiCSBAS_inv_lib as inv_lib
@@ -129,7 +132,7 @@ def main(argv=None):
129132
argv = sys.argv
130133

131134
start = time.time()
132-
ver="1.4.3"; date=20201104; author="Y. Morishita"
135+
ver="1.4.4"; date=20201116; author="Y. Morishita"
133136
print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True)
134137
print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True)
135138

bin/LiCSBAS16_filt_ts.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
v1.4.1 20201028 Yu Morishita, GSI
3+
v1.4.2 20201116 Yu Morishita, GSI
44
55
========
66
Overview
@@ -67,6 +67,8 @@
6767
"""
6868
#%% Change log
6969
'''
70+
v1.4.2 20201116 Yu Morishita, GSI
71+
- Bug fix of multiprocessing in Mac python>=3.8
7072
v1.4.1 20201028 Yu Morishita, GSI
7173
- Update how to get n_para
7274
v1.4 20201020 Yu Morishita, GSI
@@ -99,6 +101,7 @@
99101
import h5py as h5
100102
from astropy.convolution import Gaussian2DKernel, convolve_fft
101103
import multiprocessing as multi
104+
multi.set_start_method('fork') # for python >=3.8 in Mac
102105
import SCM
103106
import LiCSBAS_io_lib as io_lib
104107
import LiCSBAS_tools_lib as tools_lib
@@ -119,7 +122,7 @@ def main(argv=None):
119122
argv = sys.argv
120123

121124
start = time.time()
122-
ver="1.4.1"; date=20201028; author="Y. Morishita"
125+
ver="1.4.2"; date=20201116; author="Y. Morishita"
123126
print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True)
124127
print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True)
125128

bin/LiCSBAS_color_geotiff2tiles.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
v1.0.2 20201028 Yu Morishita, GSI
3+
v1.0.3 20201116 Yu Morishita, GSI
44
55
========
66
Overview
@@ -33,6 +33,8 @@
3333
"""
3434
#%% Change log
3535
'''
36+
v1.0.3 20201116 Yu Morishita, GSI
37+
- Bug fix of multiprocessing in Mac python>=3.8
3638
v1.0.2 20201028 Yu Morishita, GSI
3739
- Update how to get n_para
3840
v1.0.1 20201016 Yu Morishita, GSI
@@ -53,6 +55,7 @@
5355
import numpy as np
5456
import subprocess as subp
5557
import multiprocessing as multi
58+
multi.set_start_method('fork') # for python >=3.8 in Mac
5659

5760
class Usage(Exception):
5861
"""Usage context manager"""
@@ -68,7 +71,7 @@ def main(argv=None):
6871
argv = sys.argv
6972

7073
start = time.time()
71-
ver='1.0.2'; date=20201028; author="Y. Morishita"
74+
ver='1.0.3'; date=20201116; author="Y. Morishita"
7275
print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True)
7376
print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True)
7477

0 commit comments

Comments
 (0)