Compare commits
4 Commits
4661646b4f
...
075d11b948
Author | SHA1 | Date | |
---|---|---|---|
075d11b948 | |||
1696d72a6f | |||
6de64dd5d0 | |||
b36d8a748d |
1
experiments/.gitignore
vendored
1
experiments/.gitignore
vendored
@ -7,3 +7,4 @@ batch/measurements/strong/*
|
||||
configs/measurements/strong/*
|
||||
*.dat
|
||||
*.db
|
||||
eval/generated/*
|
||||
|
24
experiments/batch/julian-animation
Normal file
24
experiments/batch/julian-animation
Normal file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#SBATCH --job-name=julian-animation
|
||||
#SBATCH --account=hkf6
|
||||
#SBATCH --partition=booster
|
||||
#SBATCH --nodes=8
|
||||
#SBATCH --ntasks=32
|
||||
# Counted per node
|
||||
#SBATCH --gres=gpu:4
|
||||
#SBATCH --time=03:30:00
|
||||
#SBATCH --output=logs/%x-%A_%a.log
|
||||
#SBATCH --error=logs/%x-%A_%a.log
|
||||
|
||||
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
||||
OUTPUT_DIR="/p/scratch/cellsinsilico/paul/nastja-out/${SLURM_JOB_NAME}"
|
||||
|
||||
echo "outdir is ${OUTPUT_DIR}"
|
||||
|
||||
mkdir -p "${OUTPUT_DIR}"
|
||||
source "${SOURCE_DIR}/activate-nastja-modules"
|
||||
|
||||
srun --unbuffered "${SOURCE_DIR}/nastja/build-cuda/nastja" \
|
||||
-c "${SOURCE_DIR}/ma/experiments/configs/${SLURM_JOB_NAME}.json" \
|
||||
-o "${OUTPUT_DIR}"
|
0
experiments/batch/measurements/.gitkeep
Normal file
0
experiments/batch/measurements/.gitkeep
Normal file
330
experiments/configs/julian-animation.json
Normal file
330
experiments/configs/julian-animation.json
Normal file
@ -0,0 +1,330 @@
|
||||
{
|
||||
"Comments": [
|
||||
"Celltype Usage",
|
||||
"0 Dynamic ECM",
|
||||
"1-5 Not Used",
|
||||
"6 Liquid ",
|
||||
"7 Apoptotic cell Type ",
|
||||
"8 Basic Non Dividing Cell type (surrounding)",
|
||||
"9 Cancer"
|
||||
],
|
||||
"Application": "Cells",
|
||||
"CellsInSilico": {
|
||||
"ecmdegradation": {
|
||||
"enabled": "false",
|
||||
"steps": 99999,
|
||||
"stochastic": "true",
|
||||
"probability": 0.5
|
||||
},
|
||||
"energyfunctions": [
|
||||
"Volume00",
|
||||
"Surface01",
|
||||
"Motility00",
|
||||
"Adhesion01",
|
||||
"DynamicECM00"
|
||||
],
|
||||
"liquid": 6,
|
||||
"volume": {
|
||||
"default": {
|
||||
"storage": "const",
|
||||
"value": 500
|
||||
},
|
||||
"lambda": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
7.5,
|
||||
7.5,
|
||||
7.5
|
||||
],
|
||||
"sizechange": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
-0.05,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"surface": {
|
||||
"default": {
|
||||
"storage": "const",
|
||||
"value": 400
|
||||
},
|
||||
"lambda": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
5.625,
|
||||
5.625,
|
||||
1
|
||||
],
|
||||
"sizechange": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
-0.05,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"adhesion": {
|
||||
"matrix": [
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
450
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
450,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
50
|
||||
]
|
||||
]
|
||||
},
|
||||
"temperature": 50,
|
||||
"division": {
|
||||
"enabled": "true",
|
||||
"condition": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"( volume >= 0.9 * volume0 ) & ( rnd() <= 0.00001 ) & generation < 1"
|
||||
]
|
||||
},
|
||||
"centerofmass": {
|
||||
"steps": 1
|
||||
},
|
||||
"signaling": {
|
||||
"enabled": false
|
||||
},
|
||||
"orientation": {
|
||||
"enabled": true,
|
||||
"motility": "persistentRandomWalk",
|
||||
"persistenceMagnitude": 0.0,
|
||||
"recalculationtime": 200,
|
||||
"motilityamount": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"visitor": {
|
||||
"stepwidth": 10,
|
||||
"checkerboard": "01"
|
||||
},
|
||||
"cleaner": {
|
||||
"killDistance": 20
|
||||
},
|
||||
"dynamicecm": {
|
||||
"enabled": true,
|
||||
"stepsPerMcs": 100,
|
||||
"pushSteps": 10,
|
||||
"pushWeight": 2,
|
||||
"ecmCellID": 0,
|
||||
"deltat": 0.1,
|
||||
"eta": 0.25,
|
||||
"k0": 0.1,
|
||||
"k1": 0.1,
|
||||
"c": 4,
|
||||
"alpha": 2,
|
||||
"d": 0.3,
|
||||
"phi": 1
|
||||
}
|
||||
},
|
||||
"Geometry": {
|
||||
"blockcount": [
|
||||
2,
|
||||
4,
|
||||
4
|
||||
],
|
||||
"blocksize": [
|
||||
200,
|
||||
100,
|
||||
100
|
||||
]
|
||||
},
|
||||
"Settings": {
|
||||
"randomseed": 0,
|
||||
"timesteps": 5000,
|
||||
"statusoutput": 1
|
||||
},
|
||||
"WriteActions": ["ParallelVTK_Cells", "ParallelVTK_Displacement"],
|
||||
"Writers": {
|
||||
"CellInfo": {
|
||||
"field": "",
|
||||
"groupsize": 0,
|
||||
"steps": 1,
|
||||
"writer": "CellInfo"
|
||||
},
|
||||
"ParallelVTK_Cells": {
|
||||
"field": "cells",
|
||||
"outputtype": "UInt32",
|
||||
"printhints": false,
|
||||
"steps": 100,
|
||||
"writer": "ParallelVtkImage"
|
||||
},
|
||||
"ParallelVTK_Displacement": {
|
||||
"writer": "ParallelVtkImage",
|
||||
"outputtype": "Float32",
|
||||
"field": "dynamicecm",
|
||||
"components": [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
"steps": 100
|
||||
}
|
||||
},
|
||||
"Include": "measurements/strong/config_filling_1.json"
|
||||
}
|
10
experiments/eval/Makefile
Normal file
10
experiments/eval/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
generate-batch-strong-cpu:
|
||||
python scripts/substitute.py strong-batch.j2 < strong-cpu.json
|
||||
|
||||
generate-batch-strong-gpu:
|
||||
python scripts/substitute.py strong-batch.j2 < strong-gpu.json
|
||||
|
||||
clean-logs:
|
||||
rm logs/*
|
||||
|
||||
.PHONY: generate-batch-strong-cpu clean-logs
|
17568
experiments/eval/data/strong-cpu-timings.json
Normal file
17568
experiments/eval/data/strong-cpu-timings.json
Normal file
File diff suppressed because it is too large
Load Diff
10
experiments/eval/data/strong-cpu.tsv
Normal file
10
experiments/eval/data/strong-cpu.tsv
Normal file
@ -0,0 +1,10 @@
|
||||
label nodes mean_time std_time speedup speedup_std
|
||||
1 1 1132.1093720291667 18.428644622186628 1.0 0.016278148629010596
|
||||
2 2 619.9614289104168 7.890810670766857 1.8260964621925766 0.029725469622481192
|
||||
4 4 348.657283046875 3.3739994706945122 3.247054993762918 0.052856043795043856
|
||||
8 8 200.79244575312498 1.259910347938215 5.63820699420684 0.09177957145282603
|
||||
16 16 111.37033198671875 0.3943541234366863 10.16526889911915 0.16547175799372044
|
||||
32 32 65.69918741145833 0.43464214827532205 17.231710415823503 0.28050034328084494
|
||||
64 64 38.56257490957031 0.12227397957602136 29.35772247273364 0.4778893698204027
|
||||
128 128 21.433497051595047 0.14016683538819355 52.81962944749218 0.8598057786755426
|
||||
256 256 13.247708324598525 0.030540850807946187 85.45699711149668 1.3910817003698723
|
|
12312
experiments/eval/data/strong-gpu-timings.json
Normal file
12312
experiments/eval/data/strong-gpu-timings.json
Normal file
File diff suppressed because it is too large
Load Diff
8
experiments/eval/data/strong-gpu.tsv
Normal file
8
experiments/eval/data/strong-gpu.tsv
Normal file
@ -0,0 +1,8 @@
|
||||
label nodes tasks mean_time std_time speedup speedup_std
|
||||
1 1 1 157.5217688 0.5311809049610176 1.0 0.003372111099358209
|
||||
1 1 2 120.15237200000001 0.299200156243067 1.3110167213344732 0.004420894037456185
|
||||
1 1 4 75.69762635 0.5769735213369493 2.0809340582447473 0.007017140834839633
|
||||
2 2 8 52.110670325 0.940887445857671 3.022831366735062 0.010193323203255446
|
||||
4 4 16 28.215493675000005 0.5598524922936691 5.582811012077745 0.018825858979446598
|
||||
8 8 32 12.422501156249998 0.31940690526235005 12.680358554102268 0.04275957782413007
|
||||
16 16 64 7.70770194375 0.04068644910316383 20.43693048194875 0.06891560011499148
|
|
0
experiments/eval/generated/batch/.gitkeep
Normal file
0
experiments/eval/generated/batch/.gitkeep
Normal file
0
experiments/eval/generated/config/.gitkeep
Normal file
0
experiments/eval/generated/config/.gitkeep
Normal file
1
experiments/eval/load-modules
Normal file
1
experiments/eval/load-modules
Normal file
@ -0,0 +1 @@
|
||||
module load SciPy-Stack
|
0
experiments/eval/logs/.gitkeep
Normal file
0
experiments/eval/logs/.gitkeep
Normal file
36
experiments/eval/scripts/build-pgf-datafiles.py
Executable file
36
experiments/eval/scripts/build-pgf-datafiles.py
Executable file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
|
||||
import argparse
|
||||
import json
|
||||
|
||||
|
||||
def print_table(data, spec):
|
||||
print("\t".join(column for column in spec.keys()))
|
||||
|
||||
for data_item in data:
|
||||
values = []
|
||||
for retrieve in spec.values():
|
||||
raw_value = retrieve(data_item)
|
||||
values.append(raw_value if isinstance(raw_value, str) else str(raw_value))
|
||||
print("\t".join(values))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
p = argparse.ArgumentParser(description="Turn files generated by timing.py into pgf datafiles")
|
||||
p.add_argument("timing_file")
|
||||
args = p.parse_args()
|
||||
|
||||
with open(args.timing_file, "r", encoding="utf8") as f:
|
||||
jobs = json.load(f)
|
||||
|
||||
scaling_spec = {
|
||||
"label": lambda job: job["accounting"][0]["nodes"]["count"],
|
||||
"nodes": lambda job: job["accounting"][0]["nodes"]["count"],
|
||||
"tasks": lambda job: job["accounting"][0]["tasks"]["count"],
|
||||
"mean_time": lambda job: job["means"]["TimeStep"],
|
||||
"std_time": lambda job: job["stds"]["TimeStep"],
|
||||
"speedup": lambda job: jobs[0]["means"]["TimeStep"] / job["means"]["TimeStep"],
|
||||
"speedup_std": lambda job: jobs[0]["stds"]["TimeStep"] / job["means"]["TimeStep"],
|
||||
}
|
||||
print_table(jobs, scaling_spec)
|
35
experiments/eval/scripts/generate-strong-cpu-configs.py
Executable file
35
experiments/eval/scripts/generate-strong-cpu-configs.py
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import copy
|
||||
import json
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
SIZE = [384, 384, 384]
|
||||
|
||||
with (Path(__file__).parent.parent / "templates" / "strong-cpu.json").open(encoding="utf8") as f:
|
||||
template = json.load(f)
|
||||
|
||||
configs = [
|
||||
[ 4, 4, 3],
|
||||
[ 4, 4, 6],
|
||||
[ 4, 4, 12],
|
||||
[ 4, 8, 12],
|
||||
[ 8, 8, 12],
|
||||
[ 8, 8, 24],
|
||||
[ 8, 16, 24],
|
||||
[ 16, 16, 24],
|
||||
[ 16, 16, 48]
|
||||
]
|
||||
|
||||
out_path = Path(__file__).parent.parent / "generated" / "config"
|
||||
|
||||
for c in configs:
|
||||
nc = copy.deepcopy(template)
|
||||
nc["Geometry"]["blockcount"] = c
|
||||
nc["Geometry"]["blocksize"] = [bs // bc for bc, bs in zip(c, SIZE)]
|
||||
|
||||
nc_out_path = out_path / f"strong-cpu-{c[0]:02}-{c[1]:02}-{c[2]:02}.json"
|
||||
print(f"Dumping {(c[0] * c[1] * c[2]) // 48} to {nc_out_path}")
|
||||
with nc_out_path.open("w", encoding="utf8") as f:
|
||||
json.dump(nc, f)
|
34
experiments/eval/scripts/generate-strong-gpu-configs.py
Executable file
34
experiments/eval/scripts/generate-strong-gpu-configs.py
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import copy
|
||||
import json
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
SIZE = [384, 384, 384]
|
||||
|
||||
with (Path(__file__).parent.parent / "templates" / "strong-gpu.json").open(encoding="utf8") as f:
|
||||
template = json.load(f)
|
||||
|
||||
configs = [
|
||||
[ 1, 1, 1],
|
||||
[ 1, 1, 2],
|
||||
[ 1, 2, 2],
|
||||
[ 2, 2, 2],
|
||||
[ 2, 2, 4],
|
||||
[ 2, 4, 4],
|
||||
[ 4, 4, 4],
|
||||
[ 4, 4, 8],
|
||||
]
|
||||
|
||||
out_path = Path(__file__).parent.parent / "generated" / "config"
|
||||
|
||||
for c in configs:
|
||||
nc = copy.deepcopy(template)
|
||||
nc["Geometry"]["blockcount"] = c
|
||||
nc["Geometry"]["blocksize"] = [bs // bc for bc, bs in zip(c, SIZE)]
|
||||
|
||||
nc_out_path = out_path / f"strong-gpu-{c[0]:02}-{c[1]:02}-{c[2]:02}.json"
|
||||
print(f"Dumping {(c[0] * c[1] * c[2])} to {nc_out_path}")
|
||||
with nc_out_path.open("w", encoding="utf8") as f:
|
||||
json.dump(nc, f)
|
21
experiments/eval/scripts/substitute.py
Executable file
21
experiments/eval/scripts/substitute.py
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import jinja2
|
||||
import json
|
||||
import sys
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
data = json.load(sys.stdin)
|
||||
|
||||
templates_env = jinja2.Environment(
|
||||
loader=jinja2.FileSystemLoader(Path(__file__).parent.parent / "templates"),
|
||||
autoescape=jinja2.select_autoescape()
|
||||
)
|
||||
|
||||
for possibly_incomplete_batch in data["batches"]:
|
||||
batch = dict(list(data["common"].items()) + list(possibly_incomplete_batch.items()))
|
||||
out_path = Path(__file__).parent.parent / "generated" / "batch" / batch["name"]
|
||||
t = templates_env.get_template(sys.argv[1])
|
||||
print(f"Dumping to {out_path}")
|
||||
t.stream(**batch).dump(str(out_path))
|
92
experiments/eval/scripts/timing.py
Executable file
92
experiments/eval/scripts/timing.py
Executable file
@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import pandas
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def load_timing_file(timing_path: Path):
|
||||
df = pandas.read_csv(timing_path, delim_whitespace=True)
|
||||
headers = list(df["#Name"][1:])
|
||||
times = list(df["TotalTime"][1:])
|
||||
return pandas.DataFrame([times], columns=headers)
|
||||
|
||||
|
||||
def load_all_timings(outdir_path: Path):
|
||||
timingdir_path = outdir_path / "timing"
|
||||
timing_paths = sorted(timingdir_path.iterdir())
|
||||
|
||||
print(f"Loading {len(timing_paths)} timing files from {timingdir_path}...", file=sys.stderr)
|
||||
dfs = []
|
||||
for i, timing_path in enumerate(timing_paths, 1):
|
||||
dfs.append(load_timing_file(timing_path))
|
||||
sys.stderr.write("\x1b[1K\r")
|
||||
sys.stderr.flush()
|
||||
print(f"[{i:8}/{len(timing_paths):8}] {i/len(timing_paths)*100:6.2f}%", file=sys.stderr, end="", flush=True)
|
||||
print(file=sys.stderr, flush=True)
|
||||
|
||||
return pandas.concat(dfs)
|
||||
|
||||
|
||||
def load_mean_timings(outdir_path: Path):
|
||||
df = load_all_timings(outdir_path)
|
||||
return df.mean() / 1000000
|
||||
|
||||
|
||||
def get_outdirs(jobid: str):
|
||||
print(f"Globbing for {jobid}...", file=sys.stderr)
|
||||
return sorted(Path("/p/scratch/cellsinsilico/paul/nastja-out").glob(f"*{jobid}*"))
|
||||
|
||||
|
||||
def load_array_mean_timings(jobid: str):
|
||||
mts = [
|
||||
load_mean_timings(outdir_path)
|
||||
for outdir_path
|
||||
in get_outdirs(jobid)
|
||||
]
|
||||
|
||||
return pandas.DataFrame(list(mts), columns=mts[0].index)
|
||||
|
||||
|
||||
def get_mean_mean_totaltimes(jobid: str):
|
||||
return load_array_mean_timings(jobid).mean()
|
||||
|
||||
|
||||
def get_std_mean_totaltimes(jobid: str):
|
||||
return load_array_mean_timings(jobid).std()
|
||||
|
||||
|
||||
def get_accounting_data(jobid: str):
|
||||
sacct_results = subprocess.run(
|
||||
["sacct", "--json", "--jobs", jobid],
|
||||
check=True, # Throw on non-zero exit code,
|
||||
capture_output=True
|
||||
)
|
||||
return json.loads(sacct_results.stdout.decode("utf8"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
p = argparse.ArgumentParser(description="Load and analzye data from nastja timing files")
|
||||
p.add_argument("jobid", nargs="+")
|
||||
p.add_argument("--prettify", action="store_true")
|
||||
args = p.parse_args()
|
||||
|
||||
results = []
|
||||
for i, jobid in enumerate(args.jobid, 1):
|
||||
print(f"({i:2}/{len(args.jobid):2}) Loading accounting data for {jobid}", file=sys.stderr)
|
||||
accounting_data = get_accounting_data(jobid)
|
||||
array_mean_timings = load_array_mean_timings(jobid)
|
||||
|
||||
results.append({
|
||||
"jobid": jobid,
|
||||
"means": array_mean_timings.mean().to_dict(),
|
||||
"stds": array_mean_timings.std().to_dict(),
|
||||
"accounting": [array_job["steps"][-1] for array_job in accounting_data["jobs"]]
|
||||
})
|
||||
print(json.dumps(results, indent=2 if args.prettify else None))
|
67
experiments/eval/strong-cpu.json
Normal file
67
experiments/eval/strong-cpu.json
Normal file
@ -0,0 +1,67 @@
|
||||
{
|
||||
"common": {
|
||||
"account": "cellsinsilico",
|
||||
"partition": "batch",
|
||||
"extra_sbatch_line": "",
|
||||
"logfile_path": "/p/project/cellsinsilico/paulslustigebude/ma/experiments/eval/logs/%x-%A.%a",
|
||||
"nastja_binary_path": "/p/project/cellsinsilico/paulslustigebude/nastja/build-nocuda/nastja",
|
||||
"config_path": "/p/project/cellsinsilico/paulslustigebude/ma/experiments/eval/generated/config/${SLURM_JOB_NAME}.json",
|
||||
"output_dir_path": "/p/scratch/cellsinsilico/paul/nastja-out/${SLURM_JOB_NAME}-${SLURM_ARRAY_JOB_ID}.${SLURM_ARRAY_TASK_ID}"
|
||||
},
|
||||
"batches": [
|
||||
{
|
||||
"name": "strong-cpu-04-04-03",
|
||||
"nodes": 1,
|
||||
"tasks": 48,
|
||||
"time": "00:30:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-cpu-04-04-06",
|
||||
"nodes": 2,
|
||||
"tasks": 96,
|
||||
"time": "00:30:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-cpu-04-04-12",
|
||||
"nodes": 4,
|
||||
"tasks": 192,
|
||||
"time": "00:10:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-cpu-04-08-12",
|
||||
"nodes": 8,
|
||||
"tasks": 384,
|
||||
"time": "00:10:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-cpu-08-08-12",
|
||||
"nodes": 16,
|
||||
"tasks": 768,
|
||||
"time": "00:10:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-cpu-08-08-24",
|
||||
"nodes": 32,
|
||||
"tasks": 1536,
|
||||
"time": "00:10:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-cpu-08-16-24",
|
||||
"nodes": 64,
|
||||
"tasks": 3072,
|
||||
"time": "00:10:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-cpu-16-16-24",
|
||||
"nodes": 128,
|
||||
"tasks": 6144,
|
||||
"time": "00:10:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-cpu-16-16-48",
|
||||
"nodes": 256,
|
||||
"tasks": 12288,
|
||||
"time": "00:10:00"
|
||||
}
|
||||
]
|
||||
}
|
63
experiments/eval/strong-gpu.json
Normal file
63
experiments/eval/strong-gpu.json
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"common": {
|
||||
"account": "cellsinsilico",
|
||||
"partition": "gpus",
|
||||
"extra_sbatch_line": "#SBATCH --gres=gpu:4",
|
||||
"logfile_path": "/p/project/cellsinsilico/paulslustigebude/ma/experiments/eval/logs/%x-%A.%a",
|
||||
"nastja_binary_path": "/p/project/cellsinsilico/paulslustigebude/nastja/build-cuda/nastja",
|
||||
"config_path": "/p/project/cellsinsilico/paulslustigebude/ma/experiments/eval/generated/config/${SLURM_JOB_NAME}.json",
|
||||
"output_dir_path": "/p/scratch/cellsinsilico/paul/nastja-out/${SLURM_JOB_NAME}-${SLURM_ARRAY_JOB_ID}.${SLURM_ARRAY_TASK_ID}"
|
||||
},
|
||||
"batches": [
|
||||
{
|
||||
"name": "strong-gpu-01-01-01",
|
||||
"nodes": 1,
|
||||
"tasks": 1,
|
||||
"time": "00:15:00",
|
||||
"extra_sbatch_line": "#SBATCH --gres=gpu:1"
|
||||
},
|
||||
{
|
||||
"name": "strong-gpu-01-01-02",
|
||||
"nodes": 1,
|
||||
"tasks": 2,
|
||||
"time": "00:15:00",
|
||||
"extra_sbatch_line": "#SBATCH --gres=gpu:2"
|
||||
},
|
||||
{
|
||||
"name": "strong-gpu-01-02-02",
|
||||
"nodes": 1,
|
||||
"tasks": 4,
|
||||
"time": "00:15:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-gpu-02-02-02",
|
||||
"nodes": 2,
|
||||
"tasks": 8,
|
||||
"time": "00:15:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-gpu-02-02-04",
|
||||
"nodes": 4,
|
||||
"tasks": 16,
|
||||
"time": "00:15:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-gpu-02-04-04",
|
||||
"nodes": 8,
|
||||
"tasks": 32,
|
||||
"time": "00:15:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-gpu-04-04-04",
|
||||
"nodes": 16,
|
||||
"tasks": 64,
|
||||
"time": "00:15:00"
|
||||
},
|
||||
{
|
||||
"name": "strong-gpu-04-04-08",
|
||||
"nodes": 32,
|
||||
"tasks": 128,
|
||||
"time": "00:15:00"
|
||||
}
|
||||
]
|
||||
}
|
31
experiments/eval/templates/strong-batch.j2
Normal file
31
experiments/eval/templates/strong-batch.j2
Normal file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#SBATCH --job-name={{ name }}
|
||||
#SBATCH --account={{ account }}
|
||||
#SBATCH --partition={{ partition }}
|
||||
#SBATCH --nodes={{ nodes }}
|
||||
#SBATCH --ntasks={{ tasks }}
|
||||
# Counted per node
|
||||
{{ extra_sbatch_line }}
|
||||
#SBATCH --time={{ time }}
|
||||
#SBATCH --output={{ logfile_path }}
|
||||
#SBATCH --error={{ logfile_path }}
|
||||
#SBATCH --array=1-5
|
||||
|
||||
NASTJA_BINARY="{{ nastja_binary_path }}"
|
||||
CONFIG_FILE="{{ config_path }}"
|
||||
OUTPUT_DIR="{{ output_dir_path }}"
|
||||
module load Stages/2024 GCC/12.3.0 ParaStationMPI/5.9.2-1 CMake/3.26.3 mold/1.11.0 jq/1.6 git Python
|
||||
|
||||
echo "${NASTJA_BINARY_PATH}"
|
||||
echo "${CONFIG_FILE}"
|
||||
echo "${OUTPUT_DIR}"
|
||||
|
||||
cat "${CONFIG_FILE}"
|
||||
|
||||
mkdir -p "${OUTPUT_DIR}"
|
||||
|
||||
srun "${NASTJA_BINARY}" \
|
||||
-c "${CONFIG_FILE}" \
|
||||
-o "${OUTPUT_DIR}"
|
||||
|
258
experiments/eval/templates/strong-cpu.json
Normal file
258
experiments/eval/templates/strong-cpu.json
Normal file
@ -0,0 +1,258 @@
|
||||
{
|
||||
"Application": "Cells",
|
||||
"CellsInSilico": {
|
||||
"2D": false,
|
||||
"adhesion": {
|
||||
"matrix": [
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 450.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 450.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 50.0]
|
||||
],
|
||||
"polarityenabled": false
|
||||
},
|
||||
"centerofmass": {
|
||||
"steps": 1
|
||||
},
|
||||
"cleaner": {
|
||||
"killdistance": 0,
|
||||
"steps": 100
|
||||
},
|
||||
"contactinhibition": {
|
||||
"enabled": false
|
||||
},
|
||||
"division": {
|
||||
"condition": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"( volume >= 0.9 * volume0 ) & ( rnd() <= 0.00001 ) & generation < 1"
|
||||
],
|
||||
"enabled": true,
|
||||
"halveSignals": false
|
||||
},
|
||||
"dynamicecm": {
|
||||
"alpha": 2.0,
|
||||
"beta": 0.5,
|
||||
"c": 4.0,
|
||||
"deltat": 0.10000000149011612,
|
||||
"ecmCellID": 0,
|
||||
"enabled": true,
|
||||
"eta": 0.25,
|
||||
"k0": 0.10000000149011612,
|
||||
"k1": 0.10000000149011612,
|
||||
"lambda": 10.0,
|
||||
"phi": 1.0,
|
||||
"pushSteps": 10,
|
||||
"pushWeight": 0.5,
|
||||
"stepsPerMcs": 100
|
||||
},
|
||||
"ecmdegradation": {
|
||||
"enabled": false
|
||||
},
|
||||
"energyfunctions": [
|
||||
"Volume00",
|
||||
"Surface01",
|
||||
"Motility00",
|
||||
"Adhesion01",
|
||||
"DynamicECM00"
|
||||
],
|
||||
"liquid": 6,
|
||||
"logcellproperties": {
|
||||
"enabled": false
|
||||
},
|
||||
"orientation": {
|
||||
"enabled": true,
|
||||
"motility": "persistentRandomWalk",
|
||||
"motilityamount": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"numRandomNumbers": 5,
|
||||
"persistenceMagnitude": 0.0,
|
||||
"persistentDecay": 0.8,
|
||||
"recalculationtime": 200
|
||||
},
|
||||
"polarity": {
|
||||
"enabled": false
|
||||
},
|
||||
"signaling": {
|
||||
"constant": false,
|
||||
"enabled": false
|
||||
},
|
||||
"surface": {
|
||||
"default": {
|
||||
"storage": "const",
|
||||
"value": 400.0
|
||||
},
|
||||
"lambda": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
5.625,
|
||||
5.625,
|
||||
1.0
|
||||
],
|
||||
"sizechange": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
-0.05,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
]
|
||||
},
|
||||
"temperature": 50.0,
|
||||
"visitor": {
|
||||
"checkerboard": "01",
|
||||
"stepwidth": 10
|
||||
},
|
||||
"volume": {
|
||||
"default": {
|
||||
"storage": "const",
|
||||
"value": 500.0
|
||||
},
|
||||
"lambda": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
7.5,
|
||||
7.5,
|
||||
7.5
|
||||
],
|
||||
"sizechange": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
-0.05,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
]
|
||||
}
|
||||
},
|
||||
"DefineFunctions": [
|
||||
"r_angle()=360*rnd()",
|
||||
"r_size()=400*rnd()"
|
||||
],
|
||||
"Filling": {
|
||||
"cells": [
|
||||
{
|
||||
"box": [
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
384,
|
||||
384,
|
||||
384
|
||||
]
|
||||
],
|
||||
"celltype": 0,
|
||||
"component": 0,
|
||||
"pattern": "const",
|
||||
"seed": 0,
|
||||
"shape": "cube",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"box": [
|
||||
[117, 117, 177],
|
||||
[267, 267, 267]
|
||||
],
|
||||
"celltype": 9,
|
||||
"center": [192, 192, 192],
|
||||
"component": 0,
|
||||
"count": 5500,
|
||||
"pattern": "voronoi",
|
||||
"radius": 75,
|
||||
"seed": 758960,
|
||||
"shape": "sphere",
|
||||
"value": 8
|
||||
}
|
||||
],
|
||||
"initialoutput": false,
|
||||
"randomseed": 758959
|
||||
},
|
||||
"Geometry": {
|
||||
"blockcount": [
|
||||
4,
|
||||
4,
|
||||
3
|
||||
],
|
||||
"blockdefault": "fill",
|
||||
"blocksize": [
|
||||
96,
|
||||
96,
|
||||
128
|
||||
],
|
||||
"blocktype": [
|
||||
[
|
||||
[
|
||||
1
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"Settings": {
|
||||
"deltat": 1.0,
|
||||
"deltax": 1.0,
|
||||
"handleFPE": "signal",
|
||||
"logger": {
|
||||
"group": 0,
|
||||
"steps": 100
|
||||
},
|
||||
"randomseed": 42,
|
||||
"statusoutput": 1,
|
||||
"timestepguard": 1,
|
||||
"timesteps": 5
|
||||
}
|
||||
}
|
263
experiments/eval/templates/strong-gpu.json
Normal file
263
experiments/eval/templates/strong-gpu.json
Normal file
@ -0,0 +1,263 @@
|
||||
{
|
||||
"Application": "Cells",
|
||||
"CellsInSilico": {
|
||||
"2D": false,
|
||||
"adhesion": {
|
||||
"matrix": [
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 450.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 450.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 50.0]
|
||||
],
|
||||
"polarityenabled": false
|
||||
},
|
||||
"centerofmass": {
|
||||
"steps": 1
|
||||
},
|
||||
"cleaner": {
|
||||
"killdistance": 0,
|
||||
"steps": 100
|
||||
},
|
||||
"contactinhibition": {
|
||||
"enabled": false
|
||||
},
|
||||
"division": {
|
||||
"condition": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"( volume >= 0.9 * volume0 ) & ( rnd() <= 0.00001 ) & generation < 1"
|
||||
],
|
||||
"enabled": true,
|
||||
"halveSignals": false
|
||||
},
|
||||
"dynamicecm": {
|
||||
"alpha": 2.0,
|
||||
"beta": 0.5,
|
||||
"c": 4.0,
|
||||
"deltat": 0.10000000149011612,
|
||||
"ecmCellID": 0,
|
||||
"enabled": true,
|
||||
"eta": 0.25,
|
||||
"k0": 0.10000000149011612,
|
||||
"k1": 0.10000000149011612,
|
||||
"lambda": 10.0,
|
||||
"phi": 1.0,
|
||||
"pushSteps": 10,
|
||||
"pushWeight": 0.5,
|
||||
"stepsPerMcs": 100
|
||||
},
|
||||
"ecmdegradation": {
|
||||
"enabled": false
|
||||
},
|
||||
"energyfunctions": [
|
||||
"Volume00",
|
||||
"Surface01",
|
||||
"Motility00",
|
||||
"Adhesion01",
|
||||
"DynamicECM00"
|
||||
],
|
||||
"liquid": 6,
|
||||
"logcellproperties": {
|
||||
"enabled": false
|
||||
},
|
||||
"orientation": {
|
||||
"enabled": true,
|
||||
"motility": "persistentRandomWalk",
|
||||
"motilityamount": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"numRandomNumbers": 5,
|
||||
"persistenceMagnitude": 0.0,
|
||||
"persistentDecay": 0.8,
|
||||
"recalculationtime": 200
|
||||
},
|
||||
"polarity": {
|
||||
"enabled": false
|
||||
},
|
||||
"signaling": {
|
||||
"constant": false,
|
||||
"enabled": false
|
||||
},
|
||||
"surface": {
|
||||
"default": {
|
||||
"storage": "const",
|
||||
"value": 400.0
|
||||
},
|
||||
"lambda": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
5.625,
|
||||
5.625,
|
||||
1.0
|
||||
],
|
||||
"sizechange": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
-0.05,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
]
|
||||
},
|
||||
"temperature": 50.0,
|
||||
"visitor": {
|
||||
"checkerboard": "01",
|
||||
"stepwidth": 10
|
||||
},
|
||||
"volume": {
|
||||
"default": {
|
||||
"storage": "const",
|
||||
"value": 500.0
|
||||
},
|
||||
"lambda": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
7.5,
|
||||
7.5,
|
||||
7.5
|
||||
],
|
||||
"sizechange": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
-0.05,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
]
|
||||
}
|
||||
},
|
||||
"DefineFunctions": [
|
||||
"r_angle()=360*rnd()",
|
||||
"r_size()=400*rnd()"
|
||||
],
|
||||
"Filling": {
|
||||
"cells": [
|
||||
{
|
||||
"box": [
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
384,
|
||||
384,
|
||||
384
|
||||
]
|
||||
],
|
||||
"celltype": 0,
|
||||
"component": 0,
|
||||
"pattern": "const",
|
||||
"seed": 0,
|
||||
"shape": "cube",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"box": [
|
||||
[117, 117, 177],
|
||||
[267, 267, 267]
|
||||
],
|
||||
"celltype": 9,
|
||||
"center": [192, 192, 192],
|
||||
"component": 0,
|
||||
"count": 5500,
|
||||
"pattern": "voronoi",
|
||||
"radius": 75,
|
||||
"seed": 758960,
|
||||
"shape": "sphere",
|
||||
"value": 8
|
||||
}
|
||||
],
|
||||
"initialoutput": false,
|
||||
"randomseed": 758959
|
||||
},
|
||||
"Geometry": {
|
||||
"blockcount": [
|
||||
4,
|
||||
4,
|
||||
3
|
||||
],
|
||||
"blockdefault": "fill",
|
||||
"blocksize": [
|
||||
96,
|
||||
96,
|
||||
128
|
||||
],
|
||||
"blocktype": [
|
||||
[
|
||||
[
|
||||
1
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"Settings": {
|
||||
"deltat": 1.0,
|
||||
"deltax": 1.0,
|
||||
"handleFPE": "signal",
|
||||
"logger": {
|
||||
"group": 0,
|
||||
"steps": 100
|
||||
},
|
||||
"randomseed": 42,
|
||||
"statusoutput": 1,
|
||||
"timestepguard": 1,
|
||||
"timesteps": 5,
|
||||
"cuda": {
|
||||
"subblocks": {
|
||||
"blockDim": [8, 8, 8]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
107
experiments/scripts/gen/weak.py
Normal file
107
experiments/scripts/gen/weak.py
Normal file
@ -0,0 +1,107 @@
|
||||
import copy
|
||||
import json
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
configurations = [
|
||||
(1, 1, 1),
|
||||
(1, 1, 2),
|
||||
(1, 2, 2),
|
||||
(2, 2, 2),
|
||||
(2, 2, 4),
|
||||
(2, 4, 4),
|
||||
(4, 4, 4),
|
||||
(4, 4, 8),
|
||||
(4, 8, 8),
|
||||
(8, 8, 8)
|
||||
]
|
||||
|
||||
with open("templates/spheroid_weak.json") as template_file:
|
||||
template = json.load(template_file)
|
||||
|
||||
SIZE_X = 400
|
||||
SIZE_Y = 400
|
||||
SIZE_Z = 400
|
||||
|
||||
for bx, by, bz in configurations:
|
||||
nastja_config = copy.deepcopy(template)
|
||||
nastja_config["Geometry"]["blockcount"] = [bx, by, bz]
|
||||
nastja_config["Geometry"]["blocksize"] = [SIZE_X, SIZE_Y, SIZE_Z]
|
||||
|
||||
# Fill the whole domain with ECM
|
||||
cells_filling = [
|
||||
{
|
||||
"shape": "cube",
|
||||
"box": [
|
||||
[0, 0, 0],
|
||||
[bx * SIZE_X, by * SIZE_Y, bz * SIZE_Z]
|
||||
],
|
||||
"value": 0,
|
||||
"celltype": 0
|
||||
}
|
||||
]
|
||||
|
||||
# Place a bunch of cells in each block to keep each rank busy
|
||||
for z in range(bz):
|
||||
for y in range(by):
|
||||
for x in range(bx):
|
||||
sx = x * SIZE_X
|
||||
sy = y * SIZE_Y
|
||||
sz = z * SIZE_Z
|
||||
cells_filling.append({
|
||||
"shape": "sphere",
|
||||
"pattern": "voronoi",
|
||||
"count": 5500,
|
||||
"radius": 75,
|
||||
"center": [sx + 200, sy + 200, sz + 200],
|
||||
"box": [
|
||||
[sx + 110, sy + 110, sz + 110],
|
||||
[sx + 290, sy + 290, sz + 290]
|
||||
],
|
||||
"celltype": 9
|
||||
})
|
||||
nastja_config["Filling"]["cells"] = cells_filling
|
||||
|
||||
ntasks = bx * by * bz
|
||||
if ntasks < 4:
|
||||
nodes = 1
|
||||
gpus_per_node = ntasks
|
||||
else:
|
||||
assert ntasks % 4 == 0
|
||||
nodes = ntasks // 4
|
||||
gpus_per_node = 4
|
||||
|
||||
label = f"weak400-t{ntasks:04}n{nodes:03}g{gpus_per_node}x{bx}y{by}z{bz}"
|
||||
|
||||
with open(f"configs/measurements/weak/spheroid_{label}.json", "w") as config_file:
|
||||
json.dump(nastja_config, config_file, indent=2)
|
||||
|
||||
batch_config = f"""#!/usr/bin/env bash
|
||||
|
||||
#SBATCH --job-name={label}
|
||||
#SBATCH --account=hkf6
|
||||
#SBATCH --partition=booster
|
||||
#SBATCH --nodes={nodes}
|
||||
#SBATCH --ntasks={ntasks}
|
||||
# Counted per node
|
||||
#SBATCH --gres=gpu:{gpus_per_node}
|
||||
#SBATCH --time=00:15:00
|
||||
#SBATCH --output=logs/{label}-%A_%a.log
|
||||
#SBATCH --error=logs/{label}-%A_%a.log
|
||||
#SBATCH --array=1-5
|
||||
|
||||
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
||||
OUTPUT_DIR="/p/scratch/cellsinsilico/paul/nastja-out/{label}-${{SLURM_ARRAY_TASK_ID}}"
|
||||
|
||||
echo "outdir is ${{OUTPUT_DIR}}"
|
||||
|
||||
mkdir -p "${{OUTPUT_DIR}}"
|
||||
source "${{SOURCE_DIR}}/activate-nastja-modules"
|
||||
|
||||
srun --unbuffered "${{SOURCE_DIR}}/nastja/build-cuda/nastja" \\
|
||||
-c "${{SOURCE_DIR}}/ma/experiments/configs/measurements/weak/spheroid_{label}.json" \\
|
||||
-o "${{OUTPUT_DIR}}"
|
||||
"""
|
||||
|
||||
with open(f"batch/measurements/weak/{label}", "w", encoding="utf8") as batch_config_file:
|
||||
batch_config_file.write(batch_config)
|
@ -128,5 +128,19 @@ def strong_dat(db, time):
|
||||
for tasks, time in values:
|
||||
print(f"{tasks}\t{time}")
|
||||
|
||||
@timing.command()
|
||||
@click.option("--db", default="timings.db", help="Path of sqlite database file")
|
||||
def weak_dat(db):
|
||||
db = sqlite3.connect(db)
|
||||
c = db.cursor()
|
||||
res = c.execute("""
|
||||
select tasks, avg(averagetime) as mean from timings group by tasks order by tasks asc
|
||||
""")
|
||||
values = res.fetchall()
|
||||
|
||||
print("gpus\tefficiency")
|
||||
for tasks, mean in values:
|
||||
print(f"{tasks}\t{values[0][1] / mean}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
timing()
|
||||
|
100
experiments/templates/spheroid_weak.json
Normal file
100
experiments/templates/spheroid_weak.json
Normal file
@ -0,0 +1,100 @@
|
||||
{
|
||||
"Comments": ["Celltype Usage", "0 Dynamic ECM", "1-5 Not Used", "6 Liquid ", "7 Apoptotic cell Type ", "8 Basic Non Dividing Cell type (surrounding)", "9 Cancer"],
|
||||
"Application": "Cells",
|
||||
"CellsInSilico": {
|
||||
"ecmdegradation": {
|
||||
"enabled": "false",
|
||||
"steps": 99999,
|
||||
"stochastic": "true",
|
||||
"probability": 0.5
|
||||
},
|
||||
"energyfunctions": ["Volume00", "Surface01", "Motility00", "Adhesion01", "DynamicECM00"],
|
||||
"liquid": 6,
|
||||
"volume": {
|
||||
"default": {
|
||||
"storage": "const",
|
||||
"value": 500
|
||||
},
|
||||
"lambda": [0, 0, 0, 0, 0, 0, 0, 7.5, 7.5, 7.5],
|
||||
"sizechange": [0, 0, 0, 0, 0, 0, 0, -0.05, 0, 0, 0, 0, 0, 0, 0]
|
||||
},
|
||||
"surface": {
|
||||
"default": {
|
||||
"storage": "const",
|
||||
"value": 400
|
||||
},
|
||||
"lambda": [0, 0, 0, 0, 0, 0, 0, 5.625, 5.625, 1],
|
||||
"sizechange": [0, 0, 0, 0, 0, 0, 0, -0.05, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
},
|
||||
"adhesion": {
|
||||
"matrix": [
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 450],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 450, 0, 0, 0, 0, 0, 0, 0, 50]
|
||||
]
|
||||
},
|
||||
"temperature": 50,
|
||||
"division": {
|
||||
"enabled": "true",
|
||||
"condition": ["", "", "", "", "", "", "", "", "", "( volume >= 0.9 * volume0 ) & ( rnd() <= 0.00001 ) & generation < 1"]
|
||||
},
|
||||
"centerofmass": {
|
||||
"steps": 1
|
||||
},
|
||||
"signaling": {
|
||||
"enabled": false
|
||||
},
|
||||
"orientation": {
|
||||
"enabled": true,
|
||||
"motility": "persistentRandomWalk",
|
||||
"persistenceMagnitude": 0.0,
|
||||
"recalculationtime": 200,
|
||||
"motilityamount": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
},
|
||||
"visitor": {
|
||||
"stepwidth": 10,
|
||||
"checkerboard": "01"
|
||||
},
|
||||
"cleaner": {
|
||||
"killDistance": 20
|
||||
},
|
||||
"dynamicecm": {
|
||||
"enabled": true,
|
||||
"stepsPerMcs": 100,
|
||||
"pushSteps": 10,
|
||||
"pushWeight": 2,
|
||||
"ecmCellID": 0,
|
||||
"deltat": 0.1,
|
||||
"eta": 0.25,
|
||||
"k0": 0.1,
|
||||
"k1": 0.1,
|
||||
"c": 4,
|
||||
"alpha": 2,
|
||||
"d": 0.3,
|
||||
"phi": 1
|
||||
}
|
||||
},
|
||||
"Geometry": {
|
||||
"blockcount": null,
|
||||
"blocksize": null
|
||||
},
|
||||
"Settings": {
|
||||
"randomseed": 0,
|
||||
"timesteps": 20,
|
||||
"statusoutput": 1
|
||||
},
|
||||
"DefineFunctions": [
|
||||
"r_angle()=360*rnd()",
|
||||
"r_size()=400*rnd()"
|
||||
],
|
||||
"Filling": {
|
||||
"cells": null
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user