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():
for filename, txt in preprocessed_text:
if filename == 'jastrow_large.irp.f':
if filename == 'invert.irp.f':
print "=== "+filename+" ==="
for line in txt:
print line

View File

@ -465,13 +465,9 @@ class Variable(object):
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), (',%s,')'"
tmp = "\n print *, %s, 'Allocating %s(%s)'"
d = ','.join(self.dim)
d2 = '*'.join(self.dim)
if ":" in d:
result += tmp%('-1',name,d,"''")
else:
result += tmp%(d2,name,d,d)
result += tmp%('size('+name+')',name,d)
return result
result = [ " if (allocated (%s) ) then"%(name) ]