Пример #1
0
int main(int argc, char **argv){
    multibsp_tree_node_t  tree_root = NULL;
    int i;


    tree_root = multibsp_discover_new();

    mcbsp_set_affinity_mode( MANUAL_AFFINITY ); // go MANUAL affinity

    printf("\nMBSPDiscover Benchmark\n");
    //printf("G   \t\tLEVEL\tP  \tR(Mflop/s)\tL \n");
    for (tnode=tree_root; tnode->length != 0; tnode = tnode->sons[0]) {
      printf("\n***************** LEVEL %d *******************\n", tnode->level);
      bsp_init(bspbench, argc, argv);
      bspbench();
    }

    /*
    for (tnode=tree_root; tnode->length > 0; ) {
      for (i =0; i< tnode->length; i++) {
        tnode = tnode->sons[i];
        printf("***************** LEVEL %d *******************\n", tnode->level);
        bsp_init(bspbench, argc, argv);
        bspbench();
      }
    }
    */

    printf("\n");
    exit(0);
} /* end main */
Пример #2
0
/* Compute time of one h-relation */
if (s==0){
t[h]= (time*r)/NITERS;
printf("Time of %5d-relation= %lf sec= %8.0lf flops\n",
h, time/NITERS, t[h]); fflush(stdout);
}
}
if (s==0){
printf("size of double = %d bytes\n",(int)SZDBL);
leastsquares(0,p,t,&g0,&l0);
printf("Range h=0 to p : g= %.1lf, l= %.1lf\n",g0,l0);
leastsquares(p,MAXH,t,&g,&l);
printf("Range h=p to HMAX: g= %.1lf, l= %.1lf\n",g,l);
printf("The bottom line for this BSP computer is:\n");
printf("p= %d, r= %.3lf Mflop/s, g= %.1lf, l= %.1lf\n",
p,r/MEGA,g,l);
fflush(stdout);
}
bsp_pop_reg(dest); vecfreed(dest);
bsp_pop_reg(Time); vecfreed(Time);
bsp_end();
} /* end bspbench */
int main(int argc, char **argv){
bsp_init(bspbench, argc, argv);
printf("How many processors do you want to use?\n");
fflush(stdout);
scanf("%d",&P);
if (P > bsp_nprocs()){
printf("Sorry, not enough processors available.\n");
exit(1);
}
bspbench();
exit(0);
} /* end main */