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

Conversation

branfosj
Copy link
Member

@branfosj branfosj commented Dec 31, 2019

(created using eb --new-pr)

requires:

Note that there is an issue to solve over CUDA dependencies - that I've detailed in #9592.

….1.243.eb and patches: pocl-1.4_remove-c11-std.patch
@branfosj branfosj changed the title {lib}[GCC/8.3.0] pocl v1.4 {lib}[GCC/8.3.0] pocl v1.4 with and without CUDA Dec 31, 2019
@branfosj
Copy link
Member Author

branfosj commented Dec 31, 2019

The patch fixes the error:

/rds/bear-apps/devel/2019b/branfosj-eb-2/EL7/EL7-power9/software/GCCcore/8.3.0/include/c++/8.3.0/cmath:585:31: error: cannot convert int to __vector(4) __bool int in return
   { return __builtin_isinf(__x); }

https://bugs.freedesktop.org/show_bug.cgi?id=68504 talks about this bug. Other option is to replace -std=c++11 with -std=gnu++11.

@branfosj
Copy link
Member Author

Test report by @branfosj
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
bear-pg0211u03a.bear.cluster - Linux centos linux 7.7.1908, Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz, Python 2.7.5
See https://gist.github.com/9eff352ab58a8ca5a8c46f2a8787fd09 for a full test report.

@branfosj branfosj changed the title {lib}[GCC/8.3.0] pocl v1.4 with and without CUDA {lib}[GCC/8.3.0 and gcccuda/2019b] pocl v1.4 Dec 31, 2019
@boegel boegel added the update label Jan 2, 2020
@boegel boegel added this to the 4.x milestone Jan 2, 2020
@boegel
Copy link
Member

boegel commented Jan 2, 2020

Other option is to replace -std=c++11 with -std=gnu++11.

@branfosj You should be able to do that via toolchainopts:

toolchainopts = {'cstd': 'gnu++11'}

I think that's better than adding a patch file that we'll need to maintain...

@branfosj
Copy link
Member Author

branfosj commented Jan 2, 2020

Other option is to replace -std=c++11 with -std=gnu++11.

@branfosj You should be able to do that via toolchainopts:

toolchainopts = {'cstd': 'gnu++11'}

I think that's better than adding a patch file that we'll need to maintain...

Sadly we are battling some hard-coding. By adding toolchainopts I can remove 1/3 of the patch, but the other two sections are still needed.

@branfosj
Copy link
Member Author

branfosj commented Jan 2, 2020

Test report by @branfosj
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in this PR)
bear-pg0305u05a.bear.cluster - Linux RHEL 7.6, 8335-GTX, Python 2.7.5
See https://gist.github.com/e23b434c2ca716320259c39cd4488374 for a full test report.

@branfosj
Copy link
Member Author

branfosj commented Jan 2, 2020

Test report by @branfosj
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in this PR)
bear-pg0212u15b.bear.cluster - Linux centos linux 7.7.1908, Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz, Python 2.7.5
See https://gist.github.com/b6b8ac3ca2e2d4e3ba283da13feb2f4a for a full test report.

@branfosj
Copy link
Member Author

branfosj commented Jan 3, 2020

OK, I've done some more testing. An alternative patch is:

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;

Using this does also not involve setting toolchainopts. This seems a better, as it is a smaller patch. Is this preferable?

@branfosj
Copy link
Member Author

branfosj commented Jan 3, 2020

Also, upstream bug report: pocl/pocl#800

@boegel
Copy link
Member

boegel commented Jan 4, 2020

OK, I've done some more testing. An alternative patch is:

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;

Using this does also not involve setting toolchainopts. This seems a better, as it is a smaller patch. Is this preferable?

Yeah, let's go with that...

Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel
Copy link
Member

boegel commented Jan 4, 2020

Test report by @boegel
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in this PR)
node2587.golett.os - Linux centos linux 7.7.1908, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz, Python 2.7.5
See https://gist.github.com/1024f76a0b45e80f02c920e691197113 for a full test report.

@branfosj
Copy link
Member Author

branfosj commented Jan 4, 2020

Test report by @branfosj
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in this PR)
bear-pg0306u07a.bear.cluster - Linux RHEL 7.6, 8335-GTX, Python 2.7.5
See https://gist.github.com/77d191fc8b9caf549de1fac9015b052a for a full test report.

@branfosj
Copy link
Member Author

branfosj commented Jan 4, 2020

Test report by @branfosj
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in this PR)
bear-pg0212u15a.bear.cluster - Linux centos linux 7.7.1908, Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz, Python 2.7.5
See https://gist.github.com/1b2efb6596be4ca2753afe3a9c9a39e8 for a full test report.

@boegel
Copy link
Member

boegel commented Jan 4, 2020

Test report by @boegel
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in this PR)
generoso - Linux centos linux 7.6.1810, Intel(R) Xeon(R) CPU E5-2660 v4 @ 2.00GHz, Python 3.6.8
See https://gist.github.com/ebba79be0739fb3a334a24f85b466acd for a full test report.

@boegel
Copy link
Member

boegel commented Jan 4, 2020

Test report by @boegel
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in this PR)
node3159.skitty.os - Linux centos linux 7.7.1908, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz, Python 3.6.8
See https://gist.github.com/ac6ff4666cf0089cdcf48e441d2f8fed for a full test report.

@boegel
Copy link
Member

boegel commented Jan 4, 2020

Going in, thanks @branfosj!

@boegel boegel merged commit 7b1a9c2 into easybuilders:develop Jan 4, 2020
@boegel boegel removed this from the 4.x milestone Jan 4, 2020
@boegel boegel added this to the next release (4.1.1) milestone Jan 4, 2020
@easybuilders easybuilders deleted a comment from boegelbot Jan 4, 2020
@easybuilders easybuilders deleted a comment from boegelbot Jan 4, 2020
@easybuilders easybuilders deleted a comment from boegelbot Jan 4, 2020
@easybuilders easybuilders deleted a comment from boegelbot Jan 4, 2020
@branfosj branfosj deleted the 20191231095302_new_pr_pocl14 branch January 4, 2020 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants