10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-12-21 20:03:33 +01:00

Bug in IRP_stack corrected

This commit is contained in:
Anthony Scemama 2014-10-07 11:41:48 +02:00
parent 7266a92c7f
commit 673220f1a9
2 changed files with 8 additions and 5 deletions

View File

@ -131,15 +131,15 @@ end subroutine
!$OMP END PARALLEL
!$OMP CRITICAL
if (.not.alloc) then
allocate(irp_stack(STACKMAX,nthread+1))
allocate(irp_cpu(STACKMAX,nthread+1))
allocate(irp_stack(0:STACKMAX,nthread+1))
allocate(irp_cpu(0:STACKMAX,nthread+1))
allocate(stack_index(nthread+1))
stack_index = 0
alloc = .True.
endif
!$OMP END CRITICAL
endif
stack_index(ithread+1) = stack_index(ithread+1)+1
stack_index(ithread+1) = mod(stack_index(ithread+1)+1,STACKMAX)
irp_stack(stack_index(ithread+1),ithread+1) = irp_where""")
if command_line.do_memory:
txt+="""

View File

@ -433,7 +433,7 @@ class Variable(object):
def free(self):
if '_free' not in self.__dict__:
name = self.name
result = [ "!","! >>> FREE %s"%(self.name),
result = [ "!","! >>> FREE %s"%(name),
" %s_is_built = .False."%(self.same_as) ]
if self.dim != []:
if command_line.do_memory:
@ -495,7 +495,10 @@ class Variable(object):
return result
def do_allocate():
result = " allocate(%s(%s),stat=irp_err)"
if command_line.coarray:
result = " allocate(%s(%s)[*],stat=irp_err)"
else:
result = " allocate(%s(%s),stat=irp_err)"
result = result%(name,','.join(self.dim))
if command_line.do_memory:
tmp = "\n print *, %s, 'Allocating %s(%s)'"