Skip to content

Commit 67d4ac6

Browse files
Modified parallelism of the outer loop
1 parent dc18a14 commit 67d4ac6

8 files changed

+49
-49
lines changed

src/data/benchmark_blocks_BLAS_MP.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
256 0.029020
2-
512 0.239012
3-
1024 1.848555
4-
2048 16.368507
5-
4096 132.531561
1+
256 0.030328
2+
512 0.177595
3+
1024 1.445774
4+
2048 15.421432
5+
4096 129.090226
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
256 0.281818
2-
512 1.317830
3-
1024 7.093896
4-
2048 41.754836
1+
256 0.043930
2+
512 0.374764
3+
1024 2.887198
4+
2048 23.121569
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
256 0.277481
2-
512 1.375895
3-
1024 6.811354
4-
2048 39.021412
1+
256 0.042945
2+
512 0.464910
3+
1024 2.650614
4+
2048 20.929035
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
256 0.307730
2-
512 1.300510
3-
1024 6.680420
4-
2048 37.540720
1+
256 0.038282
2+
512 3.066314
3+
1024 2.466480
4+
2048 20.243482
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
256 0.287679
2-
512 1.270617
3-
1024 6.908851
4-
2048 39.480489
1+
256 0.038916
2+
512 1.018796
3+
1024 2.526065
4+
2048 20.393082
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
256 0.322021
2-
512 1.505906
3-
1024 9.078179
4-
2048 54.820040
1+
256 0.057479
2+
512 0.459827
3+
1024 6.478586
4+
2048 30.806257

src/main.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -615,38 +615,38 @@ int main(){
615615
u_int32_t u_b = (int) (pow(2, s+t) / p);
616616

617617

618-
/* Benchmarking the order of loop. */
619-
clean_file_loops();
620-
benchmark_loops_order(p);
621-
622-
/* Benchmarking different modulo techniques. */
623-
clean_file_modulos();
624-
benchmark_modulos(p, u, u_overline, u_b, s, t);
618+
// /* Benchmarking the order of loop. */
619+
// clean_file_loops();
620+
// benchmark_loops_order(p);
621+
//
622+
// /* Benchmarking different modulo techniques. */
623+
// clean_file_modulos();
624+
// benchmark_modulos(p, u, u_overline, u_b, s, t);
625625

626626
/* Benchmarking parallelism apporach with previous modulo techniques. */
627627
clean_file_modulos_MP();
628628
benchmark_modulos_MP(p, u, u_overline, u_b, s, t);
629629

630630
/* Benchmarking block product approach. */
631-
clean_file_blocks();
632-
benchmark_blocks(p, u_overline);
631+
// clean_file_blocks();
632+
// benchmark_blocks(p, u_overline);
633633

634634
/* Benchmarking the final mixed implementation. */
635635
clean_file_blocks_MP();
636636
benchmark_blocks_MP(p, u_overline);
637637

638638
/* Benchmarking the progress made during this internship and work completed
639639
last year, using the same environment: 1 thread only, same A, B and p. */
640-
clean_file_float_integer();
641-
double P[5];
642-
P[0] = pow(2, 26) - 5;
643-
P[1] = pow(2, 24) - 3;
644-
P[2] = pow(2, 22) - 3;
645-
P[3] = pow(2, 20) - 3;
646-
P[4] = pow(2, 18) - 5;
647-
for (int i=0; i<5; i++){
648-
benchmark_float_integer(P[i], u_overline, u_b, s, t);;
649-
}
640+
// clean_file_float_integer();
641+
// double P[5];
642+
// P[0] = pow(2, 26) - 5;
643+
// P[1] = pow(2, 24) - 3;
644+
// P[2] = pow(2, 22) - 3;
645+
// P[3] = pow(2, 20) - 3;
646+
// P[4] = pow(2, 18) - 5;
647+
// for (int i=0; i<5; i++){
648+
// benchmark_float_integer(P[i], u_overline, u_b, s, t);;
649+
// }
650650

651651

652652
return 0;

src/main_test.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ int main(int argc, char** argv){
3030
const int TEST6 = 0;
3131
const int TEST7 = 0;
3232
const int TEST8 = 0;
33-
const int TEST9 = 0;
34-
const int TEST10 = 0;
33+
const int TEST9 = 1;
34+
const int TEST10 = 1;
3535
const int TEST11 = 1;
3636

3737

@@ -475,8 +475,8 @@ int main(int argc, char** argv){
475475
// Testing integer mp and float mp.
476476

477477
srand(time(NULL));
478-
double p = 94906249; // 2^{26} < p < 2^{26.5}
479-
// double p = pow(2, 26) - 5;
478+
// double p = 94906249; // 2^{26} < p < 2^{26.5}, please set b = 1
479+
double p = pow(2, 26) - 5;
480480
// double p = pow(2, 24) - 3;
481481
// double p = pow(2, 22) - 3;
482482
// double p = pow(2, 20) - 3;
@@ -496,7 +496,7 @@ int main(int argc, char** argv){
496496

497497
openblas_set_num_threads(1);
498498

499-
int n = 2048;
499+
int n = 512;
500500
int bitsize_p = get_bitsize(p);
501501
int b = get_blocksize(bitsize_p, n);
502502

0 commit comments

Comments
 (0)