-
Notifications
You must be signed in to change notification settings - Fork 5
/
run.sh
executable file
·159 lines (120 loc) · 2.68 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/usr/bin/bash
# Copyright (c) 2023 AUTHORS
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
source "$HOME/.cargo/env"
CHARM_DIR=/work/diehlpk/Compile/medusa/charm/bin/
#JAVA_DIR=/work/diehlpk/Compile/all/jdk-20.0.1/bin
JAVA_DIR=/lustre/projects/diehl-group/heat/jdk-20.0.1/bin
module load gcc/12.2.0
module load python/3.10.5
PYTHON=0
SWIFT=0
RUST=0
GO=0
CHAPEL=0
CXX=0
JULIA=0
CHARM=0
HPX=0
JAVA=1
TIME=1000
SIZE=1000000
if [ "${PYTHON}" == "1" ]
then
cd python
for i in {40..0..2}
do
python3.10 heat2.py $i ${TIME} ${SIZE} 0
done
cd ..
fi
if [ "${SWIFT}" == "1" ]
then
cd swift/heat
for i in {40..0..2}
do
./heat_3 $i ${TIME} ${SIZE} >> perfstat.csv
done
cd ../..
fi
if [ "${RUST}" == "1" ]
then
cd rust/heat_simd/target/release
for i in {40..0..2}
do
./heat_simd $i ${TIME} ${SIZE}
done
cd ../../../..
fi
if [ "${GO}" == "1" ]
then
cd go/heat
go build -ldflags "-s -w" main.go
for i in {40..0..2}
do
./main $i ${TIME} ${SIZE}
done
cd ../..
fi
if [ "${CHAPEL}" == "1" ]
then
cd chapel/heat/
#/work/diehlpk/Compile/all/chapel-1.30.0/bin/linux64-x86_64/chpl --fast heat_ghosts.chpl
for i in {40..0..2}
do
CHPL_RT_NUM_THREADS_PER_LOCALE=$i ./heat_ghosts --nx ${SIZE} --nt ${TIME} --nthreads $i >> perfstat.csv
done
cd ../
fi
if [ "${CXX}" == "1" ]
then
cd cxx
g++ -o heat -O3 -std=c++17 heat.cxx -pthread
for i in {40..0..2}
do
./heat $i ${TIME} ${SIZE}
done
cd ../
fi
if [ "${JULIA}" == "1" ]
then
cd julia
for i in {40..0..2}
do
/work/diehlpk/Compile/all/julia-1.8.5/bin/julia -O3 --threads $i heat_ghost.jl $i ${TIME} ${SIZE} > data.csv
done
cd ../
fi
if [ "${CHARM}" == "1" ]
then
cd charm
$CHARM_DIR/charmc stencil_1d.ci
$CHARM_DIR/charmc stencil_1d.cpp -c++-option -std=c++17 -lstdc++fs -o stencil_1d -O3 -march=native
for i in {40..0..2}
do
./charmrun ./stencil_1d +p $i $((2*${i})) ${TIME} ${SIZE}
done
cd ../
fi
if [ "${HPX}" == "1" ]
then
cd hpx/heat/bin
for i in {40..0..2}
do
./heat_ghosts $i ${TIME} ${SIZE} --hpx:threads=$i
done
cd ../../..
fi
if [ "${JAVA}" == "1" ]
then
cd java/heat
$JAVA_DIR/javac -O -d classes/ src/main/java/edu/lsu/cct/heat/Main.java src/main/java/edu/lsu/cct/heat/HeatImpl.java
cd ../..
for i in {40..0..2}
do
$JAVA_DIR/java -cp ./java/heat/classes edu.lsu.cct.heat.Main $i ${TIME} ${SIZE}
done
fi