Skip to content

Commit

Permalink
Adaptive load balancing in BSOI
Browse files Browse the repository at this point in the history
  • Loading branch information
SGo-Go committed Nov 4, 2013
1 parent bcdfcfb commit 672cafb
Show file tree
Hide file tree
Showing 9 changed files with 887 additions and 398 deletions.
7 changes: 2 additions & 5 deletions bench/include/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ FILE * pFile;
#define MSGFLUSH(...) \
fflush(pFile)

const int ntest = 12;

int process(int threads, int tests, int n, int L);

int main(int argc, char** argv)
Expand Down Expand Up @@ -47,7 +45,7 @@ int main(int argc, char** argv)

if (n>0 && !tests ) {tests = 1; }
else if (n>0 && tests>0) {;}
else if (!n && !tests ) {tests = ntest;}
else if (!n && !tests ) {tests = 1;}
else if (!n && tests>0) {;}
else {
printf("\nUsage: \n");
Expand All @@ -56,8 +54,7 @@ int main(int argc, char** argv)
}
}
else {
L = 10;
tests = ntest;
L = 10; tests = 1; n = 2;
}

if(n == 0) n = 256;
Expand Down
8 changes: 6 additions & 2 deletions config/include/bsofi_params_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <config.h>

#warning Default load balancing parameters
/**************************************************
* Control of workload distribution *
**************************************************/
Expand All @@ -26,10 +27,13 @@
#define KAPPA_Q_C -6.66607109e+02
#define KAPPA_Q_D 2.60855477e+02

# define KAPPA_R(__n) KAPPA_R_A
# define KAPPA_Q(__n) KAPPA_Q_A
# define KAPPA_R(__n) 1. /* KAPPA_R_A */
# define KAPPA_Q(__n) 1. /* KAPPA_Q_A */

# define C_K1(__n) 0
# define C_I(__n) 0
# define C_J(__n) 0
# define C_K2(__n) 0

/**************************************************
* Control of switching between CPU *
Expand Down
5 changes: 5 additions & 0 deletions include/bsofi_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@
#else
# include <bsofi_params_default.h>
#endif

int get_lk(int k, int p, double kappa_Q, int ck1, int ck2);
int get_li(int i, int p, double kappa_R, int ci);
int get_lj(int j, int p, double kappa_C, int cj);

#endif
1 change: 1 addition & 0 deletions python/bench/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def value(self, names, val_type):

def time (self, *names): return self.value(names, val_type='T')
def instr(self, *names): return self.value(names, val_type='I')
def perf(self, *names): return self.instr(*names)/self.time(*names)

def perf_scaled (self, names, instr_names):
return [flops/T for T, flops in zip(self.time(name), self.instr(name))]
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ TARGET = $(BSOFI_LIB)
SOURCES = bsofi_cpu.c bsofi_callback.c bsofi_lapack.c

#ifneq "$(CUDA_PATH)" ""
SOURCES += bsofi_hybrid.c
SOURCES += bsofi_hybrid_adaptive.c bsofi_hybrid_load_balancing.c
#SOURCES += bsofi_hybrid_static.c
#endif

ifneq "$(MAGMA_PATH)" ""
Expand Down
Loading

0 comments on commit 672cafb

Please sign in to comment.