Commits

Enas Yunis committed 4035fd8

Setup On EY Machine: Accuracy at 10-6 in double

Comments (0)

Files changed (3)

 #LFLAGS += -DPAPI -lpapi
 
 ### QUARK flags
-LFLAGS	+= -DQUARK -lquark
+# LFLAGS	+= -DQUARK -lquark
 
 ### MassiveThreads flags
 #LFLAGS += -std=c++0x -DMTHREADS -lmyth -lpthread -ldl
 ifeq ($(DEVICE),GPU)
 ### CUDA flags
 LFLAGS  += -DQUEUE -L$(CUDA_INSTALL_PATH)/lib64 -lcuda -lcudart
+else
+### TODO: check might have to add for CUDA as well
+LFLAGS += -lstdc++ -ldl -lm
 endif
 
 OBJECT = ../kernel/$(DEVICE)$(EXPAND)Laplace.o ../kernel/$(DEVICE)VanDerWaals.o\
 #endif
 #endif
 
-const int  P        = 15;                                       //!< Order of expansions
+#if CPU
+const int  P        = 15;                                       //!< Order of expansions, 10 is enough in single precision
+# else // #elif GPU
+const int P         = 10;                                       //!< GPU Thread count limits the expansion to 10
+#endif 
 const int  NCRIT    = 64;                                       //!< Number of bodies per cell
 const int  MAXBODY  = 50000;                                    //!< Maximum number of bodies per GPU kernel
 const int  MAXCELL  = 10000000;                                 //!< Maximum number of bodies/coefs in cell per GPU kernel
 const real CLET     = 2;                                        //!< LET opening critetia
-const real EPS      = 1e-12;                                    //!< Single/double precision epsilon
+const real EPS      = 1e-12;                                    //!< Single/double precision epsilon 1e-6,1e-12 respectivly
 const real EPS2     = 0;                                        //!< Softening parameter (squared)
 const real R2MIN    = 0.0001;                                   //!< Minimum value for L-J R^2
 const real R2MAX    = 100.0;                                    //!< Maximum value for L-J R^2

wrapper/serial_coulombVdW.cxx

 extern "C" void FMMcalccoulomb_ij(int ni, double* xi, double* qi, double* fi,
   int nj, double* xj, double* qj, double, int tblno, double size, int periodicflag) {
   std::cout << "tblno: " << tblno << std::endl;
-  IMAGES = ((periodicflag & 0x1) == 0) ? 0 : 3;
+  IMAGES = ((periodicflag & 0x1) == 0) ? 0 : 5;
   THETA = .5;
   Bodies bodies(ni),jbodies(nj);
   Cells cells,jcells;
     break;
   }
 #endif
+  // This is the correction factor from FMM to MD Ewald.
   double fc[3];
   for( int d=0; d!=3; ++d ) fc[d]=0;
   for( int i=0; i!=ni; ++i ) { 
     for( int i=0,ic=0; i<*ni; i++ ) {
       for( int j=0; j<numex[i]; j++,ic++ ) natex[ic]--;
     }
-    MR3calccoulomb_nlist_ij_host(*ni,xi,qi,fi,*nj,xj,qj,
-                                *rscale,*tblno-6,*size,*periodicflag&3,numex,natex,-1.0);
+//    MR3calccoulomb_nlist_ij_host(*ni,xi,qi,fi,*nj,xj,qj,
+//                                *rscale,*tblno-6,*size,*periodicflag&3,numex,natex,-1.0);
 //    MR3calccoulomb_nlist_ij_emu(*ni,xi,qi,fi,*nj,xj,qj,
 //			        *rscale,*tblno-6,*size,*periodicflag&3,numex,natex,-1.0);
     for( int i=0,ic=0; i<*ni; i++ ) {