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

Commit 0887738

Browse files
committed
Fixed openacc async
1 parent 9d47b67 commit 0887738

7 files changed

Lines changed: 11 additions & 11 deletions

File tree

coreneuron/gpu/nrn_acc_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ void update_net_receive_buffer(NrnThread* nt) {
655655
}
656656
}
657657
}
658-
nrn_pragma_acc(wait(nt->streams[nt->stream_id]))
658+
nrn_pragma_acc(wait async(nt->streams[nt->stream_id]))
659659
nrn_pragma_omp(taskwait)
660660
}
661661

coreneuron/network/netcvode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,15 +561,15 @@ void NetCvode::check_thresh(NrnThread* nt) { // for default method
561561
nt->_net_send_buffer[idx] = i;
562562
}
563563
}
564-
nrn_pragma_acc(wait(nt->streams[nt->stream_id]))
564+
nrn_pragma_acc(wait async(nt->streams[nt->stream_id]))
565565
nt->_net_send_buffer_cnt = net_send_buf_count;
566566

567567
if (nt->compute_gpu && nt->_net_send_buffer_cnt) {
568568
#ifdef CORENEURON_ENABLE_GPU
569569
int* nsbuffer = nt->_net_send_buffer;
570570
#endif
571571
nrn_pragma_acc(update host(nsbuffer [0:nt->_net_send_buffer_cnt]) async(nt->streams[nt->stream_id]))
572-
nrn_pragma_acc(wait(nt->streams[nt->stream_id]))
572+
nrn_pragma_acc(wait async(nt->streams[nt->stream_id]))
573573
nrn_pragma_omp(target update from(nsbuffer [0:nt->_net_send_buffer_cnt]))
574574
}
575575

coreneuron/network/partrans.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void nrnmpi_v_transfer() {
7171
for (int tid = 0; tid < nrn_nthread; ++tid) {
7272
if (nrn_threads[tid].compute_gpu) {
7373
compute_gpu = true;
74-
nrn_pragma_acc(wait(nrn_threads[tid].streams[nrn_threads[tid].stream_id]))
74+
nrn_pragma_acc(wait async(nrn_threads[tid].streams[nrn_threads[tid].stream_id]))
7575
nrn_pragma_omp(taskwait)
7676
}
7777
TransferThreadData& ttd = transfer_thread_data_[tid];

coreneuron/permute/cellorder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ void solve_interleaved2(int ith) {
626626
} // serial test mode
627627
#endif
628628
}
629-
nrn_pragma_acc(wait(nt->streams[nt->stream_id]))
629+
nrn_pragma_acc(wait async(nt->streams[nt->stream_id]))
630630
#ifdef _OPENACC
631631
}
632632
#endif
@@ -667,7 +667,7 @@ void solve_interleaved1(int ith) {
667667
triang_interleaved(nt, icell, icellsize, nstride, stride, lastnode);
668668
bksub_interleaved(nt, icell, icellsize, nstride, stride, firstnode);
669669
}
670-
nrn_pragma_acc(wait(nt->streams[nt->stream_id]))
670+
nrn_pragma_acc(wait async(nt->streams[nt->stream_id]))
671671
}
672672

673673
void solve_interleaved(int ith) {

coreneuron/sim/fadvance_core.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void nrncore2nrn_send_values(NrnThread* nth) {
319319
async(nth->streams[nth->stream_id]))
320320
nrn_pragma_omp(target update from(gather_i [0:1]) if (nth->compute_gpu))
321321
}
322-
nrn_pragma_acc(wait(nth->streams[nth->stream_id]))
322+
nrn_pragma_acc(wait async(nth->streams[nth->stream_id]))
323323
nrn_pragma_omp(taskwait)
324324
for (int i = 0; i < tr->n_trajec; ++i) {
325325
*(tr->scatter[i]) = *(tr->gather[i]);
@@ -343,7 +343,7 @@ static void* nrn_fixed_step_thread(NrnThread* nth) {
343343
/*@todo: do we need to update nth->_t on GPU: Yes (Michael, but can
344344
launch kernel) */
345345
nrn_pragma_acc(update device(nth->_t) if (nth->compute_gpu) async(nth->streams[nth->stream_id]))
346-
nrn_pragma_acc(wait(nth->streams[nth->stream_id]))
346+
nrn_pragma_acc(wait async(nth->streams[nth->stream_id]))
347347
nrn_pragma_omp(target update to(nth->_t) if (nth->compute_gpu))
348348
fixed_play_continuous(nth);
349349

@@ -379,7 +379,7 @@ void* nrn_fixed_step_lastpart(NrnThread* nth) {
379379
if (nth->ncell) {
380380
/*@todo: do we need to update nth->_t on GPU */
381381
nrn_pragma_acc(update device(nth->_t) if (nth->compute_gpu) async(nth->streams[nth->stream_id]))
382-
nrn_pragma_acc(wait(nth->streams[nth->stream_id]))
382+
nrn_pragma_acc(wait async(nth->streams[nth->stream_id]))
383383
nrn_pragma_omp(target update to(nth->_t) if (nth->compute_gpu))
384384
fixed_play_continuous(nth);
385385
nonvint(nth);

coreneuron/sim/solve_core.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void bksub(NrnThread* _nt) {
7575
}
7676

7777
if (_nt->compute_gpu) {
78-
nrn_pragma_acc(wait(_nt->streams[_nt->stream_id]))
78+
nrn_pragma_acc(wait async(_nt->streams[_nt->stream_id]))
7979
}
8080
}
8181
} // namespace coreneuron

external/nmodl

0 commit comments

Comments
 (0)