Consolidate the BLAS/TESTING Makefiles
authorKyle Guinn <elyk03@gmail.com>
Mon, 23 Jan 2017 00:38:38 +0000 (18:38 -0600)
committerKyle Guinn <elyk03@gmail.com>
Mon, 23 Jan 2017 00:38:38 +0000 (18:38 -0600)
Move the test inputs into the TESTING dir.

16 files changed:
.gitignore
BLAS/CMakeLists.txt
BLAS/TESTING/CMakeLists.txt
BLAS/TESTING/Makeblat1 [deleted file]
BLAS/TESTING/Makeblat2 [deleted file]
BLAS/TESTING/Makeblat3 [deleted file]
BLAS/TESTING/Makefile [new file with mode: 0644]
BLAS/TESTING/cblat2.in [moved from BLAS/cblat2.in with 100% similarity]
BLAS/TESTING/cblat3.in [moved from BLAS/cblat3.in with 100% similarity]
BLAS/TESTING/dblat2.in [moved from BLAS/dblat2.in with 100% similarity]
BLAS/TESTING/dblat3.in [moved from BLAS/dblat3.in with 100% similarity]
BLAS/TESTING/sblat2.in [moved from BLAS/sblat2.in with 100% similarity]
BLAS/TESTING/sblat3.in [moved from BLAS/sblat3.in with 100% similarity]
BLAS/TESTING/zblat2.in [moved from BLAS/zblat2.in with 100% similarity]
BLAS/TESTING/zblat3.in [moved from BLAS/zblat3.in with 100% similarity]
Makefile

index 1649a48..051cb7d 100644 (file)
@@ -8,8 +8,8 @@ INSTALL/test*
 make.inc
 
 # BLAS testing
-BLAS/*.out
-BLAS/x*
+BLAS/TESTING/*.out
+BLAS/TESTING/x*
 
 # LAPACK testing
 TESTING/x*
index 42cd4f6..e122b2b 100644 (file)
@@ -1,6 +1,6 @@
 add_subdirectory(SRC)
 if(BUILD_TESTING)
-add_subdirectory(TESTING)
+  add_subdirectory(TESTING)
 endif()
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc @ONLY)
 install(FILES
index f88c9a8..9b130db 100644 (file)
@@ -1,34 +1,6 @@
-#######################################################################
-#  This makefile creates the test programs for the BLAS 1 routines.
-#  The test files are grouped as follows:
-#       SBLAT1 -- Single precision real test routines
-#       CBLAT1 -- Single precision complex test routines
-#       DBLAT1 -- Double precision real test routines
-#       ZBLAT1 -- Double precision complex test routines
-#
-#  Test programs can be generated for all or some of the four different
-#  precisions.  To create the test programs, enter make followed by one
-#  or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates all four test programs.
-#  The executable files which are created are called
-#       ../xblat1s, ../xblat1d, ../xblat1c, and ../xblat1z
-#
-#  To remove the object files after the executable files have been
-#  created, enter
-#       make clean
-#  To force the source files to be recompiled, enter, for example,
-#       make single FRC=FRC
-#
-#######################################################################
-
 macro(add_blas_test name src)
   get_filename_component(baseNAME ${src} NAME_WE)
-  set(TEST_INPUT "${LAPACK_SOURCE_DIR}/BLAS/${baseNAME}.in")
+  set(TEST_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${baseNAME}.in")
   add_executable(${name} ${src})
   target_link_libraries(${name} blas)
   if(EXISTS "${TEST_INPUT}")
diff --git a/BLAS/TESTING/Makeblat1 b/BLAS/TESTING/Makeblat1
deleted file mode 100644 (file)
index ccd7e3c..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-include ../../make.inc
-
-#######################################################################
-#  This makefile creates the test programs for the BLAS 1 routines.
-#  The test files are grouped as follows:
-#       SBLAT1 -- Single precision real test routines
-#       CBLAT1 -- Single precision complex test routines
-#       DBLAT1 -- Double precision real test routines
-#       ZBLAT1 -- Double precision complex test routines
-#
-#  Test programs can be generated for all or some of the four different
-#  precisions.  To create the test programs, enter make followed by one
-#  or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates all four test programs.
-#  The executable files which are created are called
-#       ../xblat1s, ../xblat1d, ../xblat1c, and ../xblat1z
-#
-#  To remove the object files after the executable files have been
-#  created, enter
-#       make clean
-#  To force the source files to be recompiled, enter, for example,
-#       make single FRC=FRC
-#
-#######################################################################
-
-SBLAT1 = sblat1.o
-CBLAT1 = cblat1.o
-DBLAT1 = dblat1.o
-ZBLAT1 = zblat1.o
-
-all: single double complex complex16
-
-single: ../xblat1s
-double: ../xblat1d
-complex: ../xblat1c
-complex16: ../xblat1z
-
-../xblat1s: $(SBLAT1)
-       $(LOADER) $(LOADOPTS) -o $@ $(SBLAT1) $(BLASLIB)
-
-../xblat1c: $(CBLAT1)
-       $(LOADER) $(LOADOPTS) -o $@ $(CBLAT1) $(BLASLIB)
-
-../xblat1d: $(DBLAT1)
-       $(LOADER) $(LOADOPTS) -o $@ $(DBLAT1) $(BLASLIB)
-
-../xblat1z: $(ZBLAT1)
-       $(LOADER) $(LOADOPTS) -o $@ $(ZBLAT1) $(BLASLIB)
-
-$(SBLAT1): $(FRC)
-$(CBLAT1): $(FRC)
-$(DBLAT1): $(FRC)
-$(ZBLAT1): $(FRC)
-
-FRC:
-       @FRC=$(FRC)
-
-clean:
-       rm -f *.o
-
-.f.o:
-       $(FORTRAN) $(OPTS) -c -o $@ $<
diff --git a/BLAS/TESTING/Makeblat2 b/BLAS/TESTING/Makeblat2
deleted file mode 100644 (file)
index 9206078..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-include ../../make.inc
-
-#######################################################################
-#  This makefile creates the test programs for the BLAS 2 routines.
-#  The test files are grouped as follows:
-#       SBLAT2 -- Single precision real test routines
-#       CBLAT2 -- Single precision complex test routines
-#       DBLAT2 -- Double precision real test routines
-#       ZBLAT2 -- Double precision complex test routines
-#
-#  Test programs can be generated for all or some of the four different
-#  precisions.  To create the test programs, enter make followed by one
-#  or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates all four test programs.
-#  The executable files which are created are called
-#       ../xblat2s, ../xblat2d, ../xblat2c, and ../xblat2z
-#
-#  To remove the object files after the executable files have been
-#  created, enter
-#       make clean
-#  To force the source files to be recompiled, enter, for example,
-#       make single FRC=FRC
-#
-#######################################################################
-
-SBLAT2 = sblat2.o
-CBLAT2 = cblat2.o
-DBLAT2 = dblat2.o
-ZBLAT2 = zblat2.o
-
-all: single double complex complex16
-
-single: ../xblat2s
-double: ../xblat2d
-complex: ../xblat2c
-complex16: ../xblat2z
-
-../xblat2s: $(SBLAT2)
-       $(LOADER) $(LOADOPTS) -o $@ $(SBLAT2) $(BLASLIB)
-
-../xblat2c: $(CBLAT2)
-       $(LOADER) $(LOADOPTS) -o $@ $(CBLAT2) $(BLASLIB)
-
-../xblat2d: $(DBLAT2)
-       $(LOADER) $(LOADOPTS) -o $@ $(DBLAT2) $(BLASLIB)
-
-../xblat2z: $(ZBLAT2)
-       $(LOADER) $(LOADOPTS) -o $@ $(ZBLAT2) $(BLASLIB)
-
-$(SBLAT2): $(FRC)
-$(CBLAT2): $(FRC)
-$(DBLAT2): $(FRC)
-$(ZBLAT2): $(FRC)
-
-FRC:
-       @FRC=$(FRC)
-
-clean:
-       rm -f *.o
-
-.f.o:
-       $(FORTRAN) $(OPTS) -c -o $@ $<
diff --git a/BLAS/TESTING/Makeblat3 b/BLAS/TESTING/Makeblat3
deleted file mode 100644 (file)
index e454b34..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-include ../../make.inc
-
-#######################################################################
-#  This makefile creates the test programs for the BLAS 3 routines.
-#  The test files are grouped as follows:
-#       SBLAT3 -- Single precision real test routines
-#       CBLAT3 -- Single precision complex test routines
-#       DBLAT3 -- Double precision real test routines
-#       ZBLAT3 -- Double precision complex test routines
-#
-#  Test programs can be generated for all or some of the four different
-#  precisions.  To create the test programs, enter make followed by one
-#  or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates all four test programs.
-#  The executable files which are created are called
-#       ../xblat3s, ../xblat3d, ../xblat3c, and ../xblat3z
-#
-#  To remove the object files after the executable files have been
-#  created, enter
-#       make clean
-#  To force the source files to be recompiled, enter, for example,
-#       make single FRC=FRC
-#
-#######################################################################
-
-SBLAT3 = sblat3.o
-CBLAT3 = cblat3.o
-DBLAT3 = dblat3.o
-ZBLAT3 = zblat3.o
-
-all: single double complex complex16
-
-single: ../xblat3s
-double: ../xblat3d
-complex: ../xblat3c
-complex16: ../xblat3z
-
-../xblat3s: $(SBLAT3)
-       $(LOADER) $(LOADOPTS) -o $@ $(SBLAT3) $(BLASLIB)
-
-../xblat3c: $(CBLAT3)
-       $(LOADER) $(LOADOPTS) -o $@ $(CBLAT3) $(BLASLIB)
-
-../xblat3d: $(DBLAT3)
-       $(LOADER) $(LOADOPTS) -o $@ $(DBLAT3) $(BLASLIB)
-
-../xblat3z: $(ZBLAT3)
-       $(LOADER) $(LOADOPTS) -o $@ $(ZBLAT3) $(BLASLIB)
-
-$(SBLAT3): $(FRC)
-$(CBLAT3): $(FRC)
-$(DBLAT3): $(FRC)
-$(ZBLAT3): $(FRC)
-
-FRC:
-       @FRC=$(FRC)
-
-clean:
-       rm -f *.o
-
-.f.o:
-       $(FORTRAN) $(OPTS) -c -o $@ $<
diff --git a/BLAS/TESTING/Makefile b/BLAS/TESTING/Makefile
new file mode 100644 (file)
index 0000000..5cf7db4
--- /dev/null
@@ -0,0 +1,54 @@
+include ../../make.inc
+
+all: single double complex complex16
+single:    xblat1s xblat2s xblat3s
+double:    xblat1d xblat2d xblat3d
+complex:   xblat1c xblat2c xblat3c
+complex16: xblat1z xblat2z xblat3z
+
+xblat1s: sblat1.o
+       $(LOADER) $(LOADOPTS) -o $@ sblat1.o $(BLASLIB)
+xblat1d: dblat1.o
+       $(LOADER) $(LOADOPTS) -o $@ dblat1.o $(BLASLIB)
+xblat1c: cblat1.o
+       $(LOADER) $(LOADOPTS) -o $@ cblat1.o $(BLASLIB)
+xblat1z: zblat1.o
+       $(LOADER) $(LOADOPTS) -o $@ zblat1.o $(BLASLIB)
+
+xblat2s: sblat2.o
+       $(LOADER) $(LOADOPTS) -o $@ sblat2.o $(BLASLIB)
+xblat2d: dblat2.o
+       $(LOADER) $(LOADOPTS) -o $@ dblat2.o $(BLASLIB)
+xblat2c: cblat2.o
+       $(LOADER) $(LOADOPTS) -o $@ cblat2.o $(BLASLIB)
+xblat2z: zblat2.o
+       $(LOADER) $(LOADOPTS) -o $@ zblat2.o $(BLASLIB)
+
+xblat3s: sblat3.o
+       $(LOADER) $(LOADOPTS) -o $@ sblat3.o $(BLASLIB)
+xblat3d: dblat3.o
+       $(LOADER) $(LOADOPTS) -o $@ dblat3.o $(BLASLIB)
+xblat3c: cblat3.o
+       $(LOADER) $(LOADOPTS) -o $@ cblat3.o $(BLASLIB)
+xblat3z: zblat3.o
+       $(LOADER) $(LOADOPTS) -o $@ zblat3.o $(BLASLIB)
+
+run: all
+       ./xblat1s > sblat1.out
+       ./xblat1d > dblat1.out
+       ./xblat1c > cblat1.out
+       ./xblat1z > zblat1.out
+       ./xblat2s < sblat2.in
+       ./xblat2d < dblat2.in
+       ./xblat2c < cblat2.in
+       ./xblat2z < zblat2.in
+       ./xblat3s < sblat3.in
+       ./xblat3d < dblat3.in
+       ./xblat3c < cblat3.in
+       ./xblat3z < zblat3.in
+
+clean:
+       rm -f *.o xblat* *.out
+
+.f.o:
+       $(FORTRAN) $(OPTS) -c -o $@ $<
similarity index 100%
rename from BLAS/cblat2.in
rename to BLAS/TESTING/cblat2.in
similarity index 100%
rename from BLAS/cblat3.in
rename to BLAS/TESTING/cblat3.in
similarity index 100%
rename from BLAS/dblat2.in
rename to BLAS/TESTING/dblat2.in
similarity index 100%
rename from BLAS/dblat3.in
rename to BLAS/TESTING/dblat3.in
similarity index 100%
rename from BLAS/sblat2.in
rename to BLAS/TESTING/sblat2.in
similarity index 100%
rename from BLAS/sblat3.in
rename to BLAS/TESTING/sblat3.in
similarity index 100%
rename from BLAS/zblat2.in
rename to BLAS/TESTING/zblat2.in
similarity index 100%
rename from BLAS/zblat3.in
rename to BLAS/TESTING/zblat3.in
index f68fd36..a66610b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -58,22 +58,8 @@ variants_testing: lib variants
        ( cd TESTING; rm -f xlintst*; $(MAKE) VARLIB='SRC/VARIANTS/LIB/qrll.a'; \
        mv stest.out stest_qrll.out; mv dtest.out dtest_qrll.out; mv ctest.out ctest_qrll.out; mv ztest.out ztest_qrll.out )
 
-blas_testing:
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat1 )
-       ( cd BLAS; ./xblat1s > sblat1.out    ; \
-                  ./xblat1d > dblat1.out    ; \
-                  ./xblat1c > cblat1.out    ; \
-                  ./xblat1z > zblat1.out    )
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat2 )
-       ( cd BLAS; ./xblat2s < sblat2.in     ; \
-                  ./xblat2d < dblat2.in     ; \
-                  ./xblat2c < cblat2.in     ; \
-                  ./xblat2z < zblat2.in     )
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat3 )
-       ( cd BLAS; ./xblat3s < sblat3.in     ; \
-                  ./xblat3d < dblat3.in     ; \
-                  ./xblat3c < cblat3.in     ; \
-                  ./xblat3z < zblat3.in     )
+blas_testing: blaslib
+       ( cd BLAS/TESTING; $(MAKE) run )
 
 cblas_testing: blaslib
        ( cd CBLAS; $(MAKE) cblas_testing )
@@ -110,10 +96,7 @@ cleanlib:
 
 
 cleanblas_testing:
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat1 clean )
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat2 clean )
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat3 clean )
-       ( cd BLAS; rm -f xblat* )
+       ( cd BLAS/TESTING; $(MAKE) clean )
 
 cleancblas_testing:
        ( cd CBLAS/testing; $(MAKE) clean )
@@ -125,4 +108,4 @@ cleantesting:
 
 cleanall: cleanlib cleanblas_testing cleancblas_testing cleantesting
        ( cd INSTALL; $(MAKE) cleanall )
-       rm -f *.a TESTING/*.out BLAS/*.out
+       rm -f *.a TESTING/*.out