Skip to content

Commit

Permalink
Merge pull request QMCPACK#4687 from ye-luo/update-sunspot
Browse files Browse the repository at this point in the history
Free MKL reserved memory before the SYCL queue destruction.
  • Loading branch information
prckent committed Jul 27, 2023
2 parents 19c5834 + 18457ba commit 8658ea9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
7 changes: 4 additions & 3 deletions config/build_alcf_sunspot_icpx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# build_alcf_sunspot_icpx.sh <source_dir> <install_dir> # build all the variants with a given source directory <source_dir> and install to <install_dir>

module load spack libxml2 cmake
module load cray-hdf5/1.12.2.1
module load oneapi/eng-compiler/2023.05.15.003
module load cray-hdf5
module load oneapi/eng-compiler/2023.05.15.007

module list >& module_list.txt

Expand All @@ -23,7 +23,7 @@ echo "**********************************"

TYPE=Release
Machine=sunspot
Compiler=icpx20230510
Compiler=icpx20230613

if [[ $# -eq 0 ]]; then
source_folder=`pwd`
Expand All @@ -46,6 +46,7 @@ for name in offload_sycl_real_MP offload_sycl_real offload_sycl_cplx_MP offload_
do

CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=$TYPE -DMPIEXEC_PREFLAGS='--cpu-bind;depth;-d;8'"
unset CMAKE_CXX_FLAGS

if [[ $name == *"cplx"* ]]; then
CMAKE_FLAGS="$CMAKE_FLAGS -DQMC_COMPLEX=ON"
Expand Down
7 changes: 5 additions & 2 deletions src/Platforms/SYCL/syclSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
#ifndef QMCPLUSPLUS_SYCL_MKL_SOLVER_H
#define QMCPLUSPLUS_SYCL_MKL_SOLVER_H

#include "oneapi/mkl/lapack.hpp"
#include <oneapi/mkl/lapack.hpp>
#include <mkl_service.h>

namespace qmcplusplus
{
namespace syclSolver
{
using namespace oneapi::mkl::lapack;
}

inline void freeBuffer() { mkl_free_buffers(); }
} // namespace syclSolver
} // namespace qmcplusplus

#endif
2 changes: 1 addition & 1 deletion src/QMCWaveFunctions/Fermion/DelayedUpdateSYCL.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class DelayedUpdateSYCL
/// default constructor
DelayedUpdateSYCL() : delay_count(0) { m_queue_ = DeviceManager::getGlobal().getSYCLDM().createQueueDefaultDevice(); }

~DelayedUpdateSYCL() {}
~DelayedUpdateSYCL() { syclSolver::freeBuffer(); }

/** resize the internal storage
* @param norb number of electrons/orbitals
Expand Down

0 comments on commit 8658ea9

Please sign in to comment.