-
Notifications
You must be signed in to change notification settings - Fork 1
/
script_csa_omp.sh
44 lines (36 loc) · 1.15 KB
/
script_csa_omp.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
#!/bin/bash
#SBATCH --partition=cluster
#SBATCH --job-name=csa
#SBATCH --output=out_matrix_calc_csa.out
#SBATCH --error=err_matrix_calc_csa.err
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=32
#SBATCH --time=0-1:00
#SBATCH --exclusive
#SBATCH --hint=compute_bound
#just to save the runtimes
#rm ~/csa-openmp/runtimes/tempo_de_exec_csa.txt
#touch ~/csa-openmp/runtimes/tempo_de_exec_csa.txt
#Compila o código
gcc -g -Wall -fopenmp -o simulated_annealing simulated_annealing.c CSA_Problem.c -lm
#Loop principal de execuções. São 4 tentativas
tentativas=15 #Quantas vezes o código será executado
for function in 0 1 2 #numero da funcao a ser utilizada 0 = 2001, 1 = 2003, 2 = 2006
do
echo -e "========== FUNCAO $function ==========" >> "" # ome file
for dimensao in 5 10 50 100 #tamanho do problema
do
echo -e "DIMENSAO $dimensao" >> "" # some file
for thread in 2 4 8 16 32 #números de threads utilizadas
do
echo -e "THREAD $thread" >> ""#some file
for tentativa in $(seq $tentativas)
do
echo -e `simulated_annealing $thread $dimensao $function`
done
echo -e " " >> "" #some file
done
done
echo -e "\n\n\n" >> "" #some file
done
exit