The succint closure on hypergraphs, with multi-threading on CUDA and openMP
Calcolo della chiusura transitiva succinta dato un ipergrafo H, in maniera parallela ove se ne disponga le risorse.
- Parallelismo CPU: per ogni vertice del ipergrafo si invoca BFS; a seguire li merge dei vettori ottenuti dalla BFS.
- Parallelismo GPU: la BFS per trovare tutti i nipoti del nodo.
Calculation of the succinct transitive closure given a hypergraph H, in a parallel way where there is the Hardware.
- CPU parallelism: BFS is invoked for each vertex of the hypergraph; then it merge the vectors obtained from the BFS.
- GPU parallelism: find all the grandchildren of the node.
it needs the NVIDIA toolkit to compile, and an NVIDIA graphics card to run.
Copy all file in a folder, if you are using a windows PC run compiler.bat to compile various combinations of executables, otherwise from the console run the commands as follows.
\nvcc .\generator.cpp -o generator.exe
nvcc -rdc=true -lineinfo -std=c++17 -Xcompiler -openmp .\progetto.cu -o progetto.exe
Flags:
-D HIDE : hide the output of graph#
-D DEBUG : show information on runtime
-D FILE_OUT : export graph to file
-D MAX_THREADS : max cuda threads
-D MAX_BLOCKS_A : max cuda blocks BFS
-D MAX_BLOCKS_AI : max cuda blocks BFS inside
-D MAX_BLOCKS_B : max cuda blocks succintion
-D NTHR : number of cpu threads
-D TIME : enable time control
-D NO_INPUT : remove enter click
-D NTAB : hide the succinted graph outupt
-D NO_DOUBLE : to use only external parallelization BFS CUDA
-D DYNAMIC : Automatic blocks number (Experimental)
-D CPU : custom BFS runs only on CPU, the other parts run on GPU yet
At begin generate the hypergraphs with generator and then lunch progetto
generator.exe -v <number of vertices> -e <number of edges> -s <number of supersets>
progetto.exe "grafo.txt"