10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-12-21 11:53:32 +01:00

Bug in memory debug

This commit is contained in:
Anthony Scemama 2012-12-19 11:35:21 +01:00
parent 91ac0ac940
commit e0446eb0be
2 changed files with 3 additions and 7 deletions

View File

@ -858,7 +858,7 @@ preprocessed_text = parallel_loop( lambda x,y: create_preprocessed_text(x), \
###################################################################### ######################################################################
def debug(): def debug():
for filename, txt in preprocessed_text: for filename, txt in preprocessed_text:
if filename == 'jastrow_large.irp.f': if filename == 'invert.irp.f':
print "=== "+filename+" ===" print "=== "+filename+" ==="
for line in txt: for line in txt:
print line print line

View File

@ -465,13 +465,9 @@ class Variable(object):
result = " allocate(%s(%s),stat=irp_err)" result = " allocate(%s(%s),stat=irp_err)"
result = result%(name,','.join(self.dim)) result = result%(name,','.join(self.dim))
if command_line.do_memory: if command_line.do_memory:
tmp = "\n print *, %s, 'Allocating %s(%s), (',%s,')'" tmp = "\n print *, %s, 'Allocating %s(%s)'"
d = ','.join(self.dim) d = ','.join(self.dim)
d2 = '*'.join(self.dim) result += tmp%('size('+name+')',name,d)
if ":" in d:
result += tmp%('-1',name,d,"''")
else:
result += tmp%(d2,name,d,d)
return result return result
result = [ " if (allocated (%s) ) then"%(name) ] result = [ " if (allocated (%s) ) then"%(name) ]