Skip to content
Snippets Groups Projects
Commit 80d1e8b6 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Added script to plot tasks as a function of wallclock time.

parent 0fe84c7a
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ plot(id, errx_new , 'b.')
text(id[-1], 0.18, "B-H: $%5.3f\\pm%5.3f$\n QuickShed: $%5.3f\\pm%5.3f$"%(meanx_bh, stdx_bh, meanx_new, stdx_new), backgroundcolor="w", va="top", ha="right" )
ylim(-0.02, 0.02)
ylim(-2, 2)
xlim(0,id[-1])
grid()
......
......@@ -38,7 +38,7 @@
/* Some local constants. */
#define cell_pool_grow 1000
#define cell_maxparts 128
#define task_limit 1e8
#define task_limit 1e7
#define const_G 1 // 6.6738e-8
#define dist_min 0.5 /* Used for legacy walk only */
#define dist_cutoff_ratio 1.5
......@@ -1498,9 +1498,12 @@ void test_bh(int N, int nr_threads, int runs, char *fileName) {
#endif
/* Dump the tasks. */
/* for ( k = 0 ; k < s.count ; k++ ) */
/* printf( " %i %i %lli %lli\n" , s.tasks[k].type , s.tasks[k].qid , */
/* s.tasks[k].tic , s.tasks[k].toc ); */
FILE* taskFile = fopen("output_bh_new.out", "w");
for ( k = 0 ; k < s.count ; k++ )
fprintf(taskFile, " %i %i %lli %lli\n" , s.tasks[k].type , s.tasks[k].qid ,
s.tasks[k].tic , s.tasks[k].toc );
fclose(taskFile);
/* Dump the costs. */
message("costs: setup=%lli ticks, run=%lli ticks.", tot_setup,
......
......@@ -38,7 +38,7 @@
/* Some local constants. */
#define cell_pool_grow 1000
#define cell_maxparts 128
#define task_limit 1
#define task_limit 1e8
#define const_G 1 // 6.6738e-8
#define dist_min 0.5 /* Used for legacy walk only */
#define dist_cutoff_ratio 1.5
......@@ -1268,7 +1268,7 @@ void test_bh(int N, int nr_threads, int runs, char *fileName) {
parts[k].x[0] = ((double)rand()) / RAND_MAX;
parts[k].x[1] = ((double)rand()) / RAND_MAX;
parts[k].x[2] = ((double)rand()) / RAND_MAX;
parts[k].mass = ((double)rand()) / RAND_MAX;
parts[k].mass = 1.;//((double)rand()) / RAND_MAX;
parts[k].a_legacy[0] = 0.0;
parts[k].a_legacy[1] = 0.0;
parts[k].a_legacy[2] = 0.0;
......@@ -1338,7 +1338,7 @@ void test_bh(int N, int nr_threads, int runs, char *fileName) {
}
message("Average number of parts per leaf is %f.", ((double)N) / nr_leaves);
#if ICHECK > 0
#if 0 //ICHECK > 0
printf("----------------------------------------------------------\n");
/* Do a N^2 interactions calculation */
......@@ -1431,6 +1431,7 @@ void test_bh(int N, int nr_threads, int runs, char *fileName) {
tic = getticks();
qsched_run(&s, nr_threads, runner);
#ifndef DOWN_AS_TASK
// message("comp down");
comp_down(root);
#endif
toc_run = getticks();
......@@ -1484,9 +1485,11 @@ void test_bh(int N, int nr_threads, int runs, char *fileName) {
#endif
/* Dump the tasks. */
/* for ( k = 0 ; k < s.count ; k++ )
printf( " %i %i %lli %lli\n" , s.tasks[k].type , s.tasks[k].qid ,
s.tasks[k].tic , s.tasks[k].toc ); */
FILE* taskFile = fopen("output_fmm.out", "w");
for ( k = 0 ; k < s.count ; k++ )
fprintf( taskFile, " %i %i %lli %lli\n" , s.tasks[k].type , s.tasks[k].qid ,
s.tasks[k].tic , s.tasks[k].toc );
fclose(taskFile);
/* Dump the costs. */
message("costs: setup=%lli ticks, run=%lli ticks.", tot_setup,
......@@ -1531,7 +1534,7 @@ int main(int argc, char *argv[]) {
char fileName[100] = {0};
/* Die on FP-exceptions. */
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
//feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
/* Get the number of threads. */
#pragma omp parallel shared(nr_threads)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment