Skip to content

Commit

Permalink
add save exf score file
Browse files Browse the repository at this point in the history
  • Loading branch information
Vella committed Jan 31, 2023
1 parent 22a44d2 commit 1e41bfe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dataset/run_cpu.sh
Expand Up @@ -5,7 +5,7 @@ graph=$1
#echo
#./expected_force_serial ${graph} 1 out.txt
echo "Run CPU"
for th in 8 16 32 64
for th in 64
do
echo =====================
echo `date`
Expand Down
4 changes: 2 additions & 2 deletions dataset/run_gpu.sh
Expand Up @@ -7,9 +7,9 @@ graph=$1
echo "Run GPU"
for b in 64 128 256 512
do
for th in 256 512 1024
for th in 512
do
for sc in 1 2 4
for sc in 1
do
echo =====================
echo `date`
Expand Down
12 changes: 11 additions & 1 deletion parallel/exp_force_main.cu
Expand Up @@ -38,6 +38,9 @@ struct graph_data_t {
size_t cluster_count;
} graph_summary;


using namespace std;

/**
* Kernel for generating all paths of length 2 in the graph and calculating the cluster sizes.
*/
Expand Down Expand Up @@ -560,8 +563,15 @@ int main(int argc, char* argv[]) { //takes a filename (es: fb_full) as input; pr
duration += time;

if (rep == 0) {
ofstream outfile;
outfile.open(filename+".score");

for (int i = 0; i < results.size(); i++){
outfile << std::to_string(i) << " " << std::to_string(results[i]) << endl;
}
outfile.close();
// for (size_t i = 0; i < results.size(); i++) {
std::cout << 10 << " " << results[10] << std::endl;
// std::cout << 10 << " " << results[10] << std::endl;
// }
}
std::cout << time << std::endl;
Expand Down

0 comments on commit 1e41bfe

Please sign in to comment.