From 8d36c357ae062d9f2a66e5afaf510e55d03536d9 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 14 Sep 2009 18:40:08 +0200 Subject: [PATCH] Added example and bin/irpf90. irpman needs to be written Version:1.1.14 --- bin/irpf90 | 12 ++++++++++++ bin/irpman | 10 ++++++++++ example/Makefile | 12 ++++++++++++ example/input.irp.f | 16 ++++++++++++++++ example/irp_example1.irp.f | 13 +++++++++++++ example/irp_example2.irp.f | 7 +++++++ example/uvwt.irp.f | 27 +++++++++++++++++++++++++++ src/version.py | 2 +- 8 files changed, 98 insertions(+), 1 deletion(-) create mode 100755 bin/irpf90 create mode 100755 bin/irpman create mode 100644 example/Makefile create mode 100644 example/input.irp.f create mode 100644 example/irp_example1.irp.f create mode 100644 example/irp_example2.irp.f create mode 100644 example/uvwt.irp.f diff --git a/bin/irpf90 b/bin/irpf90 new file mode 100755 index 0000000..b17d282 --- /dev/null +++ b/bin/irpf90 @@ -0,0 +1,12 @@ +#!/usr/bin/python + +import os +import sys + +wd = os.path.abspath(os.path.dirname(__file__)) +wd += "/../src/" +sys.path.append(wd) +for p in sys.path: + print p + +import irpf90 diff --git a/bin/irpman b/bin/irpman new file mode 100755 index 0000000..4412547 --- /dev/null +++ b/bin/irpman @@ -0,0 +1,10 @@ +#!/usr/bin/python + +import os +import sys + +wd = os.path.abspath(os.path.dirname(__file__)) +wd += "/../src/" +sys.path.append(wd) + +import irpman diff --git a/example/Makefile b/example/Makefile new file mode 100644 index 0000000..0612439 --- /dev/null +++ b/example/Makefile @@ -0,0 +1,12 @@ +IRPF90 = irpf90 #-a -d +FC = gfortran +FCFLAGS= -ffree-line-length-none -O2 + +SRC= +OBJ= +LIB= + +include irpf90.make + +irpf90.make: $(wildcard *.irp.f) + $(IRPF90) diff --git a/example/input.irp.f b/example/input.irp.f new file mode 100644 index 0000000..e41611b --- /dev/null +++ b/example/input.irp.f @@ -0,0 +1,16 @@ + BEGIN_PROVIDER [ integer, d1 ] +&BEGIN_PROVIDER [ integer, d2 ] +&BEGIN_PROVIDER [ integer, d3 ] +&BEGIN_PROVIDER [ integer, d4 ] +&BEGIN_PROVIDER [ integer, d5 ] + + BEGIN_SHELL [ /usr/bin/python ] +for i in range(1,6): + print " print *, 'd%d'"%(i,) + print " read(*,*) d%d"%(i,) + if i > 1: + print " ASSERT ( d%d > d%d )"%(i,i-1) + END_SHELL + +END_PROVIDER + diff --git a/example/irp_example1.irp.f b/example/irp_example1.irp.f new file mode 100644 index 0000000..ea8d490 --- /dev/null +++ b/example/irp_example1.irp.f @@ -0,0 +1,13 @@ +program irp_example1 + BEGIN_SHELL [ /bin/bash ] + echo print *, \'Compiled by `whoami` on `date`\' + echo print *, \'$FC $FCFLAGS\' + echo print *, \'$IRPF90\' + END_SHELL + call run + +end + +subroutine run + print *, 't = ', t +end diff --git a/example/irp_example2.irp.f b/example/irp_example2.irp.f new file mode 100644 index 0000000..79036a5 --- /dev/null +++ b/example/irp_example2.irp.f @@ -0,0 +1,7 @@ +program irp_example2 + print *, "Example 2" + print *, 't = ', t + +! IRP_WRITE t + +end diff --git a/example/uvwt.irp.f b/example/uvwt.irp.f new file mode 100644 index 0000000..f1c7a87 --- /dev/null +++ b/example/uvwt.irp.f @@ -0,0 +1,27 @@ +BEGIN_PROVIDER [ integer, t ] + t = u1+v+4 +END_PROVIDER + +BEGIN_PROVIDER [integer,w] + w = d5+3 +END_PROVIDER + +BEGIN_PROVIDER [ integer, v ] + v = u2+w+2 +END_PROVIDER + +BEGIN_PROVIDER [ integer, u1 ] + integer :: fu + u1 = fu(d1,d2) + PROVIDE u2 +END_PROVIDER + +BEGIN_PROVIDER [ integer, u2 ] + integer :: fu + u2 = fu(d3,d4) +END_PROVIDER + +integer function fu(x,y) + integer :: x,y + fu = x+y+1 +end function diff --git a/src/version.py b/src/version.py index 45312fc..15ad503 100644 --- a/src/version.py +++ b/src/version.py @@ -1 +1 @@ -version = "1.1.13" +version = "1.1.14"