diff --git a/coreneuron/gpu/nrn_acc_manager.cpp b/coreneuron/gpu/nrn_acc_manager.cpp index 9b0e74968..4ac6d48cc 100644 --- a/coreneuron/gpu/nrn_acc_manager.cpp +++ b/coreneuron/gpu/nrn_acc_manager.cpp @@ -610,6 +610,12 @@ void update_nrnthreads_on_host(NrnThread* threads, int nthreads) { int is_art = corenrn.get_is_artificial()[type]; int layout = corenrn.get_mech_data_layout()[type]; + // PatternStim is a special mechanim of type artificial cell + // and it's not copied on GPU. So we shouldn't update it from GPU. + if (type == nrn_get_mechtype("PatternStim")) { + continue; + } + int pcnt = nrn_soa_padded_size(n, layout) * szp; acc_update_self(ml->data, pcnt * sizeof(double));