diff --git a/bin/irpman b/bin/irpman index 5702061..b7f3ce3 100755 --- a/bin/irpman +++ b/bin/irpman @@ -32,7 +32,7 @@ case "$0" in echo "To activate auto-completion in bash:" echo "source " $0 else - exec python $(dirname $0)/../src/irpman.py $1 + exec python2 $(dirname $0)/../src/irpman.py $1 fi ;; diff --git a/example/Makefile b/example/Makefile index 76d3850..3c4a2a1 100644 --- a/example/Makefile +++ b/example/Makefile @@ -1,4 +1,4 @@ -IRPF90 = python ../src/irpf90.py -I input -a -d +IRPF90 = python2 ../src/irpf90.py -I input FC = ifort FCFLAGS= -O2 NINJA = diff --git a/src/irpf90.py b/src/irpf90.py index ac470a6..2fee5b8 100644 --- a/src/irpf90.py +++ b/src/irpf90.py @@ -73,11 +73,6 @@ def main(): for x in parents: print "- %s"%(x,) - if command_line.do_codelet: - import profile - profile.build_rdtsc() - import codelet - codelet.run() if not command_line.do_run: return @@ -90,6 +85,12 @@ def main(): import makefile makefile.create() + if command_line.do_codelet: + import profile + profile.build_rdtsc() + import codelet + codelet.run() + from modules import modules, write_module for m in modules.keys(): write_module(modules[m]) diff --git a/src/profile.py b/src/profile.py index a3247d3..a40692d 100644 --- a/src/profile.py +++ b/src/profile.py @@ -52,12 +52,12 @@ def build_rdtsc(): file = open(filename,'w') file.write(rdtsc) file.close() -# def t(): -# p = subprocess.Popen(["gcc","-O2",filename,"-c","-o","irp_rdtsc.o"]) -# p.communicate() -# os.remove(filename) -# -# threading.Thread(target=t).start() + def t(): + p = subprocess.Popen(["gcc","-O2",filename,"-c","-o","irp_rdtsc.o"]) + p.communicate() + os.remove(filename) + + threading.Thread(target=t).start() def build_module(): from variables import variables diff --git a/src/variable.py b/src/variable.py index 52901ab..1409fc3 100644 --- a/src/variable.py +++ b/src/variable.py @@ -105,6 +105,11 @@ class Variable(object): for line in text: if type(line) == Begin_provider: self._name = line.filename[1] + if "(" in self._name: + error.fail(line,"""'(' not allowed in variable name. +A ',' is probably missing between the name of the variable and the +dimension. +""") break return self._name name = property(name) diff --git a/src/version.py b/src/version.py index 116d566..2196826 100644 --- a/src/version.py +++ b/src/version.py @@ -1 +1 @@ -version = "1.7.1" +version = "1.7.2"