master
hiGepi 1 year ago
parent c6afd8087f
commit f01933bb49

@ -0,0 +1,4 @@
CXX = gcc
CFLAGS = -Wall -fopenmp -O3
exo1 :
$(CXX) $(CFLAGS) exo1.c -o exo1

Binary file not shown.

@ -0,0 +1,16 @@
#include "stdio.h"
#include <stdlib.h>
#include <stdint.h>
#include <omp.h>
int main(int argc, char **argv)
{
// Lecture des caractétistiques du processeur
int nb_thread = omp_get_max_threads();
int nb_proc = omp_get_num_procs();
printf("Nb thread max = %d\n\r", nb_thread);
printf("Nb procs : %d\n\r", nb_proc);
return 0;
}

@ -0,0 +1,701 @@
Nb thread max 1
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 1
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000003 seconds
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000031 seconds
OMP work took 0.000034 seconds
Nb thread max 2
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 2
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000018 seconds
Nb thread max 4
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000036 seconds
OMP work took 0.000009 seconds
Nb thread max 6
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000033 seconds
OMP work took 0.000007 seconds
Nb thread max 8
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 100000
Mean time on 10000 executions
Sequential work took 0.000033 seconds
OMP work took 0.000008 seconds
Nb thread max 10
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000007 seconds
Nb thread max 12
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000011 seconds
Nb thread max 1
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 1000
Mean time on 10000 executions
Sequential work took 0.000001 seconds
OMP work took 0.000001 seconds
Nb thread max 1
N 10000
Mean time on 10000 executions
Sequential work took 0.000004 seconds
OMP work took 0.000003 seconds
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000034 seconds
Nb thread max 2
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000017 seconds
Nb thread max 4
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000031 seconds
OMP work took 0.000009 seconds
Nb thread max 6
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000006 seconds
Nb thread max 8
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 100000
Mean time on 10000 executions
Sequential work took 0.000030 seconds
OMP work took 0.000008 seconds
Nb thread max 10
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 10
N 100000
Mean time on 10000 executions
Sequential work took 0.000031 seconds
OMP work took 0.000007 seconds
Nb thread max 12
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 12
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 12
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 12
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000031 seconds
OMP work took 0.000010 seconds
Nb thread max 1
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 1
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000003 seconds
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000034 seconds
Nb thread max 2
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 2
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000018 seconds
Nb thread max 4
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000010 seconds
Nb thread max 6
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000030 seconds
OMP work took 0.000007 seconds
Nb thread max 8
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 100000
Mean time on 10000 executions
Sequential work took 0.000030 seconds
OMP work took 0.000008 seconds
Nb thread max 10
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 10
N 100000
Mean time on 10000 executions
Sequential work took 0.000030 seconds
OMP work took 0.000007 seconds
Nb thread max 12
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000003 seconds
Nb thread max 12
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000004 seconds
Nb thread max 12
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000031 seconds
OMP work took 0.000007 seconds
Nb thread max 1
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 10000
Mean time on 10000 executions
Sequential work took 0.000004 seconds
OMP work took 0.000003 seconds
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000033 seconds
OMP work took 0.000034 seconds
Nb thread max 2
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 2
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000017 seconds
Nb thread max 4
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000031 seconds
OMP work took 0.000009 seconds
Nb thread max 6
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000030 seconds
OMP work took 0.000007 seconds
Nb thread max 8
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 100000
Mean time on 10000 executions
Sequential work took 0.000032 seconds
OMP work took 0.000008 seconds
Nb thread max 10
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 10
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 10
N 100000
Mean time on 10000 executions
Sequential work took 0.000030 seconds
OMP work took 0.000007 seconds
Nb thread max 12
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000003 seconds
Nb thread max 12
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000031 seconds
OMP work took 0.000007 seconds

@ -0,0 +1,4 @@
CXX = gcc
CFLAGS = -Wall -fopenmp -O3
exo2 :
$(CXX) $(CFLAGS) $(LDLIBS) exo2.c -o exo2 -lm

Binary file not shown.

@ -0,0 +1,74 @@
#include "stdio.h"
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include <omp.h>
#include <math.h>
int main(int argc, char **argv)
{
int N;
int nb_thread;
double start;
double end;
// Prise en compte des arguments
if (argc == 3){
N = atoi(argv[1]);
nb_thread = atoi(argv[2]);
printf("Nb thread max %d\n", nb_thread);
printf("N %d\n", N);
} else {
printf("Missing parameters\n\r");
return EXIT_FAILURE;
}
srand(time(NULL));
double x[N], y[N];
for(int i=0; i<N; i++)x[i]=rand();
double mean_s = 0, mean_omp = 0;
int boucle = 10000;
printf("Mean time on %d executions\n", boucle);
// Version séquentielle
for(int t=0; t<boucle;t++){
start = omp_get_wtime();
for(int i=0; i<N; i++){
//Calcul 1
y[i] = 2.27*x[i];
//Calcul 2
// y[i] = 2.27*log(x[i])*cos(x[i]);
}
end = omp_get_wtime();
mean_s += (end-start);
}
// Version parallélisée
omp_set_num_threads(nb_thread);
for(int t=0; t<boucle;t++){
start = omp_get_wtime();
#pragma omp parallel for
for(int i=0; i<N; i++){
//Calcul 1
y[i] = 2.27*x[i];
//Calcul 2
// y[i] = 2.27*log(x[i])*cos(x[i]);
}
end = omp_get_wtime();
mean_omp += (end-start);
}
// Moyenne sur B boucles
mean_s = mean_s/boucle;
mean_omp = mean_omp/boucle;
printf("Sequential work took %f seconds\n", mean_s);
printf("OMP work took %f seconds\n\r", mean_omp);
return 0;
}

@ -0,0 +1,126 @@
import numpy as np
import re
from matplotlib import pyplot as plt
with open ('time.txt', 'r') as timing:
text = timing.read()
# extract the values using regular expression
values = re.findall(r'\d+\.\d+|\d+', text)
# convert values to int or float
values = [float(value) if '.' in value else int(value) for value in values]
result = np.reshape(values,(35,5))
SEQ = result[0:5,3]
result = np.delete(result, (0,2,3), 1)
T1 = result[0:5,:]
T2 = result[5:10,:]
T4 = result[10:15,:]
T6 = result[15:20,:]
T8 = result[20:25,:]
T10 = result[25:30,:]
T12 = result[30:35,:]
plt.figure()
plt.plot(T1[:,0],SEQ,'+-')
plt.plot(T1[:,0],T1[:,1],'+-')
plt.plot(T2[:,0],T2[:,1],'+-')
plt.plot(T4[:,0],T4[:,1],'+-')
plt.plot(T6[:,0],T6[:,1],'+-')
plt.plot(T8[:,0],T8[:,1],'+-')
plt.plot(T10[:,0],T10[:,1],'+-')
plt.plot(T12[:,0],T12[:,1],'+-')
plt.legend(["Sequentiel","1 Thread","2 Threads","4 Threads","6 Threads","8 Threads","10 Threads","12 Threads"])
plt.xlabel("N")
plt.ylabel("t (s)")
plt.title("Multiplication")
plt.show()
with open ('time_500k.txt', 'r') as timing:
text = timing.read()
# extract the values using regular expression
values = re.findall(r'\d+\.\d+|\d+', text)
# convert values to int or float
values = [float(value) if '.' in value else int(value) for value in values]
result = np.reshape(values,(7,5))
SEQ = result[:,3]*1000
T = result[:,0]
Time = result[:,4]*1000
plt.figure()
plt.plot(T,SEQ,'+-')
plt.plot(T,Time,'+-')
plt.legend(["Sequentiel","OMP"])
plt.xlabel("Threads max")
plt.ylabel("t (ms)")
plt.title("Temps de traitement pour N = 5e5")
plt.show()
with open ('time_maths.txt', 'r') as timing:
text = timing.read()
# extract the values using regular expression
values = re.findall(r'\d+\.\d+|\d+', text)
# convert values to int or float
values = [float(value) if '.' in value else int(value) for value in values]
result = np.reshape(values,(20,5))
SEQ = result[0:5,3]
result = np.delete(result, (0,2,3), 1)
T1 = result[0:5,:]
T2 = result[5:10,:]
T6 = result[10:15,:]
T12 = result[15:20,:]
plt.figure()
plt.plot(T1[:,0],SEQ,'+-')
plt.plot(T1[:,0],T1[:,1],'+-')
plt.plot(T2[:,0],T2[:,1],'+-')
plt.plot(T6[:,0],T6[:,1],'+-')
plt.plot(T12[:,0],T12[:,1],'+-')
plt.legend(["Sequentiel","1 Thread","2 Threads","6 Threads","12 Threads"])
plt.xlabel("N")
plt.ylabel("t (s)")
plt.title("Fonctions mathématiques")
plt.show()
with open ('time_maths_500k.txt', 'r') as timing:
text = timing.read()
# extract the values using regular expression
values = re.findall(r'\d+\.\d+|\d+', text)
# convert values to int or float
values = [float(value) if '.' in value else int(value) for value in values]
result = np.reshape(values,(6,5))
SEQ = result[:,3]
T = result[:,0]
Time = result[:,4]
plt.figure()
plt.plot(T,SEQ,'+-')
plt.plot(T,Time,'+-')
plt.legend(["Sequentiel","OMP"])
plt.xlabel("Threads max")
plt.ylabel("t (s)")
plt.title("Temps de traitement pour N = 5e5")
plt.show()

@ -0,0 +1,12 @@
#!/bin/bash
rm exo2
make
for T in 1 2 4 6 8 10 12
do
for N in 10 100 1000 10000 100000
do
./exo2 $N $T >> time.txt
done
done

@ -0,0 +1,210 @@
Nb thread max 1
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 1000
Mean time on 10000 executions
Sequential work took 0.000001 seconds
OMP work took 0.000001 seconds
Nb thread max 1
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000003 seconds
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000033 seconds
OMP work took 0.000035 seconds
Nb thread max 2
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 2
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 2
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000033 seconds
OMP work took 0.000017 seconds
Nb thread max 4
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000039 seconds
OMP work took 0.000009 seconds
Nb thread max 6
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000031 seconds
OMP work took 0.000006 seconds
Nb thread max 8
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 8
N 100000
Mean time on 10000 executions
Sequential work took 0.000034 seconds
OMP work took 0.000008 seconds
Nb thread max 10
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000001 seconds
Nb thread max 10
N 100000
Mean time on 10000 executions
Sequential work took 0.000030 seconds
OMP work took 0.000007 seconds
Nb thread max 12
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 1000
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 12
N 10000
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000031 seconds
OMP work took 0.000007 seconds

@ -0,0 +1,36 @@
Nb thread max 1
N 500000
Mean time on 10000 executions
Sequential work took 0.000257 seconds
OMP work took 0.000231 seconds
Nb thread max 2
N 500000
Mean time on 10000 executions
Sequential work took 0.000216 seconds
OMP work took 0.000096 seconds
Nb thread max 4
N 500000
Mean time on 10000 executions
Sequential work took 0.000216 seconds
OMP work took 0.000052 seconds
Nb thread max 6
N 500000
Mean time on 10000 executions
Sequential work took 0.000214 seconds
OMP work took 0.000041 seconds
Nb thread max 8
N 500000
Mean time on 10000 executions
Sequential work took 0.000216 seconds
OMP work took 0.000048 seconds
Nb thread max 10
N 500000
Mean time on 10000 executions
Sequential work took 0.000205 seconds
OMP work took 0.000043 seconds
Nb thread max 12
N 500000
Mean time on 10000 executions
Sequential work took 0.000209 seconds
OMP work took 0.000044 seconds

@ -0,0 +1,101 @@
Nb thread max 1
N 10
Mean time on 10000 executions
Sequential work took 0.000002 seconds
OMP work took 0.000001 seconds
Nb thread max 1
N 100
Mean time on 10000 executions
Sequential work took 0.000008 seconds
OMP work took 0.000006 seconds
Nb thread max 1
N 1000
Mean time on 10000 executions
Sequential work took 0.000065 seconds
OMP work took 0.000062 seconds
Nb thread max 1
N 10000
Mean time on 10000 executions
Sequential work took 0.000661 seconds
OMP work took 0.000655 seconds
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.006707 seconds
OMP work took 0.006700 seconds
Nb thread max 2
N 10
Mean time on 10000 executions
Sequential work took 0.000001 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 100
Mean time on 10000 executions
Sequential work took 0.000008 seconds
OMP work took 0.000004 seconds
Nb thread max 2
N 1000
Mean time on 10000 executions
Sequential work took 0.000066 seconds
OMP work took 0.000030 seconds
Nb thread max 2
N 10000
Mean time on 10000 executions
Sequential work took 0.000673 seconds
OMP work took 0.000335 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.006723 seconds
OMP work took 0.003375 seconds
Nb thread max 6
N 10
Mean time on 10000 executions
Sequential work took 0.000002 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100
Mean time on 10000 executions
Sequential work took 0.000008 seconds
OMP work took 0.000003 seconds
Nb thread max 6
N 1000
Mean time on 10000 executions
Sequential work took 0.000068 seconds
OMP work took 0.000015 seconds
Nb thread max 6
N 10000
Mean time on 10000 executions
Sequential work took 0.000663 seconds
OMP work took 0.000112 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.006681 seconds
OMP work took 0.001190 seconds
Nb thread max 12
N 10
Mean time on 10000 executions
Sequential work took 0.000003 seconds
OMP work took 0.000007 seconds
Nb thread max 12
N 100
Mean time on 10000 executions
Sequential work took 0.000007 seconds
OMP work took 0.000003 seconds
Nb thread max 12
N 1000
Mean time on 10000 executions
Sequential work took 0.000063 seconds
OMP work took 0.000009 seconds
Nb thread max 12
N 10000
Mean time on 10000 executions
Sequential work took 0.000673 seconds
OMP work took 0.000089 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.006725 seconds
OMP work took 0.001012 seconds

@ -0,0 +1,31 @@
Nb thread max 1
N 500000
Mean time on 10000 executions
Sequential work took 0.032975 seconds
OMP work took 0.033541 seconds
Nb thread max 2
N 500000
Mean time on 10000 executions
Sequential work took 0.033422 seconds
OMP work took 0.017121 seconds
Nb thread max 4
N 500000
Mean time on 10000 executions
Sequential work took 0.033458 seconds
OMP work took 0.008658 seconds
Nb thread max 6
N 500000
Mean time on 10000 executions
Sequential work took 0.033736 seconds
OMP work took 0.005914 seconds
Nb thread max 10
N 500000
Mean time on 10000 executions
Sequential work took 0.033780 seconds
OMP work took 0.005240 seconds
Nb thread max 12
N 500000
Mean time on 10000 executions
Sequential work took 0.033495 seconds
OMP work took 0.004825 seconds

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

@ -0,0 +1,4 @@
CXX = gcc
CFLAGS = -Wall -fopenmp -O3
exo3 :
$(CXX) $(CFLAGS) $(LDLIBS) exo3.c -o exo3 -lm

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

@ -0,0 +1,66 @@
#include "stdio.h"
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include <omp.h>
#include <math.h>
int main(int argc, char **argv)
{
int N;
int nb_thread;
double start;
double end;
if (argc == 3){
N = atoi(argv[1]);
nb_thread = atoi(argv[2]);
printf("Nb thread max %d\n", nb_thread);
printf("N %d\n", N);
} else {
printf("Missing parameters\n\r");
return EXIT_FAILURE;
}
srand(time(NULL));
double x[N], y = 0;
for(int i=0; i<N; i++)x[i]=rand();
double mean_s = 0, mean_omp = 0;
int boucle = 10000;
printf("Mean time on %d executions\n", boucle);
for(int t=0; t<boucle;t++){
start = omp_get_wtime();
for(int i=0; i<N; i++){
y += x[i];
}
end = omp_get_wtime();
mean_s += (end-start);
}
omp_set_num_threads(nb_thread);
for(int t=0; t<boucle;t++){
start = omp_get_wtime();
// #pragma omp parallel for reduction(+:y)
//#pragma omp parallel for schedule(guided,100)
#pragma omp parallel for schedule(static,1000) reduction(+:y)
for(int i=0; i<N; i++){
// #pragma omp atomic
// #pragma omp critical
y += x[i];
}
end = omp_get_wtime();
mean_omp += (end-start);
}
mean_s = mean_s/boucle;
mean_omp = mean_omp/boucle;
printf("Sequential work took %f seconds\n", mean_s);
printf("OMP work took %f seconds\n\r", mean_omp);
return 0;
}

@ -0,0 +1,171 @@
import numpy as np
import re
from matplotlib import pyplot as plt
### Réduction
with open ('time_reduction.txt', 'r') as timing:
text = timing.read()
# extract the values using regular expression
values = re.findall(r'\d+\.\d+|\d+', text)
# convert values to int or float
values = [float(value) if '.' in value else int(value) for value in values]
result = np.reshape(values,(30,5))
SEQ = result[0:6,3]
result = np.delete(result, (0,2,3), 1)
T1 = result[0:6,:]
T2 = result[6:12,:]
T4 = result[12:18,:]
T6 = result[18:24,:]
T12 = result[24:30,:]
plt.figure()
plt.plot(T1[:,0],SEQ,'+-')
plt.plot(T1[:,0],T1[:,1],'+-')
plt.plot(T2[:,0],T2[:,1],'+-')
plt.plot(T4[:,0],T4[:,1],'+-')
plt.plot(T6[:,0],T6[:,1],'+-')
plt.plot(T12[:,0],T12[:,1],'+-')
plt.legend(["Sequentiel","1 Thread","2 Threads","4 Threads","6 Threads","12 Threads"])
plt.xlabel("N")
plt.ylabel("t (s)")
plt.title("Réduction")
plt.show()
### Clause schedule
schedule = ['time_schedule_dynamic_1.txt',
'time_schedule_dynamic_4.txt',
'time_schedule_dynamic_12.txt',
'time_schedule_dynamic_100.txt',
'time_schedule_guided_1.txt',
'time_schedule_guided_4.txt',
'time_schedule_guided_12.txt',
'time_schedule_guided_100.txt',
'time_schedule_static_1.txt',
'time_schedule_static_4.txt',
'time_schedule_static_12.txt',
'time_schedule_static_100.txt']
fig = plt.figure()
cm = plt.get_cmap('gist_rainbow')
ax = fig.add_subplot(111)
ax.set_prop_cycle(color=[cm(1.*i/13) for i in range(13)])
for txt in schedule:
with open (txt, 'r') as timing:
text = timing.read()
# extract the values using regular expression
values = re.findall(r'\d+\.\d+|\d+', text)
# convert values to int or float
values = [float(value) if '.' in value else int(value) for value in values]
result = np.reshape(values,(5,5))
SEQ = result[:,3]
T = result[:,0]
Time = result[:,4]
plt.semilogy(T,Time,'+-')
schedule.append("SEQ")
plt.semilogy(T,SEQ,'+-')
plt.legend(schedule)
plt.xlabel("Threads max")
plt.ylabel("t (s)")
plt.title("Temps de traitement pour N = 1e5")
plt.show()
### Schedule + réduction
schedule = ["time_reduction_schedule_dynamic_100.txt",
"time_reduction_schedule_guided_100.txt",
"time_reduction_schedule_static_100.txt",
"time_reduction_schedule_static_1000.txt"]
lgd = ["SD100","SG100","SS100","SS1000","SEQ"]
fig = plt.figure()
cm = plt.get_cmap('gist_rainbow')
ax = fig.add_subplot(111)
ax.set_prop_cycle(color=[cm(1.*i/5) for i in range(5)])
for txt in schedule:
with open (txt, 'r') as timing:
text = timing.read()
# extract the values using regular expression
values = re.findall(r'\d+\.\d+|\d+', text)
# convert values to int or float
values = [float(value) if '.' in value else int(value) for value in values]
result = np.reshape(values,(5,5))
SEQ = result[:,3]
T = result[:,0]
Time = result[:,4]
plt.plot(T,Time,'+-')
plt.plot(T,SEQ,'+-')
plt.legend(lgd)
plt.xlabel("Threads max")
plt.ylabel("t (s)")
plt.title("Réduction + Schedule, N = 1e5")
plt.show()
### Atomic
atomic = [ "time_atomic_schedule_dynamic_100.txt",
"time_atomic_schedule_guided_100.txt",
"time_atomic_schedule_static_100.txt",
"time_critical_schedule_dynamic_100.txt",
"time_critical_schedule_guided_100.txt",
"time_critical_schedule_static_100.txt"]
lgd = ["AD100","AG100","AS100","CD100","CG100","CS100","SEQ"]
fig = plt.figure()
cm = plt.get_cmap('gist_rainbow')
ax = fig.add_subplot(111)
ax.set_prop_cycle(color=[cm(1.*i/7) for i in range(7)])
for txt in atomic:
with open (txt, 'r') as timing:
text = timing.read()
# extract the values using regular expression
values = re.findall(r'\d+\.\d+|\d+', text)
# convert values to int or float
values = [float(value) if '.' in value else int(value) for value in values]
result = np.reshape(values,(5,5))
SEQ = result[:,3]
T = result[:,0]
Time = result[:,4]
plt.plot(T,Time,'+-')
plt.plot(T,SEQ,'+-')
plt.legend(lgd)
plt.xlabel("Threads max")
plt.ylabel("t (s)")
plt.title("Atomic/Critical + Schedule, N = 1e5")
plt.show()

@ -0,0 +1,7 @@
# Script pour automatiser la recuperation de timing
```sudo chmod +x script.sh```
```./script.sh```
retrouver les résultats dans un fichier texte

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

@ -0,0 +1,9 @@
#!/bin/bash
for T in 1 2 4 6 12
do
for N in 10 100 1000 10000 100000 500000
do
./exo3 $N $T >> time_reduction.txt
done
done

@ -0,0 +1,10 @@
#!/bin/bash
rm exo3
make
for T in 1 2 4 6 12
do
for N in 100000
do
./exo3 $N $T >> time_reduction_schedule_static_1000.txt
done
done

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000108 seconds
OMP work took 0.001046 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000113 seconds
OMP work took 0.004943 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000112 seconds
OMP work took 0.006735 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.007110 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.009979 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000107 seconds
OMP work took 0.000993 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.005029 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.006990 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.007121 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.011034 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000107 seconds
OMP work took 0.000991 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.004122 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.006078 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.006983 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.010475 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000109 seconds
OMP work took 0.001329 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.003872 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.006425 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000107 seconds
OMP work took 0.008425 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000108 seconds
OMP work took 0.012499 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000110 seconds
OMP work took 0.001265 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.002476 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.005363 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.006367 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.010114 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000109 seconds
OMP work took 0.001290 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.002057 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.005708 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.006752 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000108 seconds
OMP work took 0.012068 seconds

@ -0,0 +1,151 @@
Nb thread max 1
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000000 seconds
Nb thread max 1
N 1000
Mean time on 10000 executions
Sequential work took 0.000001 seconds
OMP work took 0.000001 seconds
Nb thread max 1
N 10000
Mean time on 10000 executions
Sequential work took 0.000011 seconds
OMP work took 0.000010 seconds
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000100 seconds
Nb thread max 1
N 500000
Mean time on 10000 executions
Sequential work took 0.000509 seconds
OMP work took 0.000503 seconds
Nb thread max 2
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 1000
Mean time on 10000 executions
Sequential work took 0.000001 seconds
OMP work took 0.000001 seconds
Nb thread max 2
N 10000
Mean time on 10000 executions
Sequential work took 0.000010 seconds
OMP work took 0.000006 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000052 seconds
Nb thread max 2
N 500000
Mean time on 10000 executions
Sequential work took 0.000506 seconds
OMP work took 0.000255 seconds
Nb thread max 4
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 1000
Mean time on 10000 executions
Sequential work took 0.000001 seconds
OMP work took 0.000001 seconds
Nb thread max 4
N 10000
Mean time on 10000 executions
Sequential work took 0.000010 seconds
OMP work took 0.000003 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000027 seconds
Nb thread max 4
N 500000
Mean time on 10000 executions
Sequential work took 0.000505 seconds
OMP work took 0.000130 seconds
Nb thread max 6
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 1000
Mean time on 10000 executions
Sequential work took 0.000001 seconds
OMP work took 0.000001 seconds
Nb thread max 6
N 10000
Mean time on 10000 executions
Sequential work took 0.000010 seconds
OMP work took 0.000003 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.000018 seconds
Nb thread max 6
N 500000
Mean time on 10000 executions
Sequential work took 0.000518 seconds
OMP work took 0.000087 seconds
Nb thread max 12
N 10
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 100
Mean time on 10000 executions
Sequential work took 0.000000 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 1000
Mean time on 10000 executions
Sequential work took 0.000001 seconds
OMP work took 0.000002 seconds
Nb thread max 12
N 10000
Mean time on 10000 executions
Sequential work took 0.000010 seconds
OMP work took 0.000003 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000013 seconds
Nb thread max 12
N 500000
Mean time on 10000 executions
Sequential work took 0.000508 seconds
OMP work took 0.000053 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.000108 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000099 seconds
OMP work took 0.000059 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000042 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000033 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000045 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.000101 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000099 seconds
OMP work took 0.000050 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000099 seconds
OMP work took 0.000027 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000020 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000017 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000101 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.000050 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000098 seconds
OMP work took 0.000027 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000019 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.000013 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000106 seconds
OMP work took 0.000108 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000112 seconds
OMP work took 0.000053 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000027 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000018 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000099 seconds
OMP work took 0.000013 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.001006 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.003949 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.003373 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.003275 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.002237 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.000111 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000085 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.000052 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000042 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000099 seconds
OMP work took 0.000033 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000107 seconds
OMP work took 0.000193 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.000374 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.000317 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.000310 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000241 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000106 seconds
OMP work took 0.000336 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000107 seconds
OMP work took 0.001010 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000931 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.000853 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000631 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000101 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.000052 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000105 seconds
OMP work took 0.000030 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000022 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000022 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.000101 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000054 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.000027 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.000020 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000099 seconds
OMP work took 0.000016 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000105 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000109 seconds
OMP work took 0.000053 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000028 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000021 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000019 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000102 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000098 seconds
OMP work took 0.000052 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000099 seconds
OMP work took 0.000028 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000022 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000020 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000106 seconds
OMP work took 0.000103 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000051 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000027 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000103 seconds
OMP work took 0.000019 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000106 seconds
OMP work took 0.000022 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000102 seconds
OMP work took 0.000101 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000099 seconds
OMP work took 0.000051 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000026 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000018 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000011 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000104 seconds
OMP work took 0.000106 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000051 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000026 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000018 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000015 seconds

@ -0,0 +1,26 @@
Nb thread max 1
N 100000
Mean time on 10000 executions
Sequential work took 0.000107 seconds
OMP work took 0.000107 seconds
Nb thread max 2
N 100000
Mean time on 10000 executions
Sequential work took 0.000109 seconds
OMP work took 0.000052 seconds
Nb thread max 4
N 100000
Mean time on 10000 executions
Sequential work took 0.000100 seconds
OMP work took 0.000027 seconds
Nb thread max 6
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000020 seconds
Nb thread max 12
N 100000
Mean time on 10000 executions
Sequential work took 0.000101 seconds
OMP work took 0.000017 seconds
Loading…
Cancel
Save