java.lang.Object
com.powsybl.computation.slurm.AbstractTask
- All Implemented Interfaces:
SlurmTask
- Direct Known Subclasses:
SlurmTaskImpl
- Author:
- Yichen TANG <yichen.tang at rte-france.com>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CommandExecutor
protected final com.powsybl.computation.ExecutionEnvironment
protected final List<com.powsybl.computation.CommandExecution>
protected final Path
protected final List<AbstractTask.CompletableMonitoredJob>
protected final com.powsybl.computation.ComputationParameters
protected final CompletableFuture<Void>
protected static final String
protected final Path
-
Method Summary
Modifier and TypeMethodDescriptioncom.powsybl.computation.ExecutionReport
await()
Waits for the whole task to be executed, and generates the execution report.protected void
Asks for cancellation of submitted jobs to Slurm infrastructure.protected boolean
Check if task has already been completed, or if computation manager is closing.protected void
copyShellToRemoteWorkingDir
(List<String> shell, String batchName) The list of jobs for which status must be monitored.void
Asks for interruption of the execution of this task, in order to save the infrastructure computation resources.protected long
launchSbatch
(SbatchCmd cmd)
-
Field Details
-
UNZIP_INPUTS_COMMAND_ID
- See Also:
-
workingDir
-
flagDir
-
commandExecutor
-
executions
-
parameters
protected final com.powsybl.computation.ComputationParameters parameters -
environment
protected final com.powsybl.computation.ExecutionEnvironment environment -
jobs
-
taskCompletion
-
commandByJobId
-
-
Method Details
-
cannotSubmit
protected boolean cannotSubmit()Check if task has already been completed, or if computation manager is closing. -
launchSbatch
-
copyShellToRemoteWorkingDir
- Throws:
IOException
-
await
public com.powsybl.computation.ExecutionReport await() throws InterruptedException, ExecutionExceptionDescription copied from interface:SlurmTask
Waits for the whole task to be executed, and generates the execution report.- Specified by:
await
in interfaceSlurmTask
- Throws:
InterruptedException
ExecutionException
-
getPendingJobs
The list of jobs for which status must be monitored.- Specified by:
getPendingJobs
in interfaceSlurmTask
-
interrupt
public void interrupt()Description copied from interface:SlurmTask
Asks for interruption of the execution of this task, in order to save the infrastructure computation resources.Calls waiting for completion of
SlurmTask.await()
will throw aCancellationException
. -
cancelSubmittedJobs
protected void cancelSubmittedJobs()Asks for cancellation of submitted jobs to Slurm infrastructure.
-