Commit 49cbc43e authored by Priyal Suneja's avatar Priyal Suneja
Browse files

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

parent 7f37cb49
......@@ -215,6 +215,10 @@ int main(int argc, char* argv[]) {
gargc = argc;
gargv = argv;
measure_msr("sssp_out", &sssp_measure);
......
This diff is collapsed.
CFLAGS = -Drestrict=__restrict__ -O3 -DGRAPH_GENERATOR_MPI -DREUSE_CSR_FOR_VALIDATION -DPROCS_PER_NODE_NOT_POWER_OF_TWO -I../aml
LDFLAGS = -lpthread
MPICC = mpicc
BUILD=../build
all: graph500_reference_bfs_sssp graph500_reference_bfs
#graph500_custom_bfs graph500_custom_bfs_sssp
......@@ -10,10 +11,10 @@ SOURCES = main.c utils.c validate.c ../aml/aml.c ../../includes/msr.c
HEADERS = common.h csr_reference.h bitmap_reference.h ../../includes/msr.h
graph500_reference_bfs_sssp: bfs_reference.c $(SOURCES) $(HEADERS) $(GENERATOR_SOURCES) csr_reference.c sssp_reference.c
$(MPICC) $(CFLAGS) -DSSSP $(LDFLAGS) -o graph500_reference_bfs_sssp bfs_reference.c sssp_reference.c csr_reference.c $(SOURCES) $(GENERATOR_SOURCES) -lm
$(MPICC) $(CFLAGS) -DSSSP $(LDFLAGS) -o $(BUILD)/err_sssp bfs_reference.c sssp_reference.c csr_reference.c $(SOURCES) $(GENERATOR_SOURCES) -lm
graph500_reference_bfs: bfs_reference.c $(SOURCES) $(HEADERS) $(GENERATOR_SOURCES) csr_reference.c
$(MPICC) $(CFLAGS) $(LDFLAGS) -o graph500_reference_bfs bfs_reference.c csr_reference.c $(SOURCES) $(GENERATOR_SOURCES) -lm
$(MPICC) $(CFLAGS) $(LDFLAGS) -o $(BUILD)/err_bfs bfs_reference.c csr_reference.c $(SOURCES) $(GENERATOR_SOURCES) -lm
graph500_custom_bfs: bfs_custom.c $(SOURCES) $(HEADERS) $(GENERATOR_SOURCES) csr_reference.c
$(MPICC) $(CFLAGS) $(LDFLAGS) -o graph500_custom_bfs bfs_custom.c csr_reference.c $(SOURCES) $(GENERATOR_SOURCES) -lm
......
......@@ -21,7 +21,6 @@
#include "../generator/utils.h"
#include "aml.h"
#include "common.h"
#include "../../includes/msr.h"
#include <math.h>
#include <assert.h>
#include <string.h>
......@@ -31,6 +30,10 @@
#include <limits.h>
#include <stdint.h>
#include <inttypes.h>
#include <../../includes/msr.h>
int gargc;
char **gargv;
int isisolated(int64_t v);
static int compare_doubles(const void* a, const void* b) {
......@@ -68,21 +71,23 @@ void get_statistics(const double x[], int n, volatile double r[s_LAST]) {
free(xx);
}
int main(int argc, char** argv) {
aml_init(&argc,&argv); //includes MPI_Init inside
// int oop(int argc, char**argv) {
void oop() {
aml_init(&gargc,&gargv); //includes MPI_Init inside
setup_globals();
int cpu_info[3];
double energy_units[2];
get_cpu_info(CPU_HASWELL_EP, cpu_info, energy_units);
// int cpu_info[3];
// double energy_units[2];
// get_cpu_info(CPU_HASWELL_EP, cpu_info, energy_units);
/* Parse arguments. */
int SCALE = 16;
int edgefactor = 16; /* nedges / nvertices, i.e., 2*avg. degree */
if (argc >= 2) SCALE = atoi(argv[1]);
if (argc >= 3) edgefactor = atoi(argv[2]);
if (argc <= 1 || argc >= 4 || SCALE == 0 || edgefactor == 0) {
if (gargc >= 2) SCALE = atoi(gargv[1]);
if (gargc >= 3) edgefactor = atoi(gargv[2]);
if (gargc <= 1 || gargc >= 4 || SCALE == 0 || edgefactor == 0) {
if (rank == 0) {
fprintf(stdout, "Usage: %s SCALE edgefactor\n SCALE = log_2(# vertices) [integer, required]\n edgefactor = (# edges) / (# vertices) = .5 * (average vertex degree) [integer, defaults to 16]\n(Random number seed and Kronecker initiator are in main.c)\n", argv[0]);
fprintf(stdout, "Usage: %s SCALE edgefactor\n SCALE = log_2(# vertices) [integer, required]\n edgefactor = (# edges) / (# vertices) = .5 * (average vertex degree) [integer, defaults to 16]\n(Random number seed and Kronecker initiator are in main.c)\n",
gargv[0]);
}
MPI_Abort(MPI_COMM_WORLD, 1);
}
......@@ -163,12 +168,12 @@ int main(int argc, char** argv) {
}
int fd = open_msr(0);
long long result;
double package_before, package_after;
result = read_msr(fd, MSR_PKG_ENERGY_STATUS);
package_before = (double) result*energy_units[0];
close(fd);
// int fd = open_msr(0);
// long long result;
// double package_before, package_after;
// result = read_msr(fd, MSR_PKG_ENERGY_STATUS);
// package_before = (double) result*energy_units[0];
// close(fd);
/* Make the raw graph edges. */
/* Get roots for BFS runs, plus maximum vertex with non-zero degree (used by
......@@ -474,11 +479,11 @@ int main(int argc, char** argv) {
#endif
fd = open_msr(0);
result = read_msr(fd, MSR_PKG_ENERGY_STATUS);
package_after = (double)result*energy_units[0];
fprintf(stderr, "********* graph500 *********\n");
fprintf(stderr,"energy consumed: %fJ\n", package_after - package_before);
// fd = open_msr(0);
// result = read_msr(fd, MSR_PKG_ENERGY_STATUS);
// package_after = (double)result*energy_units[0];
// fprintf(stderr, "********* graph500 *********\n");
// fprintf(stderr,"energy consumed: %fJ\n", package_after - package_before);
MPI_Free_mem(pred);
#ifdef SSSP
MPI_Free_mem(shortest);
......@@ -606,4 +611,15 @@ int main(int argc, char** argv) {
cleanup_globals();
aml_finalize(); //includes MPI_Finalize()
return 0;
}
int main(int argc, char** argv) {
gargc = argc;
gargv = argv;
measure_msr("lol", &oop);
// oop();
// oop(argc, argv);
}
......@@ -3,6 +3,7 @@ file="/homes/sys/suneja/treehouse/single-server-etrace/.data_labels"
gapbs_dir="/homes/sys/suneja/treehouse/single-server-etrace/benchmarks/gapbs/build"
signal_dir="/homes/sys/suneja/treehouse/single-server-etrace/benchmarks/tests/signal/build"
graph500_dir="/homes/sys/suneja/treehouse/single-server-etrace/benchmarks/graph500/build"
# graph500_dir="/homes/sys/suneja/graph500/build"
output_folder="./data"
rapl_folder="./data/rapl"
......@@ -17,24 +18,30 @@ do
cmd_starter+="-e ${var} "
done < $file
for entry in `ls $gapbs_dir`
do
$cmd_starter $gapbs_dir/$entry -g 20 -n 2 1> /dev/null 2> $output_folder/$entry
done
# for entry in `ls $gapbs_dir`
# do
# $cmd_starter $gapbs_dir/$entry -g 20 -n 2 1> /dev/null 2> $output_folder/$entry
# done
#
# for entry in `ls $signal_dir`
# do
# $cmd_starter $signal_dir/$entry 1> /dev/null 2> $output_folder/$entry
# done
for entry in `ls $signal_dir`
do
$cmd_starter $signal_dir/$entry 1> /dev/null 2> $output_folder/$entry
done
echo $cmd_starter
# for entry in `ls $graph500_dir`
# do
# $cmd_starter mpirun --allow-run-as-root --mca orte_base_help_aggregate 0 $graph500_dir/$entry 5 1> /dev/null 2> $output_folder/${entry}_5
for entry in `ls $graph500_dir`
do
echo $entry
$cmd_starter mpirun --allow-run-as-root --mca orte_base_help_aggregate 0 $graph500_dir/$entry 5 1> out 2> $output_folder/${entry}_5
# $cmd_starter mpirun --allow-run-as-root --mca orte_base_help_aggregate 0 $graph500_dir/$entry 7 1> /dev/null 2> $output_folder/${entry}_7
# $cmd_starter mpirun --allow-run-as-root --mca orte_base_help_aggregate 0 $graph500_dir/$entry 10 1> /dev/null 2> $output_folder/${entry}_10
# done
# $cmd_starter mpirun --allow-run-as-root --mca orte_base_help_aggregate 0 $graph500_dir/$entry 5 1> out 2> $output_folder/${entry}_5
# $cmd_starter mpirun --allow-run-as-root --mca orte_base_help_aggregate 0 $graph500_dir/$entry 7 1> out 2> $output_folder/${entry}_7
# $cmd_starter mpirun --allow-run-as-root --mca orte_base_help_aggregate 0 $graph500_dir/$entry 10 1> out 2> $output_folder/${entry}_10
done
mv *_out $rapl_folder
sed -i "s/J/ /g" $output_folder/*
sed -i "3,24d" $output_folder/err_*
# sed -i "3,24d" $output_folder/err_*
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment