Skip to content
Extraits de code Groupes Projets
Valider aba08052 rédigé par Thomas DILASSER's avatar Thomas DILASSER
Parcourir les fichiers

Some test cases

parent b3b9c673
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #1184 annulé
.PHONY: all
#all: TEST1 TEST2 TEST3 TEST4 dot convert
all: TEST3 dot convert
all: TEST3 TEST5 TEST6 dot convert
TEST1=./tests/simple_test1.c
TEST2=./tests/simple_test2.c
TEST3=./tests/split_bloc.c
TEST4=./tests/pragma_test.c
TEST5=./tests/if_test.c
TEST6=./tests/if_test2.c
PLUGIN=plugin.cpp
CXX=g++_810
......@@ -29,6 +31,10 @@ TEST3: libplugin.so $(TEST3)
$(MAKE) -C tests TEST3
TEST4: libplugin.so $(TEST4)
$(MAKE) -C tests TEST4
TEST5: libplugin.so $(TEST5)
$(MAKE) -C tests TEST5
TEST6: libplugin.so $(TEST6)
$(MAKE) -C tests TEST6
.PHONY: dot
dot:
......
......@@ -109,17 +109,11 @@ class split_count_pass : public gimple_opt_pass
//writing corresponding MPI Call in corresponding basic block
edit_all_aux_value(fun,(int*)NULL);
write_mpi_code(fun);
//print_bb_aux(fun);
/* Skip system header functions */
if ( !in_system_header_at( fun->function_start_locus ) )
cfgviz_dump( fun, function_name(fun), 1 ) ;
//edit_all_aux_value(fun,(int*)LAST_AND_UNUSED_MPI_COLLECTIVE_CODE);
//write_mpi_code(fun);
//bitmap_pdf(fun);
//bitmap_pdf_union(fun);
//bitmap_iterated_pdf_union(fun);
//bitmap_mpi_iterated_pdf_union(fun);
detect_potential_deadlock(fun);
return 0;
}
......
all: TEST1 TEST2 TEST3 TEST4
all: TEST1 TEST2 TEST3 TEST4 TEST5 TEST6
TEST1=simple_test1.c
TEST2=simple_test2.c
TEST3=split_bloc.c
TEST4=pragma_test.c
TEST5=if_test.c
TEST6=if_test2.c
PLUGIN=plugin.cpp
CXX=g++_810
......@@ -21,6 +23,10 @@ TEST3: ../libplugin.so $(TEST3)
$(MPICC) $(TEST3) $(CFLAGS) -o $@ -fplugin=$<
TEST4: ../libplugin.so $(TEST4)
$(MPICC) $(TEST4) $(CFLAGS) -o $@ -fplugin=$<
TEST5: ../libplugin.so $(TEST5)
$(MPICC) $(TEST5) $(CFLAGS) -o $@ -fplugin=$<
TEST6: ../libplugin.so $(TEST6)
$(MPICC) $(TEST6) $(CFLAGS) -o $@ -fplugin=$<
dot:
mv *.dot ../graphs/
......
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#pragma ProjetCA mpicoll_check mpi_call
void mpi_call(int c)
{
MPI_Barrier(MPI_COMM_WORLD);
if(c<10)
{
printf("je suis dans le if (c=%d)\n", c);
MPI_Barrier(MPI_COMM_WORLD);
}
else
{
printf("je suis dans le else (c=%d)\n", c);
MPI_Barrier(MPI_COMM_WORLD);
}
}
int main(int argc, char * argv[])
{
MPI_Init(&argc, &argv);
int i;
int a = 2;
int b = 3;
int c=0;
for(i=0; i<10; i++)
{
mpi_call(c);
c+= (a+b);
}
printf("c=%d\n", c);
MPI_Finalize();
return 1;
}
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#pragma ProjetCA mpicoll_check mpi_call
void mpi_call(int c)
{
MPI_Barrier(MPI_COMM_WORLD);
if(c<10)
{
printf("je suis dans le if (c=%d)\n", c);
MPI_Barrier(MPI_COMM_WORLD);
if (c > 5)
{
printf("je suis dans le if imbriqué (c=%d)\n", c);
MPI_Barrier(MPI_COMM_WORLD);
}
}
else
{
printf("je suis dans le else (c=%d)\n", c);
MPI_Barrier(MPI_COMM_WORLD);
}
}
int main(int argc, char * argv[])
{
MPI_Init(&argc, &argv);
int i;
int a = 2;
int b = 3;
int c=0;
for(i=0; i<10; i++)
{
mpi_call(c);
c+= (a+b);
}
printf("c=%d\n", c);
MPI_Finalize();
return 1;
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment