Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
M
MPI-compil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de conteneur
Registre de modèles
Opération
Environnements
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Théotime DONNENFELD
MPI-compil
Validations
aba047ca
Valider
aba047ca
rédigé
6 years ago
par
Thomas DILASSER
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
functional detector
parent
d1b54191
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline
#1160
en échec
6 years ago
Étape : build
Étape : test
Modifications
3
Pipelines
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
functions/frontier.c
+97
-18
97 ajouts, 18 suppressions
functions/frontier.c
functions/frontier.h
+2
-0
2 ajouts, 0 suppression
functions/frontier.h
plugin.cpp
+6
-5
6 ajouts, 5 suppressions
plugin.cpp
avec
105 ajouts
et
23 suppressions
functions/frontier.c
+
97
−
18
Voir le fichier @
aba047ca
...
...
@@ -226,25 +226,104 @@ void bitmap_mpi_iterated_pdf_union(function * fun)
}
}
//bitmap_set_pdf_intersect(ipdf_set, pfrontiers, &mpi_ipdf, fun);
bitmap_print
(
stdout
,
&
ipdf_set
,
"iterated PDF: "
,
"
\n\n
"
)
;
bitmap_and
_into
(
&
ipdf_set
,
&
mpi
_set
);
bitmap_print
(
stdout
,
&
ipdf
_set
,
"MPI iterated PDF: "
,
"
\n\n
"
)
;
bitmap_and
(
&
mpi_ipdf
,
&
mpi_set
,
&
ipdf
_set
);
bitmap_print
(
stdout
,
&
mpi_
ipdf
,
"MPI iterated PDF: "
,
"
\n\n
"
)
;
bitmap_print
(
stdout
,
&
mpi_set
,
"MPI set: "
,
"
\n\n
"
)
;
bitmap_head
test
;
bitmap_initialize
(
&
test
,
&
bitmap_default_obstack
);
if
(
bitmap_intersect_p
(
&
ipdf_set
,
&
mpi_set
)){
printf
(
"! WARNING !
\n
"
);
}
else
{
printf
(
"No potential deadlock detected
\n
"
);
}
free_dominance_info
(
fun
,
CDI_POST_DOMINATORS
);
}
void
detect_potential_deadlock
(
function
*
fun
)
{
printf
(
"
\n
------------------
\n
"
);
printf
(
"---MPI Analysis---
\n
"
);
printf
(
"------------------
\n\n
"
);
//init
calculate_dominance_info
(
CDI_POST_DOMINATORS
);
bitmap_head
*
pfrontiers
;
basic_block
bb
;
pfrontiers
=
XNEWVEC
(
bitmap_head
,
last_basic_block_for_fn
(
fun
));
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
bitmap_initialize
(
&
pfrontiers
[
bb
->
index
],
&
bitmap_default_obstack
);
}
bitmap_head
node_set
;
bitmap_initialize
(
&
node_set
,
&
bitmap_default_obstack
);
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
bitmap_set_bit
(
&
node_set
,
bb
->
index
)
;
}
bitmap_head
pdf_set
;
bitmap_initialize
(
&
pdf_set
,
&
bitmap_default_obstack
);
bitmap_post_dominance_frontiers
(
pfrontiers
,
fun
);
bitmap_set_pdf_union
(
node_set
,
pfrontiers
,
&
pdf_set
,
fun
);
bitmap_head
ipdf_set
;
bitmap_initialize
(
&
ipdf_set
,
&
bitmap_default_obstack
);
iterated_post_dominance
(
pdf_set
,
pfrontiers
,
&
ipdf_set
,
fun
);
bitmap_head
mpi_set
,
mpi_ipdf
;
bitmap_initialize
(
&
mpi_set
,
&
bitmap_default_obstack
);
bitmap_initialize
(
&
mpi_ipdf
,
&
bitmap_default_obstack
);
FOR_ALL_BB_FN
(
bb
,
cfun
)
{
if
(
bb
->
aux
!=
NULL
&&
*
((
int
*
)
bb
->
aux
)
>=
0
)
{
bitmap_set_bit
(
&
mpi_set
,
bb
->
index
)
;
}
}
bitmap_and
(
&
mpi_ipdf
,
&
mpi_set
,
&
ipdf_set
);
bitmap_head
test
;
bitmap_initialize
(
&
test
,
&
bitmap_default_obstack
);
if
(
bitmap_intersect_p
(
&
ipdf_set
,
&
mpi_set
)){
printf
(
"! WARNING !
\n
"
);
bitmap_print
(
stdout
,
&
ipdf_set
,
"Potential problems blocks : "
,
"
\n\n
"
)
;
}
else
{
printf
(
"No potential deadlock detected
\n
"
);
}
issue_warnings
(
ipdf_set
,
fun
);
free_dominance_info
(
fun
,
CDI_POST_DOMINATORS
);
}
//void bitmap_set_pdf_intersect(bitmap_head node_set, bitmap_head *pdf, bitmap_head * pdf_set, function * fun)
//{
// basic_block bb;
//
// /* Create the union of each PDF */
// FOR_ALL_BB_FN( bb, fun )
// {
// if ( bitmap_bit_p( &node_set, bb->index ) && bb->aux !=NULL && *((int *)bb->aux)>=0)
// {
// bitmap_ior_into( pdf_set, &node_set ) ;
// }
// }
//
//
//}
void
issue_warnings
(
bitmap_head
ipdf_set
,
function
*
fun
)
{
basic_block
bb
;
gimple_stmt_iterator
gsi
;
gimple
*
stmt
;
printf
(
"
\n
----------- WHICH LINES ---------
\n\n
"
);
FOR_EACH_BB_FN
(
bb
,
fun
)
{
if
(
bitmap_bit_p
(
&
ipdf_set
,
bb
->
index
))
{
gsi
=
gsi_start_bb
(
bb
);
stmt
=
gsi_stmt
(
gsi
);
printf
(
"/!
\\
/!
\\
/!
\\
Basic Block %d (line %d) might cause an issue
\n
"
,
bb
->
index
,
gimple_lineno
(
stmt
));
}
}
printf
(
"
\n
"
);
}
Ce diff est replié.
Cliquez pour l'agrandir.
functions/frontier.h
+
2
−
0
Voir le fichier @
aba047ca
...
...
@@ -8,4 +8,6 @@ void iterated_post_dominance(bitmap_head pdf_node_set, bitmap_head *pdf, bitmap_
void
bitmap_iterated_pdf_union
(
function
*
fun
);
void
bitmap_mpi_iterated_pdf_union
(
function
*
fun
);
void
bitmap_set_pdf_intersect
(
bitmap_head
node_set
,
bitmap_head
*
pdf
,
bitmap_head
*
pdf_set
,
function
*
fun
);
void
detect_potential_deadlock
(
function
*
fun
);
void
issue_warnings
(
bitmap_head
ipdf_set
,
function
*
fun
);
#endif
Ce diff est replié.
Cliquez pour l'agrandir.
plugin.cpp
+
6
−
5
Voir le fichier @
aba047ca
...
...
@@ -109,17 +109,18 @@ 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
);
//
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
);
//bitmap_pdf(fun);
//bitmap_pdf_union(fun);
//bitmap_iterated_pdf_union(fun);
//bitmap_mpi_iterated_pdf_union(fun);
detect_potential_deadlock
(
fun
);
return
0
;
}
};
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter