PhysiCell
PhysiCell copied to clipboard
updated scripts to build, run, test all sample projects
- this bash script compiles all (non-intracellular) sample projects and creates user_projects of each, preparing for the next step of running (brief) simulations of each.
I'm trying this out to test the arg parser and noticing the template project produces a file called template (on non-Windows) and the mechano-sample produces a file called mechano-sample. Subsequent runs of the script (after addressing an issue, e.g.) then seem to confuse the make targets of template and mechano-sample for the newly created executables. this causes the make template command to not load up the config files for the template project because it's looking at the template executable.
Right now, I'm just appending an underscore to the executable name. bonus: that could be used to more easily delete at command line? Better is probably to prefix with an underscore so sorting puts them together.
affected projects:
- template
- mechano-sample
- rules-sample
- physimess-sample
Thanks very much! Pushed a fix. May go with a prefix or suffix underscore in the future, but for now staying with more traditional naming scheme. The header of the script lists all execs' names too.
I am still more familiar with python than bash. Anyhow, along the same line, I thought it might be wise to write a Photon script that generates the Makefiles for all the sample and sample_inracellular projects. So I included this here into the discussion.
like this, it would be more or less easy to have a unified Makefile, or do changes to the unified Makefile structure. because there are already many sample projects and I think there will become more. if projects have specific needs for their make files, they could be included in the script in an "if project in {project_a, project_b, ...} block".
I just pushed beta/test_run_samples.py to this PR which does what it says. It runs most sample projects after modifying each one's config file to only use 1 thread, brief max_time, and suffixed output dirs. The idea would be to run this on the previous release and the new [pre]release and compare results.
Amazing! This will be so nice for testing!! Did you consider calling the bash script from the python script to make sure the user_projects are properly populated? It seems that would be useful, but would be interested in your thoughts. I'm sure I could add that with copilot really easily in the bash script if you think that's a good idea.
I think I'd like to keep them as separate scripts for now. I guess I should add comments in each to make it clear.
Just added a 3rd and final(?) script for testing: beta/test_diffs_svg.py. So, the order to run test scripts are:
beta/test_build_samples.sh(copy it to the root dir; see instructions in its header. Generates dirs in/user_projects)python beta/test_run_samples.py# compiles/runs all projects in/user_projectsgenerated from previous; edits models' xml somax_timeis short,omp_num_threads=1, outputfolderis uniquepython beta/test_diffs_svg.py <dir1> <dir2># checks for bitwise equality of .svg files from two different repos/models, generated by previous script
There appear to be no conflicts.