- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
when i tried to run program compiled using ifortv8.0,i'm getting segmentation fault.
It is first issuing this warning many times and then giving segmentation fault:
forrtl: warning (402): fort: (1): In call to QNEG3, an array temporary was created for argument #8
Part of the calling routine is:
! Allocate memory for temporary arrays
allocate ( arr3d(plon,plev,plat) )
.
.
.
.
do lat=1,plat
call qneg3('INIDAT ', lat, nlon(lat), plon, plev, 1, &
qmin(m), arr3d(:plon,:plev,lat))
end do
The called routine has:
subroutine qneg3 (subnam ,idx ,ncol ,ncold ,lver ,lconst , &
qmin ,q )
.
.
.
!Input arguments
character*(*), intent(in) :: subnam ! name of calling routine
integer, intent(in) :: idx ! chunk/latitude index
integer, intent(in) :: ncol ! number of atmospheric columns
integer, intent(in) :: ncold ! declared number of atmospheric columns
integer, intent(in) :: lver ! number of vertical levels in column
integer, intent(in) :: lconst ! number of constituents
real(r8), intent(in) :: qmin(lconst) ! Global minimum constituent concentration
!
! Input/Output arguments
!
real(r8), intent(inout) :: q(ncold,lver,lconst) ! moisture/tracer field
It is first issuing this warning many times and then giving segmentation fault:
forrtl: warning (402): fort: (1): In call to QNEG3, an array temporary was created for argument #8
Part of the calling routine is:
! Allocate memory for temporary arrays
allocate ( arr3d(plon,plev,plat) )
.
.
.
.
do lat=1,plat
call qneg3('INIDAT ', lat, nlon(lat), plon, plev, 1, &
qmin(m), arr3d(:plon,:plev,lat))
end do
The called routine has:
subroutine qneg3 (subnam ,idx ,ncol ,ncold ,lver ,lconst , &
qmin ,q )
.
.
.
!Input arguments
character*(*), intent(in) :: subnam ! name of calling routine
integer, intent(in) :: idx ! chunk/latitude index
integer, intent(in) :: ncol ! number of atmospheric columns
integer, intent(in) :: ncold ! declared number of atmospheric columns
integer, intent(in) :: lver ! number of vertical levels in column
integer, intent(in) :: lconst ! number of constituents
real(r8), intent(in) :: qmin(lconst) ! Global minimum constituent concentration
!
! Input/Output arguments
!
real(r8), intent(inout) :: q(ncold,lver,lconst) ! moisture/tracer field
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What's the declaration of qmin?
You probably need to raise your stack limit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've increased stacksize using ulimit.I'm not doing any optimizations also.Options I've given are:
-i4 -r8 -align -g -C -fpstkchk -fp -save -check all.Environment variables are all properly set.
Declaration of qmin is in qneg3.F90 file as:
real(r8), intent(in) :: qmin(lconst)
as I said in previous thread.
Any help is appreciated.
-i4 -r8 -align -g -C -fpstkchk -fp -save -check all.Environment variables are all properly set.
Declaration of qmin is in qneg3.F90 file as:
real(r8), intent(in) :: qmin(lconst)
as I said in previous thread.
Any help is appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
make sure you don't deallocate temporary arrays and after that try to use them... If you do so you would probably obtain the same type of error you report.
Florin M.
Florin M.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page