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

Fix CUDA and Albany builds from prior PR #1533 #4252

Merged
merged 1 commit into from
Jan 24, 2019

Conversation

MicheldeMessieres
Copy link
Contributor

@trilinos/zoltan2

Description

Repairs issues from PR #1533 for directory work.
Resolved CUDA tests and Albany link failure.

Motivation and Context

Restore CUDA builds and Albany build.

How Has This Been Tested?

On white:
source $TRILINOS_DIR/cmake/std/atdm/load-env.sh cuda-9.2-gnu-7.2.0-release-debug
$ cmake
-GNinja
-DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/atdm/ATDMDevEnv.cmake
-DTrilinos_ENABLE_TESTS=ON -DTrilinos_ENABLE_Zoltan2=ON
$TRILINOS_DIR
$ bsub -x -Is -q rhel7F -n 16 ctest -j16

On clang parallel and serial.

Checklist

  • My commit messages mention the appropriate GitHub issue numbers.
  • My code follows the code style of the affected package(s).
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the code contribution guidelines for this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • No new compiler warnings were introduced. Except CUDA.
  • These changes break backwards compatibility.

Switch Kokkos::unordered_map to std::unordered_map as
further work needs to be done resolving types first.

Copy murmur hash code in directly to remove link error
for Albany. To remove/refactor later for Kokkos development.

Disabled one new test that needs modification to work
with unordered map.
@bartlettroscoe bartlettroscoe added the stage: in progress Work on the issue has started label Jan 23, 2019
@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging
WARNING: NO REVIEWERS HAVE BEEN REQUESTED FOR THIS PULL REQUEST!

@MicheldeMessieres
Copy link
Contributor Author

This PR will resolve #4244 and #4246

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging
NO REVIEWS HAVE BEEN PERFORMED ON THIS PULL REQUEST!

}
}

// TODO: Restore Kokkos unordered_map
Copy link
Contributor

Choose a reason for hiding this comment

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

You could have just used a HostSpace version of Kokkos::UnorderedMap, but just using a standard library class should be fine too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mhoemmen Thanks for reviewing this. Did not think of doing the host space which would have been easier. We are planning to do further development to use kokkos so eventually I'll be converting this back once I resolve some std::vector issues.

@@ -250,8 +261,10 @@ class Zoltan2_Directory {

// originally the nodes are stored in a hash but in the new Kokkos mode
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment doesn't apply any more, but I want this fix to get in, so OK.

// TODO: Will be removed as Kokkos form develops
#define ZOLTAN2_ROTL32(x,r) (uint32_t) \
(((uint32_t)(x) << (int8_t)(r)) | ((uint32_t)(x) >> (32 - (int8_t)(r))))
static inline void Zoltan2_MurmurHash3_x86_32 ( const void * key, int len,
Copy link
Contributor

Choose a reason for hiding this comment

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

The idiomatic way to have a static (internal linkage) function in C++ is to put it in an anonymous namespace, like this:

namespace { // (anonymous)
  void foo () {
    whatever_code ();
  }
} // namespace (anonymous)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will fix this.

FAIL_REGULAR_EXPRESSION "FAIL"
)

# Temporarily disabling this to resolve cuda build issues.
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the above changes have fixed the build errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was just one of the issues - but was a new test with some complications so I just disabled. However if i use your suggestion of Host space for the unordered map I should be able to restore this as well.

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging
THE LAST COMMIT TO THIS PULL REQUEST HAS BEEN REVIEWED, BUT NOT ACCEPTED OR REQUIRES CHANGES

Copy link
Contributor

@mhoemmen mhoemmen left a comment

Choose a reason for hiding this comment

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

Approving for the sake of Albany, but does that disabled test actually work now?

@MicheldeMessieres
Copy link
Contributor Author

@mhoemmen Thanks for the assistance on the review. I will make a follow up PR to implement your suggested changes.

@mhoemmen
Copy link
Contributor

@MicheldeMessieres Thanks! Does the test actually build and pass with CUDA?

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Test Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ mhoemmen ]!

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects:

Pull Request Auto Testing STARTING (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_4.8.4

  • Build Num: 2303
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.8.4
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 4252
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH fixDirectoryCuda
TRILINOS_SOURCE_REPO https:/Tech-XCorp/Trilinos
TRILINOS_SOURCE_SHA f5713c2
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https:/trilinos/Trilinos
TRILINOS_TARGET_SHA bb251b1

Build Information

Test Name: Trilinos_pullrequest_intel_17.0.1

  • Build Num: 2104
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PULLREQUESTNUM 4252
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH fixDirectoryCuda
TRILINOS_SOURCE_REPO https:/Tech-XCorp/Trilinos
TRILINOS_SOURCE_SHA f5713c2
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https:/trilinos/Trilinos
TRILINOS_TARGET_SHA bb251b1

Build Information

Test Name: Trilinos_pullrequest_gcc_4.9.3_SERIAL

  • Build Num: 594
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PULLREQUESTNUM 4252
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH fixDirectoryCuda
TRILINOS_SOURCE_REPO https:/Tech-XCorp/Trilinos
TRILINOS_SOURCE_SHA f5713c2
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https:/trilinos/Trilinos
TRILINOS_TARGET_SHA bb251b1

Build Information

Test Name: Trilinos_pullrequest_gcc_7.2.0

  • Build Num: 210
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PULLREQUESTNUM 4252
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH fixDirectoryCuda
TRILINOS_SOURCE_REPO https:/Tech-XCorp/Trilinos
TRILINOS_SOURCE_SHA f5713c2
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https:/trilinos/Trilinos
TRILINOS_TARGET_SHA bb251b1

Using Repos:

Repo: TRILINOS (Tech-XCorp/Trilinos)
  • Branch: fixDirectoryCuda
  • SHA: f5713c2
  • Mode: TEST_REPO

Pull Request Author: MicheldeMessieres

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED

Pull Request Auto Testing has PASSED (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_4.8.4

  • Build Num: 2303
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.8.4
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 4252
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH fixDirectoryCuda
TRILINOS_SOURCE_REPO https:/Tech-XCorp/Trilinos
TRILINOS_SOURCE_SHA f5713c2
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https:/trilinos/Trilinos
TRILINOS_TARGET_SHA bb251b1

Build Information

Test Name: Trilinos_pullrequest_intel_17.0.1

  • Build Num: 2104
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PULLREQUESTNUM 4252
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH fixDirectoryCuda
TRILINOS_SOURCE_REPO https:/Tech-XCorp/Trilinos
TRILINOS_SOURCE_SHA f5713c2
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https:/trilinos/Trilinos
TRILINOS_TARGET_SHA bb251b1

Build Information

Test Name: Trilinos_pullrequest_gcc_4.9.3_SERIAL

  • Build Num: 594
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PULLREQUESTNUM 4252
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH fixDirectoryCuda
TRILINOS_SOURCE_REPO https:/Tech-XCorp/Trilinos
TRILINOS_SOURCE_SHA f5713c2
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https:/trilinos/Trilinos
TRILINOS_TARGET_SHA bb251b1

Build Information

Test Name: Trilinos_pullrequest_gcc_7.2.0

  • Build Num: 210
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PULLREQUESTNUM 4252
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH fixDirectoryCuda
TRILINOS_SOURCE_REPO https:/Tech-XCorp/Trilinos
TRILINOS_SOURCE_SHA f5713c2
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https:/trilinos/Trilinos
TRILINOS_TARGET_SHA bb251b1


CDash Test Results for PR# 4252.

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ mhoemmen ]!

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - AutoMerge IS ENABLED, but the Label AT: AUTOMERGE is not set. Either set Label AT: AUTOMERGE or manually merge the PR...

@MicheldeMessieres MicheldeMessieres merged commit cfce99e into trilinos:develop Jan 24, 2019
@bartlettroscoe bartlettroscoe removed the stage: in progress Work on the issue has started label Jan 24, 2019
@MicheldeMessieres
Copy link
Contributor Author

@MicheldeMessieres Thanks! Does the test actually build and pass with CUDA?

@mhoemmen To confirm tests were building and passing with CUDA which I tested on white. The PR fix is now merged.

@MicheldeMessieres
Copy link
Contributor Author

@kddevin @mhoemmen I will set up another PR today to restore the new test we added and implement Mark's suggestions. Using the Kokkos unordered map with HostSpace also worked fine for the CUDA white build.

@mhoemmen
Copy link
Contributor

@MicheldeMessieres As long as the test is restored and passes with CUDA, I'm fine. It's not clear whether Kokkos::UnorderedMap would be faster for the sequential CPU case, so unless you plan on parallelizing the code, I wouldn't worry about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants