Commit 8dbe9de9 authored by martinp16cs's avatar martinp16cs

changes cblas version

parent 4d0e25dc
build/
debug/
nohup.out
*.csv
......@@ -27,7 +27,7 @@ add_definitions(-DNUM_THREADS=64)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -march=knl -mtune=knl -fpic -ffast-math -O0 -fopenmp")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -fpic -qopenmp -axCOMMON-AVX512 -lmemkind -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5 -lpthread -g -debug all -save-temps -Wl,-no_pie -O0")
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -fpic -qopenmp -axCOMMON-AVX512 -lmemkind -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5 -lpthread -g -debug all -save-temps -Wl, -O0 -fstack-security-check")
endif()
# adding MKL include directory
......
......@@ -16,9 +16,10 @@ int main(int argc, char** argv) {
size_t threads = 64;
size_t N=200, D=20;
size_t blocksize=4000;
double EPS=0.2;
parsing_args(argc,argv, &N, &EPS, &D, &threads, filename, isBinary);
parsing_args(argc,argv, &N, &EPS, &D, &threads, &blocksize, filename, isBinary);
N = N * 1000;
......@@ -34,9 +35,14 @@ int main(int argc, char** argv) {
read_file(x, N, D, filename, isBinary);
}
elapsed = blasJoin( x, N, D, EPS, threads);
elapsed = blasJoin( x, N, D, EPS, threads, blocksize);
printf("%d; %d; %f; %f\n", N,D,EPS,elapsed);
#pragma omp parallel
{
if ( omp_get_thread_num() == 0 ){
printf("%ld; %ld; %f; %ld; %d; %f \n", N, D, EPS, blocksize, omp_get_num_threads(),elapsed);
}
}
ddr_free(x);
......
# BLOCKSIZE=(1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000 12000 13000 14000 15000 18000 20000 )
BLOCKSIZE=(100 200 300 400 500 600 700 800 900 )
# THREADS=(96 128 160 192 224 256)
FILENAME=$1
REPETITIONS=5
if [ $# -ne 1 ]
then
echo "need filename as parameter!"
exit 1
fi
echo "writing to filename: $1"
echo "N;D;EPS;BLOCKSIZE;THREADS;TIME;LOOP" > $1
for b in ${BLOCKSIZE[@]}
do
echo "$b"
export OMP_NUM_THREADS=64
for i in $(seq 1 $REPETITIONS)
do
./build/blasJoin -n 200 -e 0.2 -d 20 -s $b >>$1
# numactl --membind=1,2,3,4,5,6,7,8
done
done
mail -s "blasJoin done!" -r "root@ivanhoe.dm.univie.ac.at" "martin.perdacher@univie.ac.at"
......@@ -5,7 +5,7 @@ void * ddr_alloc(size_t bytes){
void * ptr = _mm_malloc(bytes, ALIGNMENT);
if ( ptr == NULL ){
fprintf(stderr, "Error in allocating memory with ddr_alloc!");
fprintf(stderr, "Error in allocating memory with ddr_alloc!\n");
exit(1);
}
......
1; # octave script file N = 5; D = 2; EPS = 0.02; X = rand(N, D); Pi = zeros(N,1); qEPS = EPS^2 / 4; # pre-compute the values Pi: for i = 1:rows(X) # BLAS level 1 dsdot: Pi(i) = qEPS - ( dot( X(1,:), X(1,:) ) / 2); endfor # BLAS level 3 dgemm: scalarp = X * X'; # loop over lower triangle of scalarp for i = 2:rows(scalarp) for j = 1:(i-1) # join partner i and j scalarp(i,j) += Pi(i) + Pi(j); endfor endfor # if scalarp(i,j) greater than 0, then we have a join partner scalarp
\ No newline at end of file
1; # octave script file N = 5; D = 2; EPS = 0.02; X = rand(N, D); P = zeros(N,1); qEPS = EPS^2 / 4; # pre-compute the values Pi: for i = 1:rows(X) # BLAS level 1 ddot: P(i) = qEPS - ( dot( X(i,:), X(i,:) ) / 2); endfor # BLAS level 3 dgemm: scalarp = X * X'; # loop over lower triangle of scalarp for i = 2:rows(scalarp) for j = 1:(i-1) # join partner i and j scalarp(i,j) += P(i) + P(j); endfor endfor # if scalarp(i,j) greater than 0, then we have a join partner scalarp
\ No newline at end of file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment