Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hru-delin-dev
hru-delin
Commits
62fe739a
Unverified
Commit
62fe739a
authored
Apr 22, 2020
by
Julien Veyssier
Browse files
don't fix multiprocess for windows in core anymore, it's enough to do it in plugin
Signed-off-by:
Julien Veyssier
<
eneiluj@posteo.net
>
parent
ad441e0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/hrudelin_2_basins.py
View file @
62fe739a
...
...
@@ -420,11 +420,6 @@ def processReach(params):
'''
def
main
(
parms_file
,
nbProc
,
generator
=
False
):
print
(
'---------- HRU-delin Step 2 started ---------------------------------------------'
)
if
platform
.
system
()
==
'Windows'
:
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
exec_prefix
,
'../../bin/pythonw3.exe'
))
multiprocessing
.
set_executable
(
path
)
sys
.
argv
=
[
None
]
print
(
'fix in core again %s'
%
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
exec_prefix
,
'../../bin/pythonw3.exe'
)))
# TODO remove dirty global variables
global
logf
,
gauge_code
,
gauge_area
,
reloc_lyr
,
col_name
...
...
@@ -739,11 +734,6 @@ if __name__ == '__main__':
else
:
nbProc
=
cpu_count
()
if
platform
.
system
()
==
'Windows'
:
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
exec_prefix
,
'../../bin/pythonw3.exe'
))
multiprocessing
.
set_executable
(
path
)
sys
.
argv
=
[
None
]
# main is a generator but we don't use it here
for
pc
in
main
(
parms_file
,
nbProc
,
False
):
pass
...
...
@@ -754,9 +744,4 @@ if __name__ == '__main__':
pass
else
:
from
.parallel
import
buildGrassEnv
,
buildGrassLocation
,
exportRasters
,
importRastersInEnv
from
.progressColors
import
*
if
platform
.
system
()
==
'Windows'
:
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
exec_prefix
,
'../../bin/pythonw3.exe'
))
multiprocessing
.
set_executable
(
path
)
sys
.
argv
=
[
None
]
print
(
'fix in core %s'
%
os
.
path
.
abspath
(
os
.
path
.
join
(
sys
.
exec_prefix
,
'../../bin/pythonw3.exe'
)))
\ No newline at end of file
from
.progressColors
import
*
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment