mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 11:53:32 +01:00
Bug in IRP_stack corrected
This commit is contained in:
parent
7266a92c7f
commit
673220f1a9
@ -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+="""
|
||||
|
@ -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)'"
|
||||
|
Loading…
Reference in New Issue
Block a user