Skip to content

Commit

Permalink
[liquidSVM] Fix building on Power9
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Apr 14, 2020
1 parent 339d403 commit f22e33f
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
8 changes: 7 additions & 1 deletion easybuild/easyconfigs/r/R/R-3.6.2-foss-2019b.eb
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,13 @@ exts_list = [
'checksums': ['3a1f166f1c71b5877a2acca1384ec6c9b430b67af67ef26125f2abbb53c66206'],
}),
('liquidSVM', '1.2.4', {
'checksums': ['15a9c7f2930e2ed3f4c5bcd9b042884ea580d2b2e52e1c68041600c196046aba'],
'patches': ['liquidSVM-1.2.4-fix_ppc_build.patch'],
'checksums': [
'15a9c7f2930e2ed3f4c5bcd9b042884ea580d2b2e52e1c68041600c196046aba',
'21e65c8ff3f14678e43c19b4f8c36fce9bed796965abf161a147040941fc55ab', # liquidSVM-1.2.4-fix_ppc_build.patch
],
# Don't add optimization flags by liquidSVM which may not be known e.g. on PPC
'preinstallopts': 'LIQUIDSVM_TARGET="empty"',
}),
('oddsratio', '2.0.0', {
'checksums': ['89bf3c68a6ded6a98f4ee8d487c29605ad00ac5f8db9b8bf1a52144e65332553'],
Expand Down
8 changes: 7 additions & 1 deletion easybuild/easyconfigs/r/R/R-3.6.2-fosscuda-2019b.eb
Original file line number Diff line number Diff line change
Expand Up @@ -2106,7 +2106,13 @@ exts_list = [
'checksums': ['3a1f166f1c71b5877a2acca1384ec6c9b430b67af67ef26125f2abbb53c66206'],
}),
('liquidSVM', '1.2.4', {
'checksums': ['15a9c7f2930e2ed3f4c5bcd9b042884ea580d2b2e52e1c68041600c196046aba'],
'patches': ['liquidSVM-1.2.4-fix_ppc_build.patch'],
'checksums': [
'15a9c7f2930e2ed3f4c5bcd9b042884ea580d2b2e52e1c68041600c196046aba',
'21e65c8ff3f14678e43c19b4f8c36fce9bed796965abf161a147040941fc55ab', # liquidSVM-1.2.4-fix_ppc_build.patch
],
# Don't add optimization flags by liquidSVM which may not be known e.g. on PPC
'preinstallopts': 'LIQUIDSVM_TARGET="empty"',
}),
('oddsratio', '2.0.0', {
'checksums': ['89bf3c68a6ded6a98f4ee8d487c29605ad00ac5f8db9b8bf1a52144e65332553'],
Expand Down
48 changes: 48 additions & 0 deletions easybuild/easyconfigs/r/R/liquidSVM-1.2.4-fix_ppc_build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
The code requires C++11 but nvcc is not passed any flag for it, do that to avoid 'error: identifier "__ieee128" is undefined' on PPC
Use uppercase __PPC64__ to detect PPC 64bit (defined by GCC)
diff -aur liquidSVM-orig/MD5 liquidSVM/MD5
--- liquidSVM-orig/MD5 2020-02-20 15:51:17.387058566 +0100
+++ liquidSVM/MD5 2020-02-20 16:48:06.042078399 +0100
@@ -66,7 +66,7 @@
e0ea06f050a2ae8ed2f2e401d968f0ce *man/test.liquidSVM.Rd
8874fc45419e3174bf06013d887f6582 *man/trainSVMs.Rd
4cf2abf7c6d415a4a8cd7f5dee2df959 *man/write.liquidData.Rd
-854c1eecccd169acdb80b03ad6d768dc *src/Makevars.in
+8c4346267f7b7f649ff27fb5288d4e23 *src/Makevars.in
e6d47b428caa2cc55798b431cb5e504f *src/kernel_calculator.cpp
13af8529f5c2bccd4ea03288e9adf908 *src/kernel_calculator.h
dc2c86cbe61e7b7c5dd433f9fa41fac6 *src/liquidSVM.cpp
@@ -155,7 +155,7 @@
8b39ec05680bf3416bc1de3ad92f043f *src/sources/shared/system_support/cuda_simple_vector_operations.h
806ca83732bff4b1b89adfc3494e90da *src/sources/shared/system_support/full_64bit_support.h
dfb08cdb449d490d86dd33bee186aac5 *src/sources/shared/system_support/memory_allocation.cpp
-aec0000be577e69e88c040b641d6818a *src/sources/shared/system_support/memory_allocation.h
+8ea6ac178dd02e862eefa36b789b1711 *src/sources/shared/system_support/memory_allocation.h
683d4ee517b1c760dc410c69c5508ce2 *src/sources/shared/system_support/memory_allocation.ins.cpp
cbd209324ad752e19be10d8975d65e2f *src/sources/shared/system_support/os_specifics.h
54e8583d2e8e269ff2b6d7a79d57cbd5 *src/sources/shared/system_support/parallel_control.cpp
diff -aur liquidSVM-orig/src/Makevars.in liquidSVM/src/Makevars.in
--- liquidSVM-orig/src/Makevars.in 2020-02-20 15:51:17.377058962 +0100
+++ liquidSVM/src/Makevars.in 2020-02-20 16:47:44.042949538 +0100
@@ -39,7 +39,7 @@
# The architecure flag can be set to higher values, if the hardware supports this.
# The value below should be safe for essentially all non stone-age systems.

-NVCCFLAGS= -arch sm_30 -L$(CUDA_LIB_PATH) -DCOMPILE_WITH_CUDA__ -U__SSE2__ -U__AVX__
+NVCCFLAGS= -arch sm_30 -L$(CUDA_LIB_PATH) -DCOMPILE_WITH_CUDA__ -U__SSE2__ -U__AVX__ -std=c++11


#----------- CUDA related flags for GCC ----------------------------------------------------
diff -aur liquidSVM-orig/src/sources/shared/system_support/memory_allocation.h liquidSVM/src/sources/shared/system_support/memory_allocation.h
--- liquidSVM-orig/src/sources/shared/system_support/memory_allocation.h 2020-02-20 15:51:17.377058962 +0100
+++ liquidSVM/src/sources/shared/system_support/memory_allocation.h 2020-02-20 15:56:04.905673381 +0100
@@ -42,7 +42,7 @@

// Check for GCC
#if __GNUC__
- #if __x86_64__ || __ppc64__
+ #if __x86_64__ || __ppc64__ || __PPC64__
#define SYSTEM_WITH_64BIT
#else
#define SYSTEM_WITH_32BIT

0 comments on commit f22e33f

Please sign in to comment.