Runner

Run simulations, monads, samplings, and trials in the pcvct framework.

Public API

pcvct.runAbstractTrialMethod
runAbstractTrial(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 running sensitivity samplings.

source
pcvct.simulationIDsMethod
simulationIDs(output::PCVCTOutput)

Get the simulation IDs from the output of the PCVCT run.

source

Private API

pcvct.PCVCTOutputType
PCVCTOutput{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.
source
pcvct.SimulationProcessType
SimulationProcess

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 be nothing.
source
Base.runMethod
run(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: If true, forces a recompilation of all files by removing all .o files in the PhysiCell directory.
  • prune_options::PruneOptions=PruneOptions(): Options for pruning simulations.
source
pcvct.collectSimulationTasksMethod
collectSimulationTasks(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: If true, forces a recompilation of all files by removing all .o files in the PhysiCell directory.
  • do_full_setup::Bool=true: If true, performs a full setup of the simulation, including compiling code and preparing input files. Only used for AbstractMonad objects.
source
pcvct.prepCmdForWrapMethod
prepCmdForWrap(cmd::Cmd)

Prepare the command for wrapping in the sbatch command. This is a helper function to remove the backticks from the command string.

source
pcvct.prepareHPCCommandMethod
prepareHPCCommand(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.

source
pcvct.prepareSimulationCommandMethod
prepareSimulationCommand(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.

source
pcvct.processSimulationTaskMethod
processSimulationTask(simulation_task, prune_options)

Process the given simulation task and return whether it was successful.

source
pcvct.resolveSimulationMethod
resolveSimulation(simulation_process::SimulationProcess, prune_options::PruneOptions)

Resolve the simulation process by checking its exit code and updating the database accordingly.

source
pcvct.simulationFailedToRunMethod
simulationFailedToRun(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.

source
pcvct.trialIDMethod
trialID(output::PCVCTOutput)

Get the ID of the trial from the output of the PCVCT run.

source
pcvct.trialTypeMethod
trialType(output::PCVCTOutput)

Get the type of the trial from the output of the PCVCT run.

source