Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{lib}[GCC/8.3.0 and gcccuda/2019b] pocl v1.4 #9593

Merged
merged 6 commits into from
Jan 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions easybuild/easyconfigs/p/pocl/pocl-1.4-GCC-8.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
easyblock = 'CMakeMake'

name = 'pocl'
version = '1.4'

homepage = 'http://portablecl.org'
description = "Pocl is a portable open source (MIT-licensed) implementation of the OpenCL standard"

toolchain = {'name': 'GCC', 'version': '8.3.0'}

source_urls = ['https://github.com/pocl/pocl/archive/']
sources = ['v%(version)s.tar.gz']
patches = ['%(name)s-%(version)s_undef-bool-and-vector-from-altivec.patch']
checksums = [
'ec237faa83bb1c803fbdf7c6e83d8a2ad68b6f0ed1879c3aa16c0e1dcc478742', # v1.4.tar.gz
# pocl-1.4_undef-bool-and-vector-from-altivec.patch
'e795b7db34ebae71ee206ad88dcf93b6691bbc3c179d346d6385ded0767d49ce',
]

builddependencies = [
('CMake', '3.15.3'),
('pkg-config', '0.29.2'),
]

dependencies = [
('Clang', '9.0.1'),
('hwloc', '1.11.12'),
('libtool', '2.4.6'),
('libxml2', '2.9.9'),
]

separate_build_dir = True

# disable attempt to find an ICD loader, always build libOpenCL.so
configopts = "-DENABLE_ICD=0 -DINSTALL_OPENCL_HEADERS=1"

sanity_check_paths = {
'files': ['bin/poclcc', 'lib64/libOpenCL.%s' % SHLIB_EXT],
'dirs': ['include/CL', 'lib64/pkgconfig'],
}

moduleclass = 'lib'
42 changes: 42 additions & 0 deletions easybuild/easyconfigs/p/pocl/pocl-1.4-gcccuda-2019b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
easyblock = 'CMakeMake'

name = 'pocl'
version = '1.4'

homepage = 'http://portablecl.org'
description = "Pocl is a portable open source (MIT-licensed) implementation of the OpenCL standard"

toolchain = {'name': 'gcccuda', 'version': '2019b'}

source_urls = ['https://github.com/pocl/pocl/archive/']
sources = ['v%(version)s.tar.gz']
patches = ['%(name)s-%(version)s_undef-bool-and-vector-from-altivec.patch']
checksums = [
'ec237faa83bb1c803fbdf7c6e83d8a2ad68b6f0ed1879c3aa16c0e1dcc478742', # v1.4.tar.gz
# pocl-1.4_undef-bool-and-vector-from-altivec.patch
'e795b7db34ebae71ee206ad88dcf93b6691bbc3c179d346d6385ded0767d49ce',
]

builddependencies = [
('CMake', '3.15.3'),
('pkg-config', '0.29.2'),
]

dependencies = [
('Clang', '9.0.1', '-CUDA-10.1.243'),
('hwloc', '1.11.12'),
('libtool', '2.4.6'),
('libxml2', '2.9.9'),
]

separate_build_dir = True

# disable attempt to find an ICD loader, always build libOpenCL.so, enable CUDA
configopts = "-DENABLE_ICD=0 -DINSTALL_OPENCL_HEADERS=1 -DENABLE_CUDA=1"

sanity_check_paths = {
'files': ['bin/poclcc', 'lib64/libOpenCL.%s' % SHLIB_EXT],
'dirs': ['include/CL', 'lib64/pkgconfig'],
}

moduleclass = 'lib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Undefine altivec.h bool and vector, otherwise these conflict with the c++11 standard defintions
and that causes the build to fail on ppc64le.
Patch by Simon Branford, University of Birmingham
diff -aur pocl-1.4.orig/include/CL/cl_platform.h pocl-1.4/include/CL/cl_platform.h
--- pocl-1.4.orig/include/CL/cl_platform.h 2020-01-03 09:55:56.986465000 +0000
+++ pocl-1.4/include/CL/cl_platform.h 2020-01-03 09:59:18.058173021 +0000
@@ -356,6 +356,8 @@
/* Define basic vector types */
#if defined( __VEC__ )
#include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
+ #undef bool
+ #undef vector
typedef __vector unsigned char __cl_uchar16;
typedef __vector signed char __cl_char16;
typedef __vector unsigned short __cl_ushort8;