Skip to content

Commit

Permalink
removed cudaSetDevice in setLUstruct_GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyangzhuan committed Aug 16, 2024
1 parent e424af2 commit 1771d39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SRC/CplusplusFactor/schurCompUpdate_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -696,12 +696,12 @@ int_t xLUstruct_t<Ftype>::setLUstruct_GPU()
A_gpu.Pc = Pc;
A_gpu.maxSuperSize = ldt;

/* Sherry: this mapping may be inefficient on Frontier */
/* Sherry: this mapping may be inefficient on Frontier. Yang: I commented it out as the mapping can be set by env SUPERLU_BIND_MPI_GPU in superlu_gridinit3d */
/*Mapping to device*/
int deviceCount;
cudaGetDeviceCount(&deviceCount); // How many GPUs?
int device_id = grid3d->iam % deviceCount;
cudaSetDevice(device_id);
// int device_id = grid3d->iam % deviceCount;
// cudaSetDevice(device_id);

double tRegion[5];
size_t useableGPUMem = getGPUMemPerProcs(grid3d->comm);
Expand Down
File renamed without changes.

0 comments on commit 1771d39

Please sign in to comment.