diff --git a/TPs/TP4/CODE/Partie1/Makefile b/TPs/TP4/CODE/Partie1/Makefile index 825a917059b3230f445b055802383eeed569602c..55800e947455deb569f61d3fd89029b276e93c4f 100755 --- a/TPs/TP4/CODE/Partie1/Makefile +++ b/TPs/TP4/CODE/Partie1/Makefile @@ -17,10 +17,10 @@ openmp_%.pgr: openmp_%.cu mpi: mpi_cuda_addvector.pgr mpi_%.pgr: mpi_%.cu - $(CC) $< -o $@ $(MPILIB) $(MPIINC) - - + $(CC) $< -o $@ $(MPILIB) $(MPIINC) #-ccbin "/usr/bin/mpic++" clean: rm -rf *.pgr + + diff --git a/TPs/TP4/CODE/Partie1/mpi_cuda_addvector.cu b/TPs/TP4/CODE/Partie1/mpi_cuda_addvector.cu index 1f1dbfccd7b898dfa85909bb5c425168e96d099c..cf6b02f69c372ddc2350cdb8a00ca222839fbbdd 100755 --- a/TPs/TP4/CODE/Partie1/mpi_cuda_addvector.cu +++ b/TPs/TP4/CODE/Partie1/mpi_cuda_addvector.cu @@ -6,9 +6,6 @@ #define TSIZE 1024 - - - __global__ void addVector(int * tab_a, int * tab_b, int * tab_c) { int index; diff --git a/TPs/TP4/CODE/Partie1/openmp_cuda_addvector.cu b/TPs/TP4/CODE/Partie1/openmp_cuda_addvector.cu index 332777d23f06bfa634461ee3a667a27b6b8b777e..6beecb771439a2b0d2011436b0e0ab8a13e82eea 100755 --- a/TPs/TP4/CODE/Partie1/openmp_cuda_addvector.cu +++ b/TPs/TP4/CODE/Partie1/openmp_cuda_addvector.cu @@ -53,7 +53,7 @@ int main(int argc, char*argv[]) #pragma omp parallel { - size=omp_get_thread_num(); + size=omp_get_num_threads(); } tab_a = (int *)malloc(sizeof(int)*TSIZE*size);