Skip to content

Commit

Permalink
fixing bugs in destructor of LUstruct_v100
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyangzhuan committed Oct 21, 2023
1 parent eef70c7 commit b19bce4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion SRC/TRF3dV100/batch_factorize.cu
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,9 @@ void freeBatchFactorizeWorkspace(BatchFactorizeWorkspace* ws)
gpuErrchk( cudaFree(d_localLU.Unzval_br_new_dat) );
gpuErrchk( cudaFree(d_localLU.Unzval_br_new_offset) );
gpuErrchk( cudaFree(d_localLU.Unzval_br_new_ptr) );

#ifdef HAVE_MAGMA
magma_queue_destroy(ws->magma_queue);
#endif
cublasDestroy( ws->cuhandle );
gpuErrchk( cudaStreamDestroy(ws->stream) );
}
Expand Down
5 changes: 4 additions & 1 deletion SRC/TRF3dV100/lupanels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,16 @@ struct LUstruct_v100

for (int_t i = 0; i < CEILING(nsupers, Pc); ++i)
if (i * Pc + mycol < nsupers && isNodeInMyGrid[i * Pc + mycol] == 1){
SUPERLU_FREE(lPanelVec[i].index);
if(lPanelVec[i].index)
SUPERLU_FREE(lPanelVec[i].index);
// SUPERLU_FREE(lPanelVec[i].val);
}

for (int_t i = 0; i < CEILING(nsupers, Pr); ++i)
if (i * Pr + myrow < nsupers && isNodeInMyGrid[i * Pr + myrow] == 1){
if(uPanelVec[i].index)
SUPERLU_FREE(uPanelVec[i].index);
if(uPanelVec[i].val)
SUPERLU_FREE(uPanelVec[i].val);
}

Expand Down
6 changes: 3 additions & 3 deletions example_scripts/run_cmake_build_perlmutter_gcc_nvshmem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH//\/usr\/local\/cuda-11.7\/compat:/}
NVSHMEM_HOME=/global/cfs/cdirs/m3894/lib/PrgEnv-gnu/nvshmem_src_2.8.0-3/build/
#NVSHMEM_HOME=${CRAY_NVIDIA_PREFIX}/comm_libs/nvshmem/
cmake .. \
-DCMAKE_C_FLAGS="-O2 -DGPU_SOLVE -std=c11 -DPRNTlevel=0 -DPROFlevel=0 -DDEBUGlevel=0 -DAdd_" \
-DCMAKE_CXX_FLAGS="-O2" \
-DCMAKE_Fortran_FLAGS="-O2" \
-DCMAKE_C_FLAGS="-DGPU_SOLVE -std=c11 -DPRNTlevel=0 -DPROFlevel=0 -DDEBUGlevel=0 -DAdd_" \
-DCMAKE_CXX_FLAGS="" \
-DCMAKE_Fortran_FLAGS="" \
-DCMAKE_CXX_COMPILER=CC \
-DCMAKE_C_COMPILER=cc \
-DCMAKE_Fortran_COMPILER=ftn \
Expand Down

0 comments on commit b19bce4

Please sign in to comment.