Runner
Run simulations, monads, samplings, and trials in the pcvct framework.
Public API
pcvct.runAbstractTrial
— MethodrunAbstractTrial(T::AbstractTrial; force_recompile::Bool=false, prune_options::PruneOptions=PruneOptions())
Alias for run
, but only with this particular signature. Does not work on Cmd
objects as Base.run
is built for. Also, does not work with run
ning sensitivity samplings.
pcvct.simulationIDs
— MethodsimulationIDs(output::PCVCTOutput)
Get the simulation IDs from the output of the PCVCT run.
Private API
pcvct.PCVCTOutput
— TypePCVCTOutput{T<:AbstractTrial}
A struct to hold the output of the PCVCT run, including the AbstractTrial
object, the number of scheduled simulations, and the number of successful simulations.
Fields
trial::T
: The trial, sampling, monad, or simulation that was run.n_scheduled::Int
: The number of simulations that were scheduled to run.n_success::Int
: The number of simulations that were successfully completed.
pcvct.SimulationProcess
— TypeSimulationProcess
A struct to hold the simulation process and its associated monad ID. Users should not need to interact with this struct directly.
Fields
simulation::Simulation
: The simulation object.monad_id::Int
: The ID of the associated monad.process::Union{Nothing,Base.Process}
: The process associated with the simulation. If the simulation process fails, e.g. if the command cannot be constructed, this will benothing
.
Base.run
— Methodrun(T::AbstractTrial[; force_recompile::Bool=false, prune_options::PruneOptions=PruneOptions()])`
Run the given simulation, monad, sampling, or trial.
Call the appropriate functions to run the simulations and return the number of successful simulations. Also print out messages to the console to inform the user about the progress and results of the simulations.
Arguments
T::AbstractTrial
: The trial, sampling, monad, or simulation to run.force_recompile::Bool=false
: Iftrue
, forces a recompilation of all files by removing all.o
files in the PhysiCell directory.prune_options::PruneOptions=PruneOptions()
: Options for pruning simulations.
pcvct.collectSimulationTasks
— MethodcollectSimulationTasks(T::AbstractTrial[; force_recompile::Bool=false])
Collect the simulation tasks for the given trial, sampling, monad, or simulation.
Arguments
T::AbstractTrial
: The trial, sampling, monad, or simulation to collect tasks for.
Keyword Arguments
force_recompile::Bool=false
: Iftrue
, forces a recompilation of all files by removing all.o
files in the PhysiCell directory.do_full_setup::Bool=true
: Iftrue
, performs a full setup of the simulation, including compiling code and preparing input files. Only used forAbstractMonad
objects.
pcvct.prepCmdForWrap
— MethodprepCmdForWrap(cmd::Cmd)
Prepare the command for wrapping in the sbatch command. This is a helper function to remove the backticks from the command string.
pcvct.prepareHPCCommand
— MethodprepareHPCCommand(cmd::Cmd, simulation_id::Int)
Prepare the command to run a simulation on an HPC system using sbatch. This function adds the necessary flags to the command and returns it as a Cmd object.
pcvct.prepareSimulationCommand
— MethodprepareSimulationCommand(simulation::Simulation, monad_id::Int, do_full_setup::Bool, force_recompile::Bool)
Internal function to prepare the command to run a simulation, including preparing input files and compiling the custom code if necessary.
pcvct.processSimulationTask
— MethodprocessSimulationTask(simulation_task, prune_options)
Process the given simulation task and return whether it was successful.
pcvct.resolveSimulation
— MethodresolveSimulation(simulation_process::SimulationProcess, prune_options::PruneOptions)
Resolve the simulation process by checking its exit code and updating the database accordingly.
pcvct.simulationFailedToRun
— MethodsimulationFailedToRun(simulation::Simulation, monad_id::Int)
Set the status code of the simulation to "Failed" and erase the simulation ID from the simulations.csv
file for the monad it belongs to.
pcvct.trialID
— MethodtrialID(output::PCVCTOutput)
Get the ID of the trial from the output of the PCVCT run.
pcvct.trialType
— MethodtrialType(output::PCVCTOutput)
Get the type of the trial from the output of the PCVCT run.