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

add Kokkos #3740

Merged
merged 7 commits into from
Nov 30, 2021
Merged

add Kokkos #3740

merged 7 commits into from
Nov 30, 2021

Conversation

Crghilardi
Copy link
Contributor

This PR adds a build_tarballs.jl for the Kokkos library.This build is close to default build options, only added openMP support.

Tested locally on x86_64-linux-* , powerpc, and freebsd.
mingw still has some issues I am working through

@Crghilardi
Copy link
Contributor Author

Crghilardi commented Oct 15, 2021

As far as I understand, mingw is failing with errors about the use of _InterlockedExchangeCompare8

[01:28:52] cd /workspace/srcdir/kokkos-3.4.01/build/core/src && /opt/bin/x86_64-w64-mingw32-libgfortran3-cxx11/x86_64-w64-mingw32-g++ --sysroot=/opt/x86_64-w64-mingw32/x86_64-w64-mingw32/sys-root/  -DKOKKOS_DEPENDENCE -Dkokkoscore_EXPORTS @CMakeFiles/kokkoscore.dir/includes_CXX.rsp -O3 -DNDEBUG   -o CMakeFiles/kokkoscore.dir/impl/Kokkos_hwloc.cpp.obj -c /workspace/srcdir/kokkos-3.4.01/core/src/impl/Kokkos_hwloc.cpp
[01:28:54] In file included from /workspace/srcdir/kokkos-3.4.01/core/src/Kokkos_Atomic.hpp:187:0,
[01:28:54]                  from /workspace/srcdir/kokkos-3.4.01/core/src/impl/Kokkos_HostBarrier.hpp:49,
[01:28:54]                  from /workspace/srcdir/kokkos-3.4.01/core/src/impl/Kokkos_HostBarrier.cpp:47:
[01:28:54] /workspace/srcdir/kokkos-3.4.01/core/src/impl/Kokkos_Atomic_Windows.hpp: In function ‘T Kokkos::atomic_compare_exchange(volatile T*, const T&, typename std::enable_if<(sizeof (T) == sizeof (char)), const T&>::type)’:
[01:28:54] /workspace/srcdir/kokkos-3.4.01/core/src/impl/Kokkos_Atomic_Windows.hpp:88:58: error: there are no arguments to ‘_InterlockedCompareExchange8’ that depend on a template parameter, so a declaration of ‘_InterlockedCompareExchange8’ must be available [-fpermissive]
[01:28:54]                                         *((CHAR*)&compare));
[01:28:54]                                                           ^
[01:28:54] /workspace/srcdir/kokkos-3.4.01/core/src/impl/Kokkos_Atomic_Windows.hpp:88:58: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
[01:28:54] make[2]: *** [core/src/CMakeFiles/kokkoscore.dir/build.make:140: core/src/CMakeFiles/kokkoscore.dir/impl/Kokkos_HostBarrier.cpp.obj] Error 1

This seems to be defined as a MSVC intrinsic, but is missing from mingw. It looks like there are 64 and 128 versions in intrin.h but no 8 version.

Googling around, it looks like ReactOS carries gcc ports around?

I tried adding both #include <intrin.h> and #include <winnt.h> statement as a wild guess, but that still returns the same error.

@Crghilardi Crghilardi marked this pull request as ready for review November 30, 2021 02:47
@giordano
Copy link
Member

I'm a bit confused: what was that made the MinGW build work?

@Crghilardi
Copy link
Contributor Author

I don't know exactly, there were a lot of changes and files modified between the 3.4.1 release and 3.5.0. I am just guessing some macro flags or something was mis-aligned or not triggering?

I don't know if my ramblings above were actually meaningful in any way, so take them with a grain of salt

@giordano giordano merged commit 1e75e47 into JuliaPackaging:master Nov 30, 2021
@giordano
Copy link
Member

Ok, I missed you had upgraded the version in the meantime, that may have had an effect then.

@Crghilardi
Copy link
Contributor Author

I also attempted to submit a patch upstream here for completeness.

@Crghilardi Crghilardi deleted the cg/add-kokkos branch November 30, 2021 19:51
simeonschaub pushed a commit to simeonschaub/Yggdrasil that referenced this pull request Feb 23, 2022
* initial commit adding Kokkos

* add filter to remove 32 bit platforms

* add branch to disable openmp on apple

* generalize disable-stacktrace patch to both musl and mingw

* update version to 3.5.0 release

* refresh stacktrace patch and remove from mingw conditional

* Apply suggestions from code review

Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants