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

Starting graphs generation

Problem reading pdf for now
parent 094726bd
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #1132 annulé
all: TEST1 TEST2 TEST3 TEST4 .PHONY: all
all: TEST1 TEST2 TEST3 TEST4 dot convert
TEST1=./tests/simple_test1.c TEST1=./tests/simple_test1.c
TEST2=./tests/simple_test2.c TEST2=./tests/simple_test2.c
...@@ -20,21 +21,26 @@ libplugin.so: $(PLUGIN) ...@@ -20,21 +21,26 @@ libplugin.so: $(PLUGIN)
$(CXX) $(PLUGIN_FLAGS) -o $@ $< $(CXX) $(PLUGIN_FLAGS) -o $@ $<
TEST1: libplugin.so $(TEST1) TEST1: libplugin.so $(TEST1)
$(MPICC) $(TEST1) $(CFLAGS) -o $@ -fplugin=./$< $(MAKE) -C tests TEST1
TEST2: libplugin.so $(TEST2) TEST2: libplugin.so $(TEST2)
$(MPICC) $(TEST2) $(CFLAGS) -o $@ -fplugin=./$< $(MAKE) -C tests TEST2
TEST3: libplugin.so $(TEST3) TEST3: libplugin.so $(TEST3)
$(MPICC) $(TEST3) $(CFLAGS) -o $@ -fplugin=./$< $(MAKE) -C tests TEST3
TEST4: libplugin.so $(TEST4) TEST4: libplugin.so $(TEST4)
$(MPICC) $(TEST4) $(CFLAGS) -o $@ -fplugin=./$< $(MAKE) -C tests TEST4
%.pdf: %.dot .PHONY: dot
dot -Tpdf $< -o $@ dot:
$(MAKE) -C tests dot
.PHONY: convert
convert:
$(MAKE) -C graphs convert
.PHONY: clean
clean: clean:
rm -rf *.pgr *.pdf plugin rm -rf *.pgr *.pdf plugin
rm -rf libplugin.so *.dot plugin rm -rf libplugin.so *.dot plugin
rm -rf TEST* rm -rf TEST*
$(MAKE) -C tests clean
$(MAKE) -C graphs clean
clean_all: clean
rm -rf libplugin.so *.dot plugin
...@@ -25,13 +25,6 @@ void cfgviz_internal_dump( function * fun, FILE * out, int td ) ...@@ -25,13 +25,6 @@ void cfgviz_internal_dump( function * fun, FILE * out, int td )
fprintf(out, "Digraph G{\n"); fprintf(out, "Digraph G{\n");
/******************************/
/**** TD2 - QUESTION 7 ****/
/******************************/
FOR_ALL_BB_FN(bb,cfun) FOR_ALL_BB_FN(bb,cfun)
{ {
...@@ -80,10 +73,6 @@ void cfgviz_internal_dump( function * fun, FILE * out, int td ) ...@@ -80,10 +73,6 @@ void cfgviz_internal_dump( function * fun, FILE * out, int td )
} }
} }
/******************************/
/** TD2 - FIN QUESTION 7 **/
/******************************/
// Close the main graph // Close the main graph
fprintf(out, "}\n"); fprintf(out, "}\n");
......
convert:
./converter.bash
clean:
rm -rf *.dot
rm -rf *.pdf
#! /usr/bin/env bash
for file in *.dot
do
dot -Tpdf $file -o "$file".pdf
done
...@@ -97,12 +97,17 @@ class split_count_pass : public gimple_opt_pass ...@@ -97,12 +97,17 @@ class split_count_pass : public gimple_opt_pass
printf("=> plugin: split_count_pass... \n"); printf("=> plugin: split_count_pass... \n");
printf("=> plugin: execute...\n"); printf("=> plugin: execute...\n");
printf("... in function %s\n\n", function_name(fun)); printf("... in function %s\n\n", function_name(fun));
//counter in bb aux //counter in bb aux
mark_number_of_calls(fun); mark_number_of_calls(fun);
//split bb where we find several MPI calls //split bb where we find several MPI calls
split_mpi_block(fun); split_mpi_block(fun);
//writing corresponding MPI Call in corresponding basic block //writing corresponding MPI Call in corresponding basic block
write_mpi_code(fun); write_mpi_code(fun);
/* Skip system header functions */
if ( !in_system_header_at( fun->function_start_locus ) )
cfgviz_dump( fun, function_name(fun), 1 ) ;
return 0; return 0;
} }
}; };
......
all: TEST1 TEST2 TEST3 TEST4
TEST1=simple_test1.c
TEST2=simple_test2.c
TEST3=split_bloc.c
TEST4=pragma_test.c
PLUGIN=plugin.cpp
CXX=g++_810
CC=gcc_810
MPICC=mpicc
CFLAGS=-g -O3
TEST1: ../libplugin.so $(TEST1)
$(MPICC) $(TEST1) $(CFLAGS) -o $@ -fplugin=$<
TEST2: ../libplugin.so $(TEST2)
$(MPICC) $(TEST2) $(CFLAGS) -o $@ -fplugin=$<
TEST3: ../libplugin.so $(TEST3)
$(MPICC) $(TEST3) $(CFLAGS) -o $@ -fplugin=$<
TEST4: ../libplugin.so $(TEST4)
$(MPICC) $(TEST4) $(CFLAGS) -o $@ -fplugin=$<
dot:
mv *.dot ../graphs/
clean:
rm -rf *.pgr *.pdf plugin
rm -rf libplugin.so *.dot plugin
rm -rf TEST*
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter