Skip to content

Commit

Permalink
Merge pull request #567 from scipion-em/executionmode
Browse files Browse the repository at this point in the history
  -  stepsExecutionMode = STEPS_SERIAL at class level. Should a class…
  • Loading branch information
JorMaister authored Oct 8, 2024
2 parents 8b8d665 + 613be29 commit 308d37b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
V3.10.0
developers:
- stepsExecutionMode = STEPS_SERIAL at class level. Should a class attribute for future versions. Now both approaches are valid.

V3.9.2 - hotfix: rescue commented methods: Protocol._insertRunJobStep and Protocol._insertCopyFileStep
V3.9.1 - hotfix: loading related objects (CTF - Mics in particle extraction)
V3.9.0
Expand Down
2 changes: 1 addition & 1 deletion pyworkflow/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
VERSION_1_1 = '1.1.0'
VERSION_1_2 = '1.2.0'
VERSION_2_0 = '2.0.0'
VERSION_3_0 = '3.9.2'
VERSION_3_0 = '3.10.0'

# For a new release, define a new constant and assign it to LAST_VERSION
# The existing one has to be added to OLD_VERSIONS list.
Expand Down
8 changes: 5 additions & 3 deletions pyworkflow/protocol/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ class MyOutput(enum.Enum):
_package = None
_plugin = None

# Maybe this property can be inferred from the
# prerequisites of steps, but is easier to keep it
stepsExecutionMode = STEPS_SERIAL

def __init__(self, **kwargs):
Step.__init__(self, **kwargs)
self._size = None
Expand Down Expand Up @@ -410,9 +414,6 @@ def __init__(self, **kwargs):
if not hasattr(self, 'hostFullName'):
self.hostFullName = String()

# Maybe this property can be inferred from the
# prerequisites of steps, but is easier to keep it
self.stepsExecutionMode = STEPS_SERIAL

# Run mode
self.runMode = Integer(kwargs.get('runMode', MODE_RESUME))
Expand Down Expand Up @@ -2451,6 +2452,7 @@ def runProtocolMain(projectPath, protDbPath, protId):
executor = StepExecutor(hostConfig,
gpuList=protocol.getGpuList())

logger.info("Running protocol using the %s executor." % executor)
protocol.setStepsExecutor(executor)
# Finally run the protocol
protocol.run()
Expand Down

0 comments on commit 308d37b

Please sign in to comment.