[cig-commits] r13789 - in seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness: . lib/chino
leif at geodynamics.org
leif at geodynamics.org
Mon Dec 22 13:15:22 PST 2008
Author: leif
Date: 2008-12-22 13:15:22 -0800 (Mon, 22 Dec 2008)
New Revision: 13789
Modified:
seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/MANIFEST.in
seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/lib/chino/config.py
seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/lib/chino/harness.py
seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/setup.py
Log:
Fixed bugs. Added FCFLAGS -- gfortran requires "-I." to see include
files in the working directory. Behold: Chino v1.0.1.
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/MANIFEST.in
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/MANIFEST.in 2008-12-22 20:43:19 UTC (rev 13788)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/MANIFEST.in 2008-12-22 21:15:22 UTC (rev 13789)
@@ -1,5 +1,5 @@
include MANIFEST.in
-include chino/*.f90
-include chino/*.h
-include chino/blank/*.f90
-include chino/blank/*/*.f90
+include lib/chino/*.f90
+include lib/chino/*.h
+include lib/chino/blank/*.f90
+include lib/chino/blank/*/*.f90
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/lib/chino/config.py
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/lib/chino/config.py 2008-12-22 20:43:19 UTC (rev 13788)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/lib/chino/config.py 2008-12-22 21:15:22 UTC (rev 13789)
@@ -14,11 +14,15 @@
modelDir = parser.get("general", "model-dir")
fc = parser.get("make", "FC")
try:
+ fcflags = parser.get("make", "FCFLAGS")
+ except NoOptionError:
+ fcflags = ""
+ try:
fcflags_f90 = parser.get("make", "FCFLAGS_f90")
except NoOptionError:
fcflags_f90 = ""
- return Config(modelDir = modelDir, fc = fc, fcflags_f90 = fcflags_f90)
+ return Config(modelDir = modelDir, fc = fc, fcflags = fcflags, fcflags_f90 = fcflags_f90)
fromFile = classmethod(fromFile)
#@classmethod
@@ -30,6 +34,7 @@
print >>s
print >>s, "[make]"
print >>s, "FC = f90 ; Fortran-90 compiler command"
+ print >>s, "FCFLAGS = -I."
print >>s
print >>s, "# flag to recognize .f90 files as source (if needed); e.g.:"
print >>s, "#FCFLAGS_f90 = -qsuffix=f=f90"
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/lib/chino/harness.py
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/lib/chino/harness.py 2008-12-22 20:43:19 UTC (rev 13788)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/lib/chino/harness.py 2008-12-22 21:15:22 UTC (rev 13789)
@@ -18,8 +18,9 @@
class Harness(object):
def __init__(self, config):
- from os.path import abspath
+ from os.path import abspath, dirname
self.config = config
+ self.pkgDir = abspath(dirname(__file__))
def tarUp(self):
import tarfile
@@ -87,9 +88,8 @@
from os.path import dirname, join
from shutil import copyfile
from itertools import chain
- pkgDir = dirname(__file__)
for sourceFile in chain(harnessSourceFiles, harnessHeaderFiles):
- copyfile(join(pkgDir, sourceFile), sourceFile)
+ copyfile(join(self.pkgDir, sourceFile), sourceFile)
return
def generateMakefile(self):
@@ -100,6 +100,7 @@
s = open("Makefile", "w")
print >>s
print >>s, "FC = %s" % self.config.fc
+ print >>s, "FCFLAGS = %s" % self.config.fcflags
print >>s, "FCFLAGS_f90 = %s" % self.config.fcflags_f90
print >>s
print >>s, "model_OBJECTS = \\"
@@ -120,7 +121,7 @@
for sourceFile in chain(modelSourceFiles, harnessSourceFiles):
base = splitext(basename(sourceFile))[0]
print >>s, "%s.o: constants.h %s" % (base, sourceFile)
- print >>s, "\t$(FC) -c -o %s.o $(FCFLAGS_f90) %s" % (base, sourceFile)
+ print >>s, "\t$(FC) $(FCFLAGS) -c -o %s.o $(FCFLAGS_f90) %s" % (base, sourceFile)
print >>s
return
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/setup.py
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/setup.py 2008-12-22 20:43:19 UTC (rev 13788)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/MODELS/harness/setup.py 2008-12-22 21:15:22 UTC (rev 13789)
@@ -16,7 +16,7 @@
setup(
name = 'chino',
- version = '1.0.0',
+ version = '1.0.1',
url = 'http://www.geodynamics.org/',
author = 'Leif Strand',
author_email = 'leif at geodynamics.org',
More information about the CIG-COMMITS
mailing list