diff --git a/test/3m4m/Makefile b/test/3m4m/Makefile index 124f86d4f..1367e2334 100644 --- a/test/3m4m/Makefile +++ b/test/3m4m/Makefile @@ -130,7 +130,7 @@ MKLP_LIB := -L$(MKL_LIB_PATH) \ -lmkl_intel_lp64 \ -lmkl_core \ -lmkl_gnu_thread \ - -lpthread -lm -ldl + -lpthread -lm -ldl -fopenmp #-L$(ICC_LIB_PATH) \ #-lgomp @@ -150,22 +150,18 @@ TEST_SRC_PATH := . TEST_OBJ_PATH := . # Gather all local object files. -TEST_OBJS := $(patsubst $(TEST_SRC_PATH)/%.c, \ - $(TEST_OBJ_PATH)/%.o, \ - $(wildcard $(TEST_SRC_PATH)/*.c)) +TEST_OBJS := $(sort $(patsubst $(TEST_SRC_PATH)/%.c, \ + $(TEST_OBJ_PATH)/%.o, \ + $(wildcard $(TEST_SRC_PATH)/*.c))) -# Override CFLAGS from make_defs.mk here, if desired. -#CFLAGS := -g -O2 -march=native +# Use the "framework" CFLAGS for the configuration family. +CFLAGS := $(call get-frame-cflags-for,$(CONFIG_NAME)) -# Add installed and local header paths to CFLAGS -CFLAGS += -I$(BLIS_INC_PATH) -I$(TEST_SRC_PATH) #-I$(ACML_INC_PATH) - -LINKER := $(CC) -LDFLAGS := #-L/home/00146/field/gnu/gcc-4.8.2/lib64 -LDFLAGS += -lgfortran -lm -lrt -lpthread -fopenmp +# Add local header paths to CFLAGS. +CFLAGS += -I$(TEST_SRC_PATH) # Locate the libblis library to which we will link. -LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) +LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) # Datatype diff --git a/test/3m4m/runme.sh b/test/3m4m/runme.sh index 3f5d89023..96e0ee441 100755 --- a/test/3m4m/runme.sh +++ b/test/3m4m/runme.sh @@ -6,7 +6,8 @@ out_root="output" #sys="blis" #sys="stampede" -sys="lonestar" +sys="stampede2" +#sys="lonestar" #sys="wahlberg" # Bind threads to processors. @@ -30,6 +31,10 @@ elif [ ${sys} = "stampede" ]; then # A hack to use libiomp5 with gcc. export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/apps/intel/13/composer_xe_2013.2.146/compiler/lib/intel64" +elif [ ${sys} = "stampede2" ]; then + + : + elif [ ${sys} = "lonestar" ]; then # A hack to use libiomp5 with gcc. @@ -101,6 +106,10 @@ elif [ ${sys} = "stampede" ]; then test_impls="openblas mkl asm_blis 3mhw_blis 3m3_blis 3m2_blis 3m1_blis 4mhw_blis 4m1b_blis 4m1a_blis 1m_blis" #test_impls="openblas mkl asm_blis" +elif [ ${sys} = "stampede2" ]; then + + test_impls="openblas mkl asm_blis" + elif [ ${sys} = "lonestar" ]; then test_impls="asm_blis 4mhw_blis 4m1a_blis 1m_blis 3m1_blis" diff --git a/test/3m4m/test_gemm.c b/test/3m4m/test_gemm.c index d8e267011..f03c33155 100644 --- a/test/3m4m/test_gemm.c +++ b/test/3m4m/test_gemm.c @@ -84,7 +84,7 @@ int main( int argc, char** argv ) // Supress compiler warnings about unused variable 'ind'. ( void )ind; -#if 1 +#if 0 cntx_t* cntx; @@ -99,9 +99,9 @@ int main( int argc, char** argv ) // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); -#elif 0 +#elif 1 - k_input = 256; + //k_input = 256; #endif diff --git a/test/Makefile b/test/Makefile index 2b5f77c10..78830b5a7 100644 --- a/test/Makefile +++ b/test/Makefile @@ -100,8 +100,9 @@ BLIS_INC_PATH := $(INSTALL_PREFIX)/include/blis # BLAS library path(s). This is where the BLAS libraries reside. BLAS_LIB_PATH := $(HOME)/flame/lib #MKL_LIB_PATH := /opt/apps/intel/13/composer_xe_2013.2.146/mkl/lib/intel64 -MKL_LIB_PATH := $(HOME)/intel/mkl/lib/intel64 -ESSL_LIB_PATH := $(HOME)/path/to/essl/changeme +#MKL_LIB_PATH := $(HOME)/intel/mkl/lib/intel64 +MKL_LIB_PATH := ${MKLROOT}/lib/intel64 +#ESSL_LIB_PATH := $(HOME)/path/to/essl/changeme # OpenBLAS OPENBLAS_LIB := $(BLAS_LIB_PATH)/libopenblas.a @@ -142,18 +143,14 @@ TEST_OBJS := $(patsubst $(TEST_SRC_PATH)/%.c, \ $(TEST_OBJ_PATH)/%.o, \ $(wildcard $(TEST_SRC_PATH)/*.c)) -# Override CFLAGS from make_defs.mk here, if desired. -#CFLAGS := -g -O2 -march=native +# Use the CFLAGS for the configuration family. +CFLAGS := $(call get-frame-cflags-for,$(CONFIG_NAME)) -# Add installed and local header paths to CFLAGS -CFLAGS += -I$(BLIS_INC_PATH) -I$(TEST_SRC_PATH) - -LINKER := $(CC) -LDFLAGS := #-L/home/00146/field/gnu/gcc-4.8.2/lib64 -LDFLAGS += -lgfortran -lm -lpthread -fopenmp +# Add local header paths to CFLAGS +CFLAGS += -I$(TEST_SRC_PATH) # Locate the libblis library to which we will link. -LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) +LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) diff --git a/test/exec_sizes/Makefile b/test/exec_sizes/Makefile index c94a1fec3..3db90554c 100644 --- a/test/exec_sizes/Makefile +++ b/test/exec_sizes/Makefile @@ -98,7 +98,8 @@ BLIS_INC_PATH := $(INSTALL_PREFIX)/include/blis # BLAS library path(s). This is where the BLAS libraries reside. BLAS_LIB_PATH := $(HOME)/flame/lib -MKL_LIB_PATH := $(HOME)/intel/mkl/lib/intel64/ +#MKL_LIB_PATH := $(HOME)/intel/mkl/lib/intel64/ +MKL_LIB_PATH := ${MKLROOT}/lib/intel64 # OpenBLAS, ATLAS, and MKL libraries. #BLAS_LIB := $(LIB_PATH)/libblas.a @@ -111,12 +112,17 @@ ABLAS_LIB := $(BLAS_LIB_PATH)/libf77blas.a \ # -lmkl_sequential \ # -lmkl_core \ # -lmkl_intel_lp64 -MBLAS_LIB := -Wl,--start-group \ - $(MKL_LIB_PATH)/libmkl_sequential.a \ - $(MKL_LIB_PATH)/libmkl_core.a \ - $(MKL_LIB_PATH)/libmkl_intel_ilp64.a \ - -Wl,--end-group \ - -lpthread -lm +#MBLAS_LIB := -Wl,--start-group \ +# $(MKL_LIB_PATH)/libmkl_sequential.a \ +# $(MKL_LIB_PATH)/libmkl_core.a \ +# $(MKL_LIB_PATH)/libmkl_intel_ilp64.a \ +# -Wl,--end-group \ +# -lpthread -lm +MBLAS_LIB := -L$(MKL_LIB_PATH) \ + -lmkl_intel_lp64 \ + -lmkl_core \ + -lmkl_sequential \ + -lpthread -lm -ldl @@ -124,33 +130,20 @@ MBLAS_LIB := -Wl,--start-group \ # --- General build definitions ------------------------------------------------ # -MAKE_BLIS := yes -MAKE_OPENBLAS := yes -MAKE_ATLAS := yes -MAKE_MKL := yes -MAKE_DCOMPLEX := yes - TEST_SRC_PATH := . TEST_OBJ_PATH := . -## Gather all local object files. -#TEST_OBJS := $(patsubst $(TEST_SRC_PATH)/%.c, \ -# $(TEST_OBJ_PATH)/%.o, \ -# $(wildcard $(TEST_SRC_PATH)/*.c)) +## Gather all local source files. TEST_SIZES_SRC := test_size.c -# Override CFLAGS from make_defs.mk here, if desired. -#CFLAGS := -g -O2 -march=native +# Use the CFLAGS for the configuration family. +CFLAGS := $(call get-frame-cflags-for,$(CONFIG_NAME)) -# Add installed and local header paths to CFLAGS -CFLAGS += -I$(BLIS_INC_PATH) -I$(TEST_SRC_PATH) - -LINKER := $(CC) -LDFLAGS := -L/home/00146/field/gnu/gcc-4.8.2/lib64 -LDFLAGS += -lgfortran -lm -lpthread +# Add local header paths to CFLAGS +CFLAGS += -I$(TEST_SRC_PATH) # Locate the libblis library to which we will link. -LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) +LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) @@ -158,6 +151,12 @@ LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) # --- Targets/rules ------------------------------------------------------------ # +MAKE_BLIS := yes +MAKE_OPENBLAS := yes +MAKE_MKL := yes +MAKE_ATLAS := no +MAKE_DCOMPLEX := yes + ifeq ($(MAKE_BLIS),yes) TEST_BINS += test_blis01 \ test_blis02 \ diff --git a/test/thread_ranges/Makefile b/test/thread_ranges/Makefile index d78de297f..02dd00365 100644 --- a/test/thread_ranges/Makefile +++ b/test/thread_ranges/Makefile @@ -106,22 +106,18 @@ TEST_SRC_PATH := . TEST_OBJ_PATH := . # Gather all local object files. -TEST_OBJS := $(patsubst $(TEST_SRC_PATH)/%.c, \ - $(TEST_OBJ_PATH)/%.o, \ - $(wildcard $(TEST_SRC_PATH)/*.c)) +TEST_OBJS := $(sort $(patsubst $(TEST_SRC_PATH)/%.c, \ + $(TEST_OBJ_PATH)/%.o, \ + $(wildcard $(TEST_SRC_PATH)/*.c))) -# Override CFLAGS from make_defs.mk here, if desired. -#CFLAGS := -g -O2 -march=native +# Use the CFLAGS for the configuration family. +CFLAGS := $(call get-frame-cflags-for,$(CONFIG_NAME)) # Add installed and local header paths to CFLAGS -CFLAGS += -I$(BLIS_INC_PATH) -I$(TEST_SRC_PATH) #-I$(ACML_INC_PATH) - -LINKER := $(CC) -LDFLAGS := #-L/home/00146/field/gnu/gcc-4.8.2/lib64 -LDFLAGS += -lgfortran -lm -lpthread -fopenmp +CFLAGS += -I$(TEST_SRC_PATH) # Locate the libblis library to which we will link. -LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) +LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) # Datatype diff --git a/test/thread_ranges/test_ranges.c b/test/thread_ranges/test_ranges.c index 96ecf1d91..a84b0f507 100644 --- a/test/thread_ranges/test_ranges.c +++ b/test/thread_ranges/test_ranges.c @@ -132,17 +132,17 @@ int main( int argc, char** argv ) if ( argc == 13 ) { - sscanf( argv[1], "%lu", &p_begin ); - sscanf( argv[2], "%lu", &p_max ); - sscanf( argv[3], "%lu", &p_inc ); - sscanf( argv[4], "%ld", &m_input ); - sscanf( argv[5], "%ld", &n_input ); + sscanf( argv[1], "%u", &p_begin ); + sscanf( argv[2], "%u", &p_max ); + sscanf( argv[3], "%u", &p_inc ); + sscanf( argv[4], "%d", &m_input ); + sscanf( argv[5], "%d", &n_input ); sscanf( argv[6], "%c", &uploa_ch ); - sscanf( argv[7], "%ld", &diagoffa ); - sscanf( argv[8], "%lu", &bf ); - sscanf( argv[9], "%lu", &n_way ); + sscanf( argv[7], "%d", &diagoffa ); + sscanf( argv[8], "%u", &bf ); + sscanf( argv[9], "%u", &n_way ); sscanf( argv[10], "%c", &part_dim_ch ); - sscanf( argv[11], "%lu", &go_fwd ); + sscanf( argv[11], "%u", &go_fwd ); sscanf( argv[12], "%c", &out_ch ); } else @@ -222,12 +222,12 @@ int main( int argc, char** argv ) } printf( "\n" ); - printf( " part: %3s doff: %3ld bf: %3ld output: %s\n", + printf( " part: %3s doff: %3d bf: %3d output: %s\n", ( part_n_dim ? ( go_fwd ? "l2r" : "r2l" ) : ( go_fwd ? "t2b" : "b2t" ) ), - diagoffa, bf, + ( int )diagoffa, ( int )bf, ( out_ch == 'w' ? "width(area)" : "ranges" ) ); - printf( " uplo: %3c nt: %3ld\n", uploa_ch, n_way ); + printf( " uplo: %3c nt: %3u\n", uploa_ch, ( unsigned )n_way ); printf( "\n" ); printf( " " ); @@ -252,7 +252,7 @@ int main( int argc, char** argv ) printf( "%4c x %4c ", 'm', 'n' ); for ( t = t_begin; t != t_stop; t += t_inc ) { - printf( "%9s %lu ", "thread", t ); + printf( "%9s %u ", "thread", ( unsigned )t ); } printf( "\n" ); printf( "-------------" ); @@ -282,7 +282,7 @@ int main( int argc, char** argv ) bli_blksz_init_easy( &bfs, bf, bf, bf, bf ); - printf( "%4lu x %4lu ", m, n ); + printf( "%4u x %4u ", ( unsigned )m, ( unsigned )n ); for ( t = t_begin; t != t_stop; t += t_inc ) { @@ -300,8 +300,10 @@ int main( int argc, char** argv ) width = end - start; - if ( out_ch == 'w' ) printf( "%4lu(%6lu) ", width, area ); - else printf( "[%4lu,%4lu) ", start, end ); + if ( out_ch == 'w' ) printf( "%4u(%6u) ", ( unsigned )width, + ( unsigned )area ); + else printf( "[%4u,%4u) ", ( unsigned )start, + ( unsigned )end ); } printf( "\n" ); diff --git a/testsuite/Makefile b/testsuite/Makefile index f98859fd8..c5deb1ca7 100644 --- a/testsuite/Makefile +++ b/testsuite/Makefile @@ -36,7 +36,7 @@ # Makefile # # Field G. Van Zee -# +# # Makefile for BLIS testsuite. # @@ -85,48 +85,6 @@ endif -# -# --- Optional overrides ------------------------------------------------------- -# - -# Uncomment and modify these definitions if you wish to override the values -# present in the current BLIS configuration's makefile definitions file -# (ie: config//make_defs.mk). -# CC := gcc -# LINKER := $(CC) -# CFLAGS := -g -O2 -Wall -Wno-comment -# LDFLAGS := -# INSTALL_PREFIX := $(HOME)/blis - - - -# -# --- BLAS and LAPACK implementations ------------------------------------------ -# - -# BLIS library and header path. This is simply wherever it was installed. -#BLIS_LIB_PATH := $(INSTALL_PREFIX)/lib -#BLIS_INC_PATH := $(INSTALL_PREFIX)/include/blis - -# BLIS library. -#BLIS_LIB_PATH := $(BUILD_PATH)/$(LIB_DIR)/$(CONFIG_NAME) -#BLIS_LIB := $(BLIS_LIB_PATH)/libblis.a - -# BLAS library path(s). This is where the BLAS libraries reside. -#BLAS_LIB_PATH := $(HOME)/flame/lib - -# OpenBLAS, ATLAS, and MKL libraries. -#BLAS_LIB := $(LIB_PATH)/libblas.a -#BLAS_LIB := $(LIB_PATH)/libgoto.a -#BLAS_LIB := $(LIB_PATH)/libgoto2.a -#OPENBLAS_LIB := $(BLAS_LIB_PATH)/libopenblas.a -#ATLAS_LIB := $(BLAS_LIB_PATH)/libf77blas.a \ -# $(BLAS_LIB_PATH)/libatlas.a -#MKL_LIB := -L/opt/intel/mkl/10.2.2.025/lib/em64t/ \ -# -lmkl_sequential -lmkl_core -lmkl_intel_lp64 - - - # # --- General build definitions ------------------------------------------------ # @@ -139,18 +97,18 @@ TEST_OBJS := $(sort $(patsubst $(TEST_SRC_PATH)/%.c, \ $(TEST_OBJ_PATH)/%.o, \ $(wildcard $(TEST_SRC_PATH)/*.c))) +# Use the "framework" CFLAGS for the configuration family. +CFLAGS := $(call get-frame-cflags-for,$(CONFIG_NAME)) + +# Add local header paths to CFLAGS +CFLAGS += -I$(TEST_SRC_PATH) + +# Locate the libblis library to which we will link. +LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) + # Binary executable name. TEST_BIN := test_libblis.x -# Use the CFLAGS for the configuration family. -CFLAGS := $(call get-frame-cflags-for,$(CONFIG_NAME)) - -# Add local header paths to CFLAGS -#CFLAGS += -I$(BLIS_INC_PATH) -I$(TEST_SRC_PATH) -CFLAGS += -I$(TEST_SRC_PATH) - -# Locate the libblis library to which we will link. -LIBBLIS_LINK := $(BUILD_PATH)/$(LIBBLIS_LINK) #