Explorar o código

Added the DPFREQ_DIVISOR macro.

You can now reduce the dp frequency using the DPFREQ_DIVISOR macro. This is useful when the desired resources calculations provide a dpfreq that is too high and fills the device dp buffers. You may also want to change this for other reasons. This is not a nice solution, but it is good enough for now.
Steven Engler %!s(int64=8) %!d(string=hai) anos
pai
achega
563cc16a20
Modificáronse 3 ficheiros con 7 adicións e 2 borrados
  1. 1 1
      Makefile
  2. 1 1
      Makefile.graham
  3. 5 0
      desired_resources.cc

+ 1 - 1
Makefile

@@ -43,7 +43,7 @@ MPI_INC = $(if $(strip $(MPI)), -I$(MPI)/include)
 
 
 WORDS = 24
 WORDS = 24
 MACROS := -UVERBOSE $(MACROS)
 MACROS := -UVERBOSE $(MACROS)
-# options: VERBOSE DERANDOMIZE SAVE_DPS MAKE_VERSIONS_COMPARABLE RIPPLE GRAHAM
+# options: VERBOSE DERANDOMIZE SAVE_DPS MAKE_VERSIONS_COMPARABLE RIPPLE GRAHAM DPFREQ_DIVISOR
 
 
 CXXFLAGS=-g -Wall -O2
 CXXFLAGS=-g -Wall -O2
 CPPFLAGS=-DWORDS=$(WORDS) $(LIBEVENT_INC) $(GMP_INC) $(NTL_INC) -std=c++11 $(MACROS)
 CPPFLAGS=-DWORDS=$(WORDS) $(LIBEVENT_INC) $(GMP_INC) $(NTL_INC) -std=c++11 $(MACROS)

+ 1 - 1
Makefile.graham

@@ -1,6 +1,6 @@
 # to use, copy this file to 'Makefile.local'
 # to use, copy this file to 'Makefile.local'
 
 
-MACROS = -DGRAHAM -DNTHREADS=71680 -DNBLOCKS=112
+MACROS = -DGRAHAM -DNTHREADS=71680 -DNBLOCKS=112 -DDPFREQ_DIVISOR=4
 CUDA_ARCH = sm_60
 CUDA_ARCH = sm_60
 
 
 GMP ?=
 GMP ?=

+ 5 - 0
desired_resources.cc

@@ -72,6 +72,11 @@ void desired_resources(const ZZ &order, unsigned short total_workers,
 	}
 	}
     }
     }
 
 
+#ifdef DPFREQ_DIVISOR
+    // not a nice solution, but gives you the extra control if you need it
+    dpfreq /= DPFREQ_DIVISOR;
+#endif
+
     // Orders smaller than 100*scale^2 behave specially, in order to
     // Orders smaller than 100*scale^2 behave specially, in order to
     // avoid DP-free cycles
     // avoid DP-free cycles
     ZZ orderlimit;
     ZZ orderlimit;