mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 20:03:33 +01:00
Merge branch 'master' of ssh://irpf90.git.sourceforge.net/gitroot/irpf90/irpf90
This commit is contained in:
commit
a0fb70b15f
@ -1 +1 @@
|
|||||||
/home/scemama/irpf90/src/irpf90.exe
|
../src/irpf90.exe
|
@ -1,10 +1,12 @@
|
|||||||
program irp_example1
|
program irp_example1
|
||||||
integer :: x(W)
|
! integer :: x(W)
|
||||||
BEGIN_SHELL [ /bin/bash ]
|
BEGIN_SHELL [ /bin/bash ]
|
||||||
echo print *, \'Compiled by `whoami` on `date`\'
|
echo print *, \'Compiled by `whoami` on `date`\'
|
||||||
echo print *, \'$FC $FCFLAGS\'
|
echo print *, \'$FC $FCFLAGS\'
|
||||||
echo print *, \'$IRPF90\'
|
echo print *, \'$IRPF90\'
|
||||||
END_SHELL
|
END_SHELL
|
||||||
! print *, 't = ', t
|
print *, 't = ', t
|
||||||
print *, u2
|
|
||||||
|
print *, 'v=', v
|
||||||
|
! print *, u2
|
||||||
end
|
end
|
||||||
|
@ -22,7 +22,7 @@ BEGIN_PROVIDER [ integer, u1 ]
|
|||||||
do i=1,m
|
do i=1,m
|
||||||
print *, i
|
print *, i
|
||||||
enddo
|
enddo
|
||||||
PROVIDE u2
|
! PROVIDE u2
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [ integer, u2 ]
|
BEGIN_PROVIDER [ integer, u2 ]
|
||||||
|
12
src/Makefile
12
src/Makefile
@ -1,5 +1,10 @@
|
|||||||
PYTHON=python
|
PYTHON=python
|
||||||
PYVERSION=$(shell $(PYTHON) -c "import sys; print(sys.version[:3])")
|
PYVERSION=$(shell $(PYTHON) -c "import sys; print(sys.version[:3])")
|
||||||
|
HAS_CYTHON=$(shell which cython &> /dev/null && echo 1 || echo 0)
|
||||||
|
ifneq ($(HAS_CYTHON),0)
|
||||||
|
|
||||||
|
../bin/irpf90: irpf90.exe
|
||||||
|
rm ../bin/irpf90 ; cd ../bin ; ln -s ../src/irpf90.exe irpf90
|
||||||
|
|
||||||
irpf90.exe: irpf90.so
|
irpf90.exe: irpf90.so
|
||||||
gcc build/*/irpf90.o -L/usr/lib64 -lpython$(PYVERSION) -o irpf90.exe
|
gcc build/*/irpf90.o -L/usr/lib64 -lpython$(PYVERSION) -o irpf90.exe
|
||||||
@ -10,5 +15,10 @@ irpf90.so : $(wildcard *.py) irpf90.c
|
|||||||
irpf90.c: irpf90.py
|
irpf90.c: irpf90.py
|
||||||
cython --embed irpf90.py
|
cython --embed irpf90.py
|
||||||
|
|
||||||
|
else
|
||||||
|
../bin/irpf90: irpf90_python.exe
|
||||||
|
rm ../bin/irpf90 ; cd ../bin ; ln -s ../src/irpf90_python.exe irpf90
|
||||||
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm *.c *.so *.pyc 2>/dev/null
|
rm -f *.c *.so *.pyc *.pyo 2>/dev/null
|
||||||
|
40
src/irpf90_python.exe
Executable file
40
src/irpf90_python.exe
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# IRPF90 is a Fortran90 preprocessor written in Python for programming using
|
||||||
|
# the Implicit Reference to Parameters (IRP) method.
|
||||||
|
# Copyright (C) 2009 Anthony SCEMAMA
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
#
|
||||||
|
# Anthony Scemama
|
||||||
|
# LCPQ - IRSAMC - CNRS
|
||||||
|
# Universite Paul Sabatier
|
||||||
|
# 118, route de Narbonne
|
||||||
|
# 31062 Toulouse Cedex 4
|
||||||
|
# scemama@irsamc.ups-tlse.fr
|
||||||
|
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
wd = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
sys.path.insert(0,(wd+"/../src/"))
|
||||||
|
sys.path.insert(0,(wd+"/../share/irpf90/src/"))
|
||||||
|
|
||||||
|
def main():
|
||||||
|
import irpf90
|
||||||
|
irpf90.main()
|
||||||
|
|
||||||
|
main()
|
||||||
|
|
@ -1 +1 @@
|
|||||||
version = "1.2.12"
|
version = "1.2.18"
|
||||||
|
Loading…
Reference in New Issue
Block a user