Skip to content

Commit 3fd15d5

Browse files
committed
Move Grendel Makefile into grendel/
1 parent 8eb27ca commit 3fd15d5

File tree

4 files changed

+33
-18
lines changed

4 files changed

+33
-18
lines changed

grendel/README.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,38 @@ one needs to use the newly acquired _q48_ nodes with 3.0 GHz CPUs, 384 GB of
66
memory, and 3.5 TB of SSD disk available for temporary files in a _scratch/_
77
directory.
88

9-
With `grendel_build.sh` we provide a script to compile all the benchmarks on the
10-
CPU in question. This way, we are sure to compile it for the right instruction
11-
set.
9+
## Generating the .sh scripts
10+
11+
All shell scripts used on the cluster are generated by the Python 3 script in
12+
`grendel_gen.py`
1213

1314
```bash
14-
sbatch -p q48 grendel/grendel_build.sh
15+
module load python
16+
python3 grendel_gen.py
1517
```
1618

17-
The shell scripts running each instance of a benchmark can be generated by
18-
running the Python 3 script `grendel_gen.py`
19+
Alternatively, you can use the Makefile, which both includes a _build_ and a
20+
_clean_ target.
1921

2022
```bash
21-
cd grendel && python3 grendel_gen.py
23+
ml load python && make
2224
```
2325

24-
Then one can schedule all the generated shell files from the root directory of
25-
this repository with
26+
## Running the .sh scripts
27+
28+
To compile all the benchmarks for the desired CPU (i.e. with the correct
29+
instruction set), we provide the `grendel_build.sh` script that can be run on
30+
one of the desired nodes in question. This can be run from the root directory as
31+
follows:
32+
33+
```bash
34+
sbatch -p q48 grendel/build.sh
35+
```
36+
37+
You can follow the build process with `tail -f slurm-<jobid>.out` .
38+
39+
When the build is complete, then you can schedule all the generated shell files
40+
from the root directory of this repository with
2641

2742
```bash
2843
for f in grendel/*_*_*.sh; do sbatch -p q48 $f; done

grendel/grendel_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def script_str_build():
242242
# RUN BUILD SCRIPTS
243243
# =========================================================================== #
244244

245-
with open("grendel_build.sh", "w") as file:
245+
with open("build.sh", "w") as file:
246246
file.write(script_str_build())
247247

248248
for variant in VARIANTS:

grendel/makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.PHONY: all build clean
2+
3+
build: | clean
4+
@python3 grendel_gen.py
5+
@chmod a+x *.sh
6+
7+
clean:
8+
@rm -f *.sh

makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,3 @@ sat-solver/pigeonhole_principle:
7676
sat-solver/queens: N := 6
7777
sat-solver/queens:
7878
@$(subst VARIANT,$(V),./build/src/VARIANT_sat_queens) -N $(N) -M $(M)
79-
80-
# ============================================================================ #
81-
# GRENDEL
82-
# ============================================================================ #
83-
grendel:
84-
@rm -f grendel/*_*_*.sh
85-
@cd grendel && python3 grendel_gen.py
86-
@chmod a+x grendel/*.sh

0 commit comments

Comments
 (0)