I compile my program and it gives the following error:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
I isolated the problem and it is occurring at the call of the mkl_sparse_d_mv function of the following function:
function dVdt(self, t, V)
class(MotorUnitPool), intent(inout) :: self
real(wp), intent(in) :: t
real(wp), intent(in) :: V(:)
real(wp), dimension(self%totalNumberOfCompartments) :: dVdt
integer :: i, j, stat
real(wp), dimension(:), allocatable :: matInt
allocate(matInt(self%totalNumberOfCompartments))
do i = 1, self%MUnumber
do j = 1, self%unit(i)%compNumber
self%iIonic((i-1)*self%unit(i)%compNumber+j) = self%unit(i)%Compartments(j)%computeCurrent(t, V((i-1)*self%unit(i)%compNumber+j))
end do
end do
stat = mkl_sparse_d_mv(self%spOperation, &
self%spAlpha, &
self%GSp, &
self%spDescr, &
V, &
self%spBeta, &
matInt)
dVdt = (self%iIonic + matInt + self%iInjected + self%EqCurrent_nA) * self%capacitanceInv
end function
I compile with gfortran without any problems. As compiler options to the ifort compiler i tried to use the option -heap_arrays, whith no success.
This function is part of a bigger program, with some files. If you want to see the whole software, you can find it in https://github.com/rnwatanabe/projectFR .
Thanks in advance,
Renato Watanabe