Commit 724c1e96 authored by Lorenz Hüdepohl's avatar Lorenz Hüdepohl
Browse files

Auto generated test_programs.am was put in wrong directory

parent 2f8f6d56
...@@ -25,3 +25,4 @@ m4/ltoptions.m4 ...@@ -25,3 +25,4 @@ m4/ltoptions.m4
m4/ltsugar.m4 m4/ltsugar.m4
m4/ltversion.m4 m4/ltversion.m4
m4/lt~obsolete.m4 m4/lt~obsolete.m4
test_programs.am
...@@ -5,5 +5,5 @@ mkdir -p m4/ ...@@ -5,5 +5,5 @@ mkdir -p m4/
test -n "$srcdir" || srcdir=`dirname "$0"` test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=. test -n "$srcdir" || srcdir=.
$srcdir/generate_automake_test_programs.py $srcdir/generate_automake_test_programs.py > $srcdir/test_programs.am
autoreconf --force --install --verbose "$srcdir" autoreconf --force --install --verbose "$srcdir"
...@@ -19,8 +19,6 @@ gpu_flag = { ...@@ -19,8 +19,6 @@ gpu_flag = {
1 : "-DTEST_GPU=1", 1 : "-DTEST_GPU=1",
} }
f = open("test_programs.am", "w")
for g, p, d, s in product(sorted(gpu_flag.keys()), for g, p, d, s in product(sorted(gpu_flag.keys()),
sorted(prec_flag.keys()), sorted(prec_flag.keys()),
sorted(domain_flag.keys()), sorted(domain_flag.keys()),
...@@ -28,30 +26,30 @@ for g, p, d, s in product(sorted(gpu_flag.keys()), ...@@ -28,30 +26,30 @@ for g, p, d, s in product(sorted(gpu_flag.keys()),
endifs = 0 endifs = 0
extra_flags = [] extra_flags = []
if (g == 1): if (g == 1):
print("if WITH_GPU_VERSION", file=f) print("if WITH_GPU_VERSION")
endifs += 1 endifs += 1
if s == "2stage": if s == "2stage":
extra_flags.append("-DTEST_KERNEL=ELPA_2STAGE_{0}_GPU".format(d.upper())) extra_flags.append("-DTEST_KERNEL=ELPA_2STAGE_{0}_GPU".format(d.upper()))
if (p == "single"): if (p == "single"):
if (d == "real"): if (d == "real"):
print("if WANT_SINGLE_PRECISION_REAL", file=f) print("if WANT_SINGLE_PRECISION_REAL")
elif (d == "complex"): elif (d == "complex"):
print("if WANT_SINGLE_PRECISION_COMPLEX", file=f) print("if WANT_SINGLE_PRECISION_COMPLEX")
else: else:
raise Exception("Oh no!") raise Exception("Oh no!")
endifs += 1 endifs += 1
name = "test_{0}_{1}_{2}{3}".format(d, p, s, "_gpu" if g else "") name = "test_{0}_{1}_{2}{3}".format(d, p, s, "_gpu" if g else "")
print("noinst_PROGRAMS += " + name, file=f) print("noinst_PROGRAMS += " + name)
print("check_SCRIPTS += " + name + ".sh", file=f) print("check_SCRIPTS += " + name + ".sh")
print(name + "_SOURCES = test/Fortran/test.F90", file=f) print(name + "_SOURCES = test/Fortran/test.F90")
print(name + "_LDADD = $(build_lib) $(FCLIBS)", file=f) print(name + "_LDADD = $(build_lib) $(FCLIBS)")
print(name + "_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules \\", file=f) print(name + "_FCFLAGS = $(AM_FCFLAGS) $(FC_MODINC)test_modules $(FC_MODINC)modules \\")
print(" " + " \\\n ".join([ print(" " + " \\\n ".join([
domain_flag[d], domain_flag[d],
prec_flag[p], prec_flag[p],
solver_flag[s], solver_flag[s],
gpu_flag[g]] + extra_flags), file=f) gpu_flag[g]] + extra_flags))
print("endif\n" * endifs, file=f) print("endif\n" * endifs)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment