Compilation
Compile a PhysiCell project in pcvct. Includes the necessary compiler macros and checks PhysiCell version by the commit hash of the PhysiCell repository.
Public API
Private API
pcvct.addMacro
— MethodaddMacro(S::AbstractSampling, macro_name::String)
Add a macro to the macros file for the sampling object S
.
pcvct.addMacrosIfNeeded
— MethodaddMacrosIfNeeded(S::AbstractSampling)
Check if the macros needed for the sampling object S
are already present in the macros file.
pcvct.addPhysiECMIfNeeded
— MethodaddPhysiECMIfNeeded(S::AbstractSampling)
Check if the PhysiECM macro needs to be added for the sampling object S
.
The macro will need to be added if it is not present AND either 1) the inputs
includes ic_ecm
or 2) the configuration file has ecm_setup
enabled.
pcvct.addRoadRunnerIfNeeded
— MethodaddRoadRunnerIfNeeded(S::AbstractSampling)
Check if the RoadRunner macro needs to be added for the sampling object S
.
The macro will need to be added if it is not present AND either 1) the inputs
defines an intracellular
file with roadrunner
intracellulars or 2) the configuration file has roadrunner
intracellulars defined.
pcvct.compilerFlags
— MethodcompilerFlags(S::AbstractSampling)
Generate the compiler flags for the given sampling object S
.
Generate the necessary compiler flags based on the system and the macros defined in the sampling object S
. If the required macros differ from a previous compilation (as stored in macros.txt), then recompile.
Returns
cflags::String
: The compiler flags as a string.recompile::Bool
: A boolean indicating whether recompilation is needed.clean::Bool
: A boolean indicating whether cleaning is needed.
pcvct.executableExists
— MethodexecutableExists(custom_code_folder::String)
Check if the executable for the custom code folder exists.
pcvct.isPhysiECMInConfig
— MethodisPhysiECMInConfig(S::AbstractSampling)
Check if any of the simulations in S
have a configuration file with ecm_setup
enabled.
pcvct.isRoadRunnerInConfig
— MethodisRoadRunnerInConfig(S::AbstractSampling)
Check if any of the simulations in S
have a configuration file with roadrunner
intracellulars defined.
pcvct.isRoadRunnerInInputs
— MethodisRoadRunnerInInputs(S::AbstractSampling)
Check if the inputs
for the sampling object S
defines an intracellular
file with roadrunner
intracellulars.
pcvct.loadCustomCode
— MethodloadCustomCode(S::AbstractSampling[; force_recompile::Bool=false])
Load and compile custom code for a simulation, monad, or sampling.
Determines if recompilation is necessary based on the previously used macros. If compilation is required, copy the PhysiCell directory to a temporary directory to avoid conflicts. Then, compile the project, recording the output and error in the custom_codes
folder used. Move the compiled executable into the custom_codes
folder and the temporary PhysiCell folder deleted.
pcvct.prepareLibRoadRunner
— MethodprepareLibRoadRunner()
Prepare the libRoadRunner library for use with PhysiCell.
pcvct.readMacrosFile
— MethodreadMacrosFile(S::AbstractSampling)
Read the macros file for the sampling object S
into a vector of strings, one macro per entry.
pcvct.writePhysiCellCommitHash
— MethodwritePhysiCellCommitHash(S::AbstractSampling)
Write the commit hash of the PhysiCell repository to a file associated with the custom code folder of the sampling object S
.
If the commit hash has changed since the last write, if the repository is in a dirty state, or if PhysiCell is downloaded (not cloned), recompile the custom code.