Skip to content

Commit

Permalink
Fixed crash in ARM apps, added files for performance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sirzooro committed Apr 18, 2020
1 parent 736ef94 commit a08a29a
Show file tree
Hide file tree
Showing 4 changed files with 320 additions and 14 deletions.
36 changes: 22 additions & 14 deletions RakeSearchV3/RakeDiagSearchV3/RakeDiagSearchV3/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
LD_PTHREAD = -pthread

ifeq ($(MinGW32),1)
$(info ===== Compiling MinGW 32-bit app version =====)
CXX = i686-w64-mingw32-g++
Expand All @@ -11,14 +13,18 @@ $(info ===== Compiling AARCH64 app version =====)
CXX = aarch64-unknown-linux-gnu-g++
BOINC_DIR = /boinc930/aarch64
else ifeq ($(ARM),1)
# Fix for "terminate called after throwing an instance of '__gnu_cxx::__concurrence_broadcast_error'" on ARM
LD_PTHREAD = -Wl,-whole-archive -lpthread -Wl,-no-whole-archive
ifeq ($(NEON),1)
$(info ===== Compiling ARMv7 HF app version =====)
CXX = arm-unknown-linux-gnueabihf-g++
BOINC_DIR = /boinc930/armhf
else
$(info ===== Compiling ARMv7 SF app version =====)
CXX = arm-unknown-linux-gnueabi-g++
BOINC_DIR = /boinc930/armsf
BOINC_DIR = /boinc930/arm
# Fix for "terminate called after throwing an instance of '__gnu_cxx::__concurrence_broadcast_error'" on ARM
LD_PTHREAD = -Wl,-whole-archive -lpthread -Wl,-no-whole-archive
endif
else ifeq ($(ARMv6),1)
$(info ===== Compiling ARMv6 app version =====)
Expand All @@ -37,47 +43,49 @@ endif
ifeq ($(Native),1)
# Tune for machine where app is compiled
$(info ===== Compiling native app version =====)
CXXFLAGS += -march=native -mtune=native
TARGET_FLAGS = -march=native -mtune=native
else ifeq ($(AVX512),1)
# AVX512+BMI2
$(info ===== Compiling AVX512+BMI2 app version =====)
CXXFLAGS += -march=skylake-avx512 -mprefer-vector-width=256
TARGET_FLAGS = -march=skylake-avx512 -mprefer-vector-width=256
else ifeq ($(AVX2),1)
# AVX2+BMI2
$(info ===== Compiling AVX2+BMI2 app version =====)
CXXFLAGS += -march=core2 -mtune=haswell -mpopcnt -mavx2 -mbmi -mbmi2
TARGET_FLAGS = -march=core2 -mtune=haswell -mpopcnt -mavx2 -mbmi -mbmi2
else ifeq ($(AVX),1)
# AVX
$(info ===== Compiling AVX app version =====)
CXXFLAGS += -march=core2 -mtune=sandybridge -mpopcnt -mavx -mprefer-vector-width=128
TARGET_FLAGS = -march=core2 -mtune=sandybridge -mpopcnt -mavx -mprefer-vector-width=128
else ifeq ($(SSE41),1)
# SSE4.1
$(info ===== Compiling SSE4.1 app version =====)
CXXFLAGS += -mtune=core2 -msse4.1
TARGET_FLAGS = -mtune=core2 -msse4.1
else ifeq ($(SSSE3),1)
# SSSE3
$(info ===== Compiling SSSE3 app version =====)
CXXFLAGS += -mtune=core2 -mssse3
TARGET_FLAGS = -mtune=core2 -mssse3
else ifeq ($(SSE2),1)
# SSE2
$(info ===== Compiling SSE2 app version =====)
CXXFLAGS += -mtune=core2 -msse2
TARGET_FLAGS = -mtune=core2 -msse2
else ifeq ($(NEON),1)
# NEON (ARM only; AARCH64 has NEON by default)
$(info ===== Compiling ARM NEON app version =====)
CXXFLAGS += -mfloat-abi=hard -mfpu=neon
TARGET_FLAGS = -mfloat-abi=hard -mfpu=neon
else ifeq ($(NOSIMD),1)
$(info ===== Compiling No-SIMD app version =====)
CXXFLAGS += -DNO_SIMD=1
TARGET_FLAGS = -DNO_SIMD=1
else
$(info ===== Compiling default app version =====)
endif

CXXFLAGS += -O3 -ftree-vectorize -static -static-libgcc -static-libstdc++ -pthread -std=c++11 -Wall \
-I$(BOINC_DIR)/include/boinc \
CXXFLAGS = $(TARGET_FLAGS) -O3 -ftree-vectorize -pthread -std=c++11 -Wall \
-I$(BOINC_DIR)/include/boinc

LDFLAGS = $(TARGET_FLAGS) -O3 -ftree-vectorize -static -static-libgcc -static-libstdc++ $(LD_PTHREAD) -std=c++11 -Wall \
-L$(BOINC_DIR)/lib

PROGRAM = rakesearch
PROGRAM = rakesearch10

all: $(PROGRAM)

Expand All @@ -87,7 +95,7 @@ clean:
rm -f $(PROGRAM) $(PROGRAM).exe *.o

$(PROGRAM): $(OBJ_FILES)
$(CXX) $(CXXFLAGS) -o $(PROGRAM) $(OBJ_FILES) -lboinc_api -lboinc
$(CXX) $(LDFLAGS) -o $(PROGRAM) $(OBJ_FILES) -lboinc_api -lboinc

%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
# ------------------------
# Detected pair for the square:
# Degree of orthogonality: 81
# ------------------------
{
0 1 2 3 4 5 6 7 8 9
3 2 4 1 9 8 0 5 7 6
5 4 1 0 2 9 7 6 3 8
2 6 0 4 7 1 8 9 5 3
8 7 5 6 3 4 9 2 1 0
9 3 8 7 5 6 4 0 2 1
7 8 9 2 1 0 5 3 6 4
6 5 3 9 0 7 1 8 4 2
4 0 7 8 6 2 3 1 9 5
1 9 6 5 8 3 2 4 0 7
}
# ------------------------
{
0 1 2 3 4 5 6 7 8 9
6 5 3 9 0 7 1 8 4 2
9 3 8 7 5 6 4 0 2 1
7 8 9 2 1 0 5 3 6 4
2 6 0 4 7 1 8 9 5 3
5 4 1 0 2 9 7 6 3 8
4 0 7 8 6 2 3 1 9 5
1 9 6 5 8 3 2 4 0 7
8 7 5 6 3 4 9 2 1 0
3 2 4 1 9 8 0 5 7 6
}


# Pairs found: 1
}
{
# ------------------------
# Detected pair for the square:
# Degree of orthogonality: 81
# ------------------------
{
0 1 2 3 4 5 6 7 8 9
3 2 4 1 9 8 0 5 7 6
5 4 1 0 2 9 7 6 3 8
2 6 9 4 0 7 8 1 5 3
9 7 8 6 3 4 1 0 2 5
4 9 7 8 5 6 2 3 1 0
6 8 0 2 7 3 5 9 4 1
7 5 3 9 1 0 4 8 6 2
8 0 5 7 6 1 3 2 9 4
1 3 6 5 8 2 9 4 0 7
}
# ------------------------
{
0 1 2 3 4 5 6 7 8 9
5 4 1 0 2 9 7 6 3 8
7 5 3 9 1 0 4 8 6 2
4 9 7 8 5 6 2 3 1 0
8 0 5 7 6 1 3 2 9 4
2 6 9 4 0 7 8 1 5 3
1 3 6 5 8 2 9 4 0 7
3 2 4 1 9 8 0 5 7 6
9 7 8 6 3 4 1 0 2 5
6 8 0 2 7 3 5 9 4 1
}


# Pairs found: 1
}
# ------------------------
# Total pairs found: 2
# Total squares with pairs: 2
# Processed 7617870 squares
# ------------------------
8 changes: 8 additions & 0 deletions RakeSearchV3/RakeDiagSearchV3/RakeDiagSearchV3/test2/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

rm -f boinc_finish_called checkpoint.txt result.txt stderr.txt

time ./rakesearch10 > /dev/null
#time ../tests/sde-external-8.12.0-2017-10-23-win/sde -skx -- ./rakesearch10

diff -sq result.txt result.txt.ref
217 changes: 217 additions & 0 deletions RakeSearchV3/RakeDiagSearchV3/RakeDiagSearchV3/test2/workunit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
# RakeSearch of diagonal Latin squares

10

{
0 1 2 3 4 5 6 7 8 9
3 2 4 1 9 8 0 5 7 6
5 4 1 0 2 9 7 6 3 8
2 -1 -1 4 -1 -1 8 -1 -1 -1
-1 -1 -1 -1 3 4 -1 -1 -1 -1
-1 -1 -1 -1 5 6 -1 -1 -1 -1
-1 -1 -1 2 -1 -1 5 -1 -1 -1
-1 -1 3 -1 -1 -1 -1 8 -1 -1
-1 0 -1 -1 -1 -1 -1 -1 9 -1
1 -1 -1 -1 -1 -1 -1 -1 -1 7
}

55

3 1
3 2
3 4
3 5
3 7
3 8
3 9
4 0
4 1
4 2
4 3
4 6
4 7
4 8
4 9
5 0
5 1
5 2
5 3
5 6
5 7
5 8
5 9
6 0
6 1
6 2
6 4
6 5
6 7
6 8
6 9
7 0
7 1
7 3
7 4
7 5
7 6
7 8
7 9
8 0
8 2
8 3
8 4
8 5
8 6
8 7
8 9
9 1
9 2
9 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