Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 7cb13a1

Browse files
author
Pramod Kumbhar
committed
free should happen after omp_target_disassociate_ptr
1 parent afc45bf commit 7cb13a1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: coreneuron/gpu/nrn_acc_manager.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,8 @@ void cnrn_target_delete(void* h_ptr, size_t len) {
8282
{
8383
d_ptr = h_ptr;
8484
}
85-
// todo: disassociate first or free first
86-
omp_target_free(d_ptr, device_id);
8785
omp_target_disassociate_ptr(h_ptr, device_id);
86+
omp_target_free(d_ptr, device_id);
8887
#else
8988
throw std::runtime_error("cnrn_target_delete() not implemented without OpenACC/OpenMP and gpu build");
9089
#endif

0 commit comments

Comments
 (0)