Add another memory barrier for ARM and a multicore test run on ThunderX to help detec...
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Wed, 8 Apr 2020 09:04:51 +0000 (11:04 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Apr 2020 09:04:51 +0000 (11:04 +0200)
* Add another memory barrier in memory.c to prevent races in memory slot allocation

* Add an all-core test on Drone.io's ThunderX platform and modify dgemm_tester to use all 96 cores

.drone.yml
cpp_thread_test/dgemm_thread_safety.cpp
driver/others/memory.c

index 696c5a9..3bbd8fc 100644 (file)
@@ -141,3 +141,28 @@ steps:
     - cmake $CMAKE_FLAGS ..
     - make -j
     - ctest -V
+
+---
+kind: pipeline
+name: arm64_native_test
+
+platform:
+  os: linux
+  arch: arm64
+
+steps:
+- name: Build and Test
+  image: ubuntu:19.04
+  environment:
+    CC: gcc
+    COMMON_FLAGS: 'USE_OPENMP=1'
+  commands:
+    - echo "MAKE_FLAGS:= $COMMON_FLAGS"
+    - apt-get update -y
+    - apt-get install -y make $CC gfortran perl python g++
+    - $CC --version
+    - make QUIET_MAKE=1 $COMMON_FLAGS
+    - make -C test $COMMON_FLAGS
+    - make -C ctest $COMMON_FLAGS
+    - make -C utest $COMMON_FLAGS
+    - make -C cpp_thread_test dgemm_tester
index cecf794..1b6ad38 100644 (file)
@@ -12,7 +12,7 @@ void launch_cblas_dgemm(double* A, double* B, double* C, const blasint randomMat
 
 int main(int argc, char* argv[]){
        blasint randomMatSize = 1024; //dimension of the random square matrices used
-       uint32_t numConcurrentThreads = 52; //number of concurrent calls of the functions being tested
+       uint32_t numConcurrentThreads = 96; //number of concurrent calls of the functions being tested
        uint32_t numTestRounds = 16; //number of testing rounds before success exit
        
        if (argc > 4){
index 62a5a02..1af547f 100644 (file)
@@ -2740,7 +2740,7 @@ void *blas_memory_alloc(int procpos){
 #ifdef DEBUG
   printf("  Position -> %d\n", position);
 #endif
-
+WMB;
   memory[position].used = 1;
 #if (defined(SMP) || defined(USE_LOCKING)) && !defined(USE_OPENMP)
   UNLOCK_COMMAND(&alloc_lock);