Skip to content

Commit

Permalink
Use spanner job to render
Browse files Browse the repository at this point in the history
  • Loading branch information
unkaktus committed Mar 7, 2023
1 parent 9f62569 commit c7dc8a2
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 37 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Dockerfile
/aux
/states
/data
/cache
/.git
/.git
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.aux
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ RUN python3 -c 'import scri'
WORKDIR /opt/rose
COPY . .
ENV PV_PLUGIN_PATH=/opt/rose/plugins
ENTRYPOINT ["/bin/bash"]
ENV PATH=${PATH}":/opt/rose/render"
29 changes: 29 additions & 0 deletions render/begin.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Name = "rose"
Type = "simple"

Walltime = "4h"

Nodes = 2
TasksPerNode = 2

Email = "batch@example.com"

InitScript = [
"source /home/SPACK2023/share/spack/setup-env.sh",
"module load apptainer-1.0.3-gcc-12.2.0-aojy6ca"
]

Runtime = [
"apptainer",
"exec",
"--bind /work:/work",
"--bind /scratch:/scratch",
"--env ROSE_CACHE_DIR=/scratch/user/rose-cache"
]
Executable = "/home/user/apptainers/rose-v1.1.0.sif"
Arguments = [
"render_state.py",
"--state={{.ConfigFilename}}",
"--total-task-number={{.TotalTaskNumber}}",
"--task-id={{.TaskID}}"
]
16 changes: 0 additions & 16 deletions render/job.sh

This file was deleted.

15 changes: 0 additions & 15 deletions render/render.sh

This file was deleted.

8 changes: 4 additions & 4 deletions render/render_state.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/usr/bin/env -S python -u

import paraview.simple as pv
import numpy as np
import argparse
import os

parser = argparse.ArgumentParser('rose')
parser = argparse.ArgumentParser('render_state.py')
parser.add_argument("--total-task-number", type=int, help="Total number of tasks")
parser.add_argument("--task-id", type=int, help="Current task ID")
parser.add_argument("--state", type=str, help="State filename")
parser.add_argument("--output-dir", type=str, help="Path to output directory", default=None)
args = parser.parse_args()

import paraview.simple as pv
import numpy as np
import os

output_dir = os.path.splitext(args.state)[0]
if args.output_dir is not None:
Expand Down

0 comments on commit c7dc8a2

Please sign in to comment.