Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #1400

Closed
Open
Created Jun 06, 2017 by James Willenbring@jmwilleMaintainer

Get CMake build system to take advantage of kokkos/Makefile.kokkos in setting compilers, compiler options etc.

Created by: bartlettroscoe

CC: @kruger, @crtrott, @nmhamster, @dsunder, @ibaned

Next Action Status:

A new plan was discussed in detail on 8/1/2017. Next:@kruger will write up the detailed plan in kokkos/kokkos#878 and then track work there ...

Description:

The native Kokkos Makefile system takes advantage of fairly sophisticated makefile logic to define compilers, compiler options, and libraries given the input variables:

  • KOKKOS_ARCH
  • KOKKOS_DEBUG
  • KOKKS_CXX_STANDARD
  • etc. (could be more)

All of this logic is contain in the file kokkos/Makefile.kokkos shown at:

  • https://github.com/kokkos/kokkos/blob/master/Makefile.kokkos

and this is in the Trilinos snapshot of kokkos shown here:

  • https://github.com/trilinos/Trilinos/blob/develop/packages/kokkos/Makefile.kokkos

The goal is to leverage kokkos/Makefile.kokkos as much as possible in the CMake build system for Kokkos under Trilinos. We want the Trilinos CMake build of kokkos to produce, as much as possible, to create identical build lines to what the native Kokkos makefile system does.

The process might be to to:

  1. Define CMake cache Trilinos_ARCH (and other already-defined Trilinos CMake vars) and then set the Kokkos input vars shown above.

  2. Execute a dummy makefile pulling in Makefile.kokkos and extracting the out KOKKOS_CXXFLAGS, KOKKOS_LDFLAGS, etc., and the generated file KokkosCore_config.h file (and use it for the Kokkos_config.h file).

  3. Set CMAKE_CXX_FLAGS, etc. using these outputs.

I think this needs to be done at the global level during the env probing (so it might need a new TriBITS callback function). But we will have to see.

Repos, Issues, PRs, and Branches:

The ATDM Tools & Dev Env issue tracking this work is:

  • https://software-srn.sandia.gov/jira/browse/ATDV-90

The three GitHub repos, Issues, PRs, and branches involved are:

  • Trilinos: git@github.com:trilinos/Trilinos.git

    • Issue: https://github.com/trilinos/Trilinos/pull/1400
    • PR: https://github.com/trilinos/Trilinos/pull/1884
    • Branch: https://github.com/Tech-XCorp/Trilinos/tree/trilinos-kokkos-1400 (fork of trilinos/Trilinos) (Currently the branch trilinos-kokkos-1400 is merged into the branch https://github.com/trilinos/Trilinos/tree/kokkos-promotion and will be merged to develop as part of merging kokkos-promotion).
  • TriBITS: git@github.com:TriBITSPub/TriBITS.git

    • Issue: https://github.com/TriBITSPub/TriBITS/issues/207 [Closed]
    • PR: https://github.com/TriBITSPub/TriBITS/pull/233 [Merged]
    • Branch: https://github.com/TriBITSPub/TriBITS/tree/kokkos-config-207 [Merged]
  • kokkos: git@github.com:kokkos/kokkos.git

    • Issue: https://github.com/kokkos/kokkos/issues/878 [Closed]
    • PR: https://github.com/kokkos/kokkos/pull/1106 [Merged]
    • Branch: https://github.com/Tech-XCorp/kokkos/tree/issue-878 (fork of kokkos/kokkos) [Merged]

To setup the repos and branches from scratch, do:

$ git clone git@github.com:trilinos/Trilinos.git
$ cd Trilinos/
$ git remote add tech-xcorp git@github.com:Tech-XCorp/Trilinos.git
$ git fetch tech-xcorp
$ git checkout --track tech-xcorp/trilinos-kokkos-1400

$ git clone git@github.com:TriBITSPub/TriBITS.git
$ cd TriBITS/
$ git checkout --track origin/kokkos-config-207
$ cd ..

$ git clone git@github.com:kokkos/kokkos.git
$ cd kokkos/
$ git remote add tech-xcorp git@github.com:Tech-XCorp/kokkos.git
$ git fetch tech-xcorp
$ git checkout --track tech-xcorp/issue-878 
$ cd ..

With that setup, you should see:

$ ./cmake/tribits/python_utils/gitdist --dist-repos=.,TriBITS,kokkos dist-repo-status
---------------------------------------------------------------------------------------------
| ID | Repo Dir        | Branch               | Tracking Branch                 | C | M | ? |
|----|-----------------|----------------------|---------------------------------|---|---|---|
|  0 | Trilinos (Base) | trilinos-kokkos-1400 | tech-xcorp/trilinos-kokkos-1400 |   |   |   |
|  1 | TriBITS         | kokkos-config-207    | orign/kokkos-config-207         |   |   |   |
|  2 | kokkos          | issue-878            | tech-xcorp/issue-878            |   |   |   |
---------------------------------------------------------------------------------------------

With that, one can configure and bulid Trilinos using the version of TriBITS and kokkos in those branches by adding the cmake configure options:

$ cmake \
  -DTrilinos_TRIBITS_DIR:STRING=TriBITS/tribits \
  -DKokkos_SOURCE_DIR_OVERRIDE:STRING=kokkos \
  [option options] \
  ${TRILINOS_SRC_DIR}
Assignee
Assign to
Time tracking