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

Feature sparse ILU(k) #459

Merged
merged 11 commits into from
Nov 6, 2019
Merged

Feature sparse ILU(k) #459

merged 11 commits into from
Nov 6, 2019

Conversation

vqd8a
Copy link
Contributor

@vqd8a vqd8a commented Aug 27, 2019

spiluk: Kokkos-based sparse ILU(k) routines. This is an initial commit with sparse ILU(k) handle, symbolic, and numeric routines + ETI infrastructure. Two implementations are done using RangePolicy and TeamPolicy. All components are placed in Experimental namespace.

@vqd8a vqd8a requested a review from srajama1 August 27, 2019 16:16
@vqd8a vqd8a marked this pull request as ready for review August 27, 2019 19:47
@vqd8a
Copy link
Contributor Author

vqd8a commented Sep 5, 2019

@srajama1 It is ready for your review. Thanks.

perf_test/sparse/KokkosSparse_spiluk.cpp Outdated Show resolved Hide resolved
perf_test/sparse/KokkosSparse_spiluk.cpp Outdated Show resolved Hide resolved
perf_test/sparse/KokkosSparse_spiluk.cpp Outdated Show resolved Hide resolved
perf_test/sparse/KokkosSparse_spiluk.cpp Outdated Show resolved Hide resolved
if ( my_team == 0 ) L_values(k) = fact;

team.team_barrier();

Kokkos::parallel_for( Kokkos::TeamThreadRange( team, U_row_map(prev_row)+1, U_row_map(prev_row+1) ), [&] ( const long kk ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could U_row_map(prev_row) be unsigned? If so, then this might emit build warnings, since it would cast from unsigned to signed (long). Also, long is almost never the right type for anything. (It's not even 64 bits on some platforms.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @mhoemmen for pointing it out. I fixed it in the new commit.

@@ -382,8 +385,8 @@ void iluk_numeric ( IlukHandle& thandle,

HandleDeviceEntriesType level_idx = thandle.get_level_idx();

typedef Kokkos::View< nnz_lno_t**, Kokkos::LayoutLeft, Kokkos::Device<execution_space,memory_space> > WorkViewType;

typedef Kokkos::View< nnz_lno_t**, Kokkos::Device<execution_space,memory_space> > WorkViewType;
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer C++11 - style using over typedef:

using WorkViewType = Kokkos::View<nnz_lno_t**, Kokkos::Device<execution_space,memory_space>>;

Note that C++11 permits the two trailing >> to be next to each other. You don't need to leave a space between them.

Copy link
Contributor Author

@vqd8a vqd8a Sep 30, 2019

Choose a reason for hiding this comment

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

Thanks @mhoemmen . I replaced typedefwith using in the new commit.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @vqd8a !

@vqd8a
Copy link
Contributor Author

vqd8a commented Oct 2, 2019

Spotcheck on White passed: ../kokkos-kernels/scripts/test_all_sandia --spot-check --with-cuda-options=enable_lambda --arch=Power8,Pascal60

Running on machine: white
Going to test compilers:  gcc/6.4.0 gcc/7.2.0 ibm/16.1.0 cuda/9.2.88 cuda/10.0.130
Testing compiler gcc/6.4.0
Testing compiler gcc/7.2.0
  Starting job gcc-7.2.0-OpenMP-release
  Starting job gcc-6.4.0-OpenMP_Serial-release
  PASSED gcc-7.2.0-OpenMP-release
  Starting job gcc-7.2.0-Serial-release
  PASSED gcc-6.4.0-OpenMP_Serial-release
Testing compiler ibm/16.1.0
  Starting job gcc-7.2.0-OpenMP_Serial-release
  PASSED gcc-7.2.0-Serial-release
Testing compiler cuda/9.2.88
  Starting job ibm-16.1.0-Serial-release
  PASSED gcc-7.2.0-OpenMP_Serial-release
  PASSED ibm-16.1.0-Serial-release
Testing compiler cuda/10.0.130
  Starting job cuda-9.2.88-Cuda_OpenMP-release
  PASSED cuda-9.2.88-Cuda_OpenMP-release
  Starting job cuda-10.0.130-Cuda_Serial-release
  PASSED cuda-10.0.130-Cuda_Serial-release
#######################################################
PASSED TESTS
#######################################################
cuda-10.0.130-Cuda_Serial-release build_time=1191 run_time=285
cuda-9.2.88-Cuda_OpenMP-release build_time=1234 run_time=219
gcc-6.4.0-OpenMP_Serial-release build_time=550 run_time=333
gcc-7.2.0-OpenMP-release build_time=389 run_time=136
gcc-7.2.0-OpenMP_Serial-release build_time=666 run_time=364
gcc-7.2.0-Serial-release build_time=252 run_time=188
ibm-16.1.0-Serial-release build_time=1373 run_time=262
#######################################################
FAILED TESTS
#######################################################

Spotcheck on Bowman passed: ../kokkos-kernels/scripts/test_all_sandia --spot-check

Running on machine: bowman
Going to test compilers:  intel/16.4.258 intel/17.2.174 intel/18.2.199
Testing compiler intel/16.4.258
  Starting job intel-16.4.258-Serial-release
  Starting job intel-16.4.258-Pthread-release
  PASSED intel-16.4.258-Serial-release
Testing compiler intel/17.2.174
  Starting job intel-16.4.258-Pthread_Serial-release
  PASSED intel-16.4.258-Pthread-release
  Starting job intel-17.2.174-OpenMP-release
  PASSED intel-17.2.174-OpenMP-release
  Starting job intel-17.2.174-Pthread-release
  PASSED intel-16.4.258-Pthread_Serial-release
  Starting job intel-17.2.174-Serial-release
  PASSED intel-17.2.174-Pthread-release
  Starting job intel-17.2.174-OpenMP_Serial-release
  PASSED intel-17.2.174-Serial-release
Testing compiler intel/18.2.199
  Starting job intel-17.2.174-Pthread_Serial-release
  PASSED intel-17.2.174-OpenMP_Serial-release
  Starting job intel-18.2.199-OpenMP-release
  PASSED intel-17.2.174-Pthread_Serial-release
  Starting job intel-18.2.199-Pthread-release
  PASSED intel-18.2.199-OpenMP-release
  Starting job intel-18.2.199-Serial-release
  PASSED intel-18.2.199-Pthread-release
  Starting job intel-18.2.199-OpenMP_Serial-release
  PASSED intel-18.2.199-Serial-release
  Starting job intel-18.2.199-Pthread_Serial-release
  PASSED intel-18.2.199-OpenMP_Serial-release
  PASSED intel-18.2.199-Pthread_Serial-release
#######################################################
PASSED TESTS
#######################################################
intel-16.4.258-Pthread-release build_time=1540 run_time=585
intel-16.4.258-Pthread_Serial-release build_time=2521 run_time=1258
intel-16.4.258-Serial-release build_time=1481 run_time=620
intel-17.2.174-OpenMP-release build_time=1989 run_time=371
intel-17.2.174-OpenMP_Serial-release build_time=2940 run_time=1098
intel-17.2.174-Pthread-release build_time=1340 run_time=618
intel-17.2.174-Pthread_Serial-release build_time=2480 run_time=1260
intel-17.2.174-Serial-release build_time=1411 run_time=655
intel-18.2.199-OpenMP-release build_time=1612 run_time=407
intel-18.2.199-OpenMP_Serial-release build_time=2859 run_time=1001
intel-18.2.199-Pthread-release build_time=1237 run_time=624
intel-18.2.199-Pthread_Serial-release build_time=2450 run_time=1217
intel-18.2.199-Serial-release build_time=1217 run_time=663
#######################################################
FAILED TESTS
#######################################################

@vqd8a
Copy link
Contributor Author

vqd8a commented Oct 2, 2019

@srajama1 Spotchecks passed. Could you please merge when you have time? Thanks.

@srajama1
Copy link
Contributor

srajama1 commented Oct 3, 2019

This requires a thumbs up from @mhoemmen

@vqd8a
Copy link
Contributor Author

vqd8a commented Oct 8, 2019

@mhoemmen could you please review this? so that we can merge. Thanks.

@mhoemmen
Copy link
Contributor

mhoemmen commented Oct 9, 2019

There are 536 files to review; I would need a P/T for that kind of work and I'd prefer not to approve blindly. You can approve it yourself.

@vqd8a
Copy link
Contributor Author

vqd8a commented Oct 22, 2019

@srajama1 in this case, could you please consider merging? Thanks.

Copy link
Contributor

@srajama1 srajama1 left a comment

Choose a reason for hiding this comment

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

Some minor comments for next round, this can go in as it is.

class UEntriesType,
class UValuesType>
void iluk_numeric ( IlukHandle& thandle,
const ARowMapType& A_row_map,
Copy link
Contributor

Choose a reason for hiding this comment

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

Might need a refactor, not just here in other places as well, to use the Crsmatrix instead of the three pointers .

@@ -0,0 +1,65 @@
/*
//@HEADER
// ************************************************************************
Copy link
Contributor

Choose a reason for hiding this comment

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

Could add cusparse here for ILU(0) only.

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.

3 participants