mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 11:53:32 +01:00
Bug in IRP_READ/IRP_WRITE array sizes
This commit is contained in:
parent
2565728244
commit
5bafb278b1
@ -54,6 +54,15 @@ def build_dim(dim):
|
|||||||
else:
|
else:
|
||||||
return "(%s)"%( ",".join(dim) )
|
return "(%s)"%( ",".join(dim) )
|
||||||
|
|
||||||
|
def build_dim_colons(v):
|
||||||
|
d = v.dim
|
||||||
|
if d == []:
|
||||||
|
return ""
|
||||||
|
else:
|
||||||
|
x = map(lambda x: ":", d)
|
||||||
|
return "(%s)"%(','.join(x))
|
||||||
|
|
||||||
|
|
||||||
import error
|
import error
|
||||||
def find_subname(line):
|
def find_subname(line):
|
||||||
buffer = line.text
|
buffer = line.text
|
||||||
|
@ -214,13 +214,7 @@ class Variable(object):
|
|||||||
def header(self):
|
def header(self):
|
||||||
if '_header' not in self.__dict__:
|
if '_header' not in self.__dict__:
|
||||||
name = self.name
|
name = self.name
|
||||||
def build_dim(d):
|
self._header = [ " %s :: %s %s"%(self.type, name, build_dim_colons(self) ) ]
|
||||||
if d == []:
|
|
||||||
return ""
|
|
||||||
else:
|
|
||||||
x = map(lambda x: ":", self.dim)
|
|
||||||
return "(%s)"%(','.join(x))
|
|
||||||
self._header = [ " %s :: %s %s"%(self.type, name, build_dim(self.dim) ) ]
|
|
||||||
if self.is_main:
|
if self.is_main:
|
||||||
self._header += [ " logical :: %s_is_built = .False."%(name) ]
|
self._header += [ " logical :: %s_is_built = .False."%(name) ]
|
||||||
return self._header
|
return self._header
|
||||||
@ -291,7 +285,7 @@ class Variable(object):
|
|||||||
for n in [ name ]+self.others:
|
for n in [ name ]+self.others:
|
||||||
result += [\
|
result += [\
|
||||||
" open(unit=irp_iunit,file='irpf90_%s_'//trim(irp_num),form='FORMATTED',status='OLD',action='READ')"%(n),
|
" open(unit=irp_iunit,file='irpf90_%s_'//trim(irp_num),form='FORMATTED',status='OLD',action='READ')"%(n),
|
||||||
" read(irp_iunit,*) %s%s"%(n,build_dim(variables[n].dim)),
|
" read(irp_iunit,*) %s%s"%(n,build_dim_colons(variables[n])),
|
||||||
" close(irp_iunit)" ]
|
" close(irp_iunit)" ]
|
||||||
result += [ \
|
result += [ \
|
||||||
" call touch_%s"%(name),
|
" call touch_%s"%(name),
|
||||||
@ -341,7 +335,7 @@ class Variable(object):
|
|||||||
for n in [ name ] + self.others:
|
for n in [ name ] + self.others:
|
||||||
result += [\
|
result += [\
|
||||||
" open(unit=irp_iunit,file='irpf90_%s_'//trim(irp_num),form='FORMATTED',status='UNKNOWN',action='WRITE')"%(n),
|
" open(unit=irp_iunit,file='irpf90_%s_'//trim(irp_num),form='FORMATTED',status='UNKNOWN',action='WRITE')"%(n),
|
||||||
" write(irp_iunit,*) %s%s"%(n,build_dim(variables[n].dim)),
|
" write(irp_iunit,*) %s%s"%(n,build_dim_colons(variables[n])),
|
||||||
" close(irp_iunit)" ]
|
" close(irp_iunit)" ]
|
||||||
if command_line.do_debug:
|
if command_line.do_debug:
|
||||||
result.append(" call irp_leave(irp_here)")
|
result.append(" call irp_leave(irp_here)")
|
||||||
|
Loading…
Reference in New Issue
Block a user