forked from mdekauwe/Maestra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrap_physiol_utils_maestra.py
executable file
·46 lines (33 loc) · 1.47 KB
/
wrap_physiol_utils_maestra.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
""" Use f2py to wrap some fortran
*** NOTE if it complains on compile it is beacause
MAESTRA needs to be compiled with same fortran compiler e..g
FC=/opt/local/bin/gfortran-mp-4.4
"""
import os
import sys
import subprocess
__author__ = "Martin De Kauwe"
__version__ = "1.0 (01.07.2011)"
__email__ = "mdekauwe@gmail.com"
arg ="make clean; make"
subprocess.call(arg, shell=True)
arg = "f2py -m maestcom -h maestcom.pyf maestcom.f90 --overwrite-signature"
subprocess.call(arg, shell=True)
arg = "f2py --fcompiler=gnu95 --f90exec=/opt/local/bin/gfortran-mp-4.4 \
-c maestcom.pyf maestcom.o"
subprocess.call(arg, shell=True)
arg = "f2py -m utils -h utils.pyf utils.f90 metcom.f90 --overwrite-signature"
subprocess.call(arg, shell=True)
arg = "f2py --fcompiler=gnu95 --f90exec=/opt/local/bin/gfortran-mp-4.4 \
-c utils.pyf utils.o"
subprocess.call(arg, shell=True)
#arg = "f2py -m physiol -h physiol.pyf physiol.f90 maestcom.f90 utils.f90 --overwrite-signature"
#subprocess.call(arg, shell=True)
#arg = "f2py --fcompiler=gnu95 --f90exec=/opt/local/bin/gfortran-mp-4.4 \
# -c physiol.pyf maestcom.o physiol.o maestcom.o utils.o"
#subprocess.call(arg, shell=True)
arg = "f2py -m physiol -h physiol.pyf physiol.pyf physiol.f90 maestcom.f90 utils.f90 --overwrite-signature"
subprocess.call(arg, shell=True)
arg = "f2py --fcompiler=gnu95 --f90exec=/opt/local/bin/gfortran-mp-4.4 -c physiol.pyf physiol.o maestcom.o utils.o"
subprocess.call(arg, shell=True)