You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.
Calculation of the magnetic dipole has long been implemented with mod files with main calculation being
RANGE ri, ia, Q, ztan
POINTER pv, Qtotal
AFTER SOLVE {
ia = (pv - v) / ri : axial current: ri - axial resistance, pv - pointer to parent compartment voltage
Q = ia * ztan : contribution of axial current of this compartment to magnetic dipole
Qtotal = Qtotal + Q : Qtotal is pointer to magnetic dipole of entire cell
}
Qtotal points to a range variable in a POINT_PROCESS inserted in the cell. That variable is recorded into a Vector, and at the end
of the simulation, the vectors for each cell are added together to give the total network dipole trajectory.
CoreNEURON reduces the simulation time relative to NEURON on x86_64 by a factor of two because of loop vectorization (using the intel compiler) but one must manually comment out _PRAGMA_FOR_VECTOR_LOOP_ in the translated dipole.cpp to get correct results.
So the question is twofold. What needs to be done so that Qtotal = Qtotal + Q is essentially atomic so that the above PRAGMA is safe and that there is chance of this working on GPU? Currently there is a PROTECT stmt but that is implemented for pthreads
and isn't quite right as Qtotal points to different memory locations in each cell.
The magnetic dipole calculation is reminiscent of LFP calculations but I don't think the rarity of the former justifies an independent internal implementation as is done with membane current. Also, the notion of a mod file reduction variable is generic and so, I think, justifies proper NMODL support, though calling it a POINTER is perhaps open. In this case the reduction variable, QTotal.q exists on a per cell basis but...
The text was updated successfully, but these errors were encountered:
Calculation of the magnetic dipole has long been implemented with mod files with main calculation being
Qtotal points to a range variable in a POINT_PROCESS inserted in the cell. That variable is recorded into a Vector, and at the end
of the simulation, the vectors for each cell are added together to give the total network dipole trajectory.
CoreNEURON reduces the simulation time relative to NEURON on x86_64 by a factor of two because of loop vectorization (using the intel compiler) but one must manually comment out
_PRAGMA_FOR_VECTOR_LOOP_
in the translated dipole.cpp to get correct results.So the question is twofold. What needs to be done so that
Qtotal = Qtotal + Q
is essentially atomic so that the above PRAGMA is safe and that there is chance of this working on GPU? Currently there is aPROTECT stmt
but that is implemented for pthreadsand isn't quite right as Qtotal points to different memory locations in each cell.
The magnetic dipole calculation is reminiscent of LFP calculations but I don't think the rarity of the former justifies an independent internal implementation as is done with membane current. Also, the notion of a mod file reduction variable is generic and so, I think, justifies proper NMODL support, though calling it a POINTER is perhaps open. In this case the reduction variable,
QTotal.q
exists on a per cell basis but...The text was updated successfully, but these errors were encountered: