diff --git a/EXAMPLE/InterfaceTest.cpp b/EXAMPLE/InterfaceTest.cpp index 681ee3f..ce490fd 100755 --- a/EXAMPLE/InterfaceTest.cpp +++ b/EXAMPLE/InterfaceTest.cpp @@ -98,7 +98,7 @@ inline double Laplace_kernel(double *x, double *y, int d, double h) { // return 0; // }else{ return exp(-sqrt(dists)/(h)); - // } + // } } @@ -151,16 +151,16 @@ inline double GreenFun(int m, double w, double v0, double tau) } inline double GreenFun_kernel(double *x, double *y, int d, double w) -{ +{ double dists = dist2(x, y, d); int self = sqrt(dists)<1e-20? 1:0; if(self==1){ return 100.0; }else{ - double s0 = 2.0; - double tau = sqrt(pow(s0,2)* dists); + double s0 = 2.0; + double tau = sqrt(pow(s0,2)* dists); double D1 = s0/(2.0*pi); - return GreenFun(d, w, D1, tau); + return GreenFun(d, w, D1, tau); } } @@ -246,7 +246,7 @@ class C_QuantApp { *val = Laplace_kernel(&_data[m * _d], &_data[n * _d], _d, _h); if (m==n) *val += _l; - break; + break; case 9: //Laplacian kernel with low-rank update *val = Laplace_kernel(&_data[m * _d], &_data[n * _d], _d, _h); if (m==n) @@ -707,7 +707,7 @@ if(tst==1){ for(int ii=0;iioption=&option; d_c_bpack_createptree(&size, groups, &Fcomm, &ptree1); - d_c_bpack_copyoption(&option,&option1); + d_c_bpack_copyoption(&option_save,&option1); + d_c_bpack_printoption(&option1,&ptree); d_c_bpack_createstats(&stats1); // d_c_bpack_set_I_option(&option1, "nogeo", 1); // no geometrical information @@ -936,7 +945,7 @@ if(tst==4){ quant_ptr1->option=&option; d_c_bpack_createptree(&size, groups, &Fcomm, &ptree1); - d_c_bpack_copyoption(&option,&option1); + d_c_bpack_copyoption(&option_save,&option1); d_c_bpack_createstats(&stats1); d_c_bpack_set_I_option(&option1, "nogeo", 1); // no geometrical information @@ -997,7 +1006,7 @@ if(tst==3){ quant_ptr2->option=&option; d_c_bpack_createptree(&size, groups, &Fcomm, &ptree2); - d_c_bpack_copyoption(&option,&option2); + d_c_bpack_copyoption(&option_save,&option2); d_c_bpack_createstats(&stats2); d_c_bpack_set_I_option(&option2, "nogeo", 1); // no geometrical information @@ -1033,7 +1042,7 @@ if(tst==3){ quant_ptr2->_n=Npo; d_c_bpack_createptree(&size, groups, &Fcomm, &ptree2); - d_c_bpack_copyoption(&option,&option2); + d_c_bpack_copyoption(&option_save,&option2); d_c_bpack_createstats(&stats2); d_c_bpack_set_I_option(&option2, "nogeo", 1); // no geometrical information diff --git a/example_scripts/runit_cpp.sh b/example_scripts/runit_cpp.sh index bbcb349..70f1452 100755 --- a/example_scripts/runit_cpp.sh +++ b/example_scripts/runit_cpp.sh @@ -24,7 +24,7 @@ export LD_LIBRARY_PATH=/global/cfs/cdirs/m2957/liuyangz/my_software/scalapack-2. THREADS_PER_RANK=`expr 2 \* $OMP_NUM_THREADS` -for nmpi in 32 +for nmpi in 64 do # ######## Liza's datset MNIST 10K # tst=1 @@ -105,19 +105,21 @@ do ######## Gaussian cloud tst=2 -N=16384 +# N=16384 Ndim=3 ker=9 # Wajih's paper: ker=8: Laplacian ker=9: Laplacian with low-rank update ker=10: Wave equation kernel knn=0 # h=0.2 lambda=10. -Nmin=256 +Nmin=128 #tol=1e-4 # com_opt=4 checkerr=0 # batch=32 # blknum=1 - +for N in 16384 32768 65536 131072 262144 +# for N in 16384 +do for com_opt in 6 do # checkerr=0 @@ -134,13 +136,14 @@ do for checkerr in 0 do # mpirun -n 1 $EXEC $tst $N $Ndim $ker $h $lambda $Nmin $tol $com_opt $checkerr $batch | tee -a cloud_kernel.out -srun -n $nmpi -c 2 --cpu_bind=cores $EXEC --tst $tst --N $N --Ndim $Ndim --ker $ker --h $h --lambda $lambda --nmin_leaf $Nmin --tol_comp $tol --format 2 --near_para 2.01 --rankrate 2.0 --reclr_leaf $com_opt --errfillfull $checkerr --baca_batch $batch --LR_BLK_NUM $blknum --knn $knn --verbosity 1 | tee cloud_kernel_N_${N}_ker_${ker}_h_${h}_l_${lambda}_cherr_${checkerr}_bnum_${blknum}_comp_${com_opt}_tol_${tol}_mpi_${nmpi}_bsize_${batch} +srun -n $nmpi -c 2 --cpu_bind=cores $EXEC --tst $tst --N $N --Ndim $Ndim --ker $ker --h $h --lambda $lambda --nmin_leaf $Nmin --tol_comp $tol --format 2 --near_para 2.01 --rankrate 2.0 --reclr_leaf $com_opt --errfillfull $checkerr --baca_batch $batch --LR_BLK_NUM $blknum --knn $knn --verbosity 1 | tee cloud_kernel_N_${N}_ker_${ker}_h_${h}_l_${lambda}_cherr_${checkerr}_bnum_${blknum}_comp_${com_opt}_tol_${tol}_mpi_${nmpi}_bsize_${batch}_Nmin_${Nmin}_nonHsketcher done done done done done done +done