diff --git a/examples/plot.py b/examples/plot.py index 008ed265b729d54cbebf839bf85132e998177a10..c2cf93564d0fd4e5d6c577424eb8f4158ee7092c 100644 --- a/examples/plot.py +++ b/examples/plot.py @@ -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() diff --git a/examples/test_bh_new.c b/examples/test_bh_new.c index 7bce23e0f91bc119d6565e925e2f9e87ec9de5a4..8748fe161efaadaba891446049d1faf2d01098df 100644 --- a/examples/test_bh_new.c +++ b/examples/test_bh_new.c @@ -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, diff --git a/examples/test_fmm.c b/examples/test_fmm.c index 9c5b4608fe6684cf344d799d3a44e75c41675bad..af3df1d64e100211c6f55910e93175819f34e59f 100644 --- a/examples/test_fmm.c +++ b/examples/test_fmm.c @@ -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)