From bde7ab5cc77f0737644019510c9cf16a299f0ef0 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Wed, 5 Sep 2018 05:32:33 -0600 Subject: [PATCH 1/2] moved c code to src directory --- configure.ac | 1 - ctests/Makefile.am | 2 +- src/Makefile.am | 15 ++++++++++++--- src/{clib => }/f_wrappers.c | 0 src/{clib => }/f_wrappers_pmpi.c | 0 src/{clib => }/getoverhead.c | 0 src/{clib => }/gptl.c | 0 src/{clib => }/gptl_papi.c | 0 src/{clib => }/hashstats.c | 0 src/{clib => }/memstats.c | 0 src/{clib => }/memusage.c | 0 src/{clib => }/pmpi.c | 0 src/{clib => }/pr_summary.c | 0 src/{clib => }/print_rusage.c | 0 src/{clib => }/util.c | 0 15 files changed, 13 insertions(+), 5 deletions(-) rename src/{clib => }/f_wrappers.c (100%) rename src/{clib => }/f_wrappers_pmpi.c (100%) rename src/{clib => }/getoverhead.c (100%) rename src/{clib => }/gptl.c (100%) rename src/{clib => }/gptl_papi.c (100%) rename src/{clib => }/hashstats.c (100%) rename src/{clib => }/memstats.c (100%) rename src/{clib => }/memusage.c (100%) rename src/{clib => }/pmpi.c (100%) rename src/{clib => }/pr_summary.c (100%) rename src/{clib => }/print_rusage.c (100%) rename src/{clib => }/util.c (100%) diff --git a/configure.ac b/configure.ac index fd052d46..00c1b2c0 100644 --- a/configure.ac +++ b/configure.ac @@ -183,7 +183,6 @@ AC_CONFIG_FILES([Makefile include/Makefile ctests/Makefile src/Makefile - src/clib/Makefile bin/Makefile ]) diff --git a/ctests/Makefile.am b/ctests/Makefile.am index eb055ed1..93c594e0 100644 --- a/ctests/Makefile.am +++ b/ctests/Makefile.am @@ -5,7 +5,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include # Link to GPTL library. -AM_LDFLAGS = ${top_builddir}/src/clib/libgptl.la +AM_LDFLAGS = ${top_builddir}/src/libgptl.la # These programs will be built but not installed. noinst_PROGRAMS = gran_overhead printwhileon diff --git a/src/Makefile.am b/src/Makefile.am index 431638db..d4d1488e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,13 @@ -# This is the automake file for GPTL source code directories. -# Ed Hartnett, 5/18/18 +# This automake file generates the Makefile to build the GPTL C library. +# Ed Hartnett 5/18/18 + +libgptl_la_CPPFLAGS = -I$(top_srcdir)/include + +# This is our output. The GPTL library. +lib_LTLIBRARIES = libgptl.la + +# These are the source files. +libgptl_la_SOURCES = f_wrappers.c getoverhead.c gptl.c gptl_papi.c \ +hashstats.c memstats.c memusage.c pmpi.c print_rusage.c pr_summary.c \ +util.c -SUBDIRS = clib diff --git a/src/clib/f_wrappers.c b/src/f_wrappers.c similarity index 100% rename from src/clib/f_wrappers.c rename to src/f_wrappers.c diff --git a/src/clib/f_wrappers_pmpi.c b/src/f_wrappers_pmpi.c similarity index 100% rename from src/clib/f_wrappers_pmpi.c rename to src/f_wrappers_pmpi.c diff --git a/src/clib/getoverhead.c b/src/getoverhead.c similarity index 100% rename from src/clib/getoverhead.c rename to src/getoverhead.c diff --git a/src/clib/gptl.c b/src/gptl.c similarity index 100% rename from src/clib/gptl.c rename to src/gptl.c diff --git a/src/clib/gptl_papi.c b/src/gptl_papi.c similarity index 100% rename from src/clib/gptl_papi.c rename to src/gptl_papi.c diff --git a/src/clib/hashstats.c b/src/hashstats.c similarity index 100% rename from src/clib/hashstats.c rename to src/hashstats.c diff --git a/src/clib/memstats.c b/src/memstats.c similarity index 100% rename from src/clib/memstats.c rename to src/memstats.c diff --git a/src/clib/memusage.c b/src/memusage.c similarity index 100% rename from src/clib/memusage.c rename to src/memusage.c diff --git a/src/clib/pmpi.c b/src/pmpi.c similarity index 100% rename from src/clib/pmpi.c rename to src/pmpi.c diff --git a/src/clib/pr_summary.c b/src/pr_summary.c similarity index 100% rename from src/clib/pr_summary.c rename to src/pr_summary.c diff --git a/src/clib/print_rusage.c b/src/print_rusage.c similarity index 100% rename from src/clib/print_rusage.c rename to src/print_rusage.c diff --git a/src/clib/util.c b/src/util.c similarity index 100% rename from src/clib/util.c rename to src/util.c From 32878f11bb695d9c999d063c0336b7972935a664 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Wed, 5 Sep 2018 05:41:12 -0600 Subject: [PATCH 2/2] renamed test directory --- Makefile.am | 2 +- configure.ac | 2 +- ctests/myclasses.h | 56 --------------------------- ctests/profcxx.C | 36 ----------------- {ctests => test}/Makefile.am | 0 {ctests => test}/avail.c | 0 {ctests => test}/cygprofile.c | 0 {ctests => test}/cygprofilesubs.c | 0 {ctests => test}/global.c | 0 {ctests => test}/gran_overhead.c | 0 {ctests => test}/knownflopcount.c | 0 {ctests => test}/nestedomp.c | 0 {ctests => test}/papiomptest.c | 0 {ctests => test}/pmpi.c | 0 {ctests => test}/printwhileon.c | 0 {ctests => test}/run_par_pmpi_test.sh | 0 {ctests => test}/run_par_test.sh | 0 {ctests => test}/summary.c | 0 {ctests => test}/testpapi.c | 0 {ctests => test}/tst_simple.c | 0 20 files changed, 2 insertions(+), 94 deletions(-) delete mode 100644 ctests/myclasses.h delete mode 100644 ctests/profcxx.C rename {ctests => test}/Makefile.am (100%) rename {ctests => test}/avail.c (100%) rename {ctests => test}/cygprofile.c (100%) rename {ctests => test}/cygprofilesubs.c (100%) rename {ctests => test}/global.c (100%) rename {ctests => test}/gran_overhead.c (100%) rename {ctests => test}/knownflopcount.c (100%) rename {ctests => test}/nestedomp.c (100%) rename {ctests => test}/papiomptest.c (100%) rename {ctests => test}/pmpi.c (100%) rename {ctests => test}/printwhileon.c (100%) rename {ctests => test}/run_par_pmpi_test.sh (100%) rename {ctests => test}/run_par_test.sh (100%) rename {ctests => test}/summary.c (100%) rename {ctests => test}/testpapi.c (100%) rename {ctests => test}/tst_simple.c (100%) diff --git a/Makefile.am b/Makefile.am index 9d75a309..e126bf5f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ EXTRA_DIST = COPYING README # This is the list of subdirs for which Makefiles will be constructed # and run. -SUBDIRS = include src ctests bin +SUBDIRS = include src test bin install-data-hook: diff --git a/configure.ac b/configure.ac index 00c1b2c0..857f5467 100644 --- a/configure.ac +++ b/configure.ac @@ -181,7 +181,7 @@ fi # This is a list of files to be built. AC_CONFIG_FILES([Makefile include/Makefile - ctests/Makefile + test/Makefile src/Makefile bin/Makefile ]) diff --git a/ctests/myclasses.h b/ctests/myclasses.h deleted file mode 100644 index 7922d24b..00000000 --- a/ctests/myclasses.h +++ /dev/null @@ -1,56 +0,0 @@ -class Base -{ - public: - Base (); - ~Base (); -}; - -Base::Base () -{ -} - -Base::~Base () -{ -} - -class X: Base -{ - public: - X () - { - } - ~X() - { - } - void func (int x) - { - } - void func (double x) - { - } -}; - -class Y: Base -{ - public: - Y (); - ~Y(); - void func (int); - void func (double); -}; - -Y::Y () -{ -} - -Y::~Y() -{ -} - -void Y::func (int x) -{ -} - -void Y::func (double x) -{ -} diff --git a/ctests/profcxx.C b/ctests/profcxx.C deleted file mode 100644 index 00066aac..00000000 --- a/ctests/profcxx.C +++ /dev/null @@ -1,36 +0,0 @@ -#include "config.h" -#include "gptl.h" -#ifdef HAVE_PAPI -#include -#endif -#include "myclasses.h" - -int main () -{ - X *x; - Y *y; - int ret; - -#ifdef HAVE_PAPI - GPTLsetoption(GPTLmultiplex,1); - GPTLsetoption(PAPI_L2_DCH, 1); - GPTLsetoption(PAPI_L1_TCM, 1); - GPTLsetoption(PAPI_L3_TCM, 1); -#endif - - ret = GPTLinitialize (); - ret = GPTLstart ("total"); - x = new (X); - x->func (1.2); - x->func (1); - delete (x); - - y = new (Y); - y->func (1.2); - y->func (1); - delete (y); - - ret = GPTLstop ("total"); - ret = GPTLpr (0); -} - diff --git a/ctests/Makefile.am b/test/Makefile.am similarity index 100% rename from ctests/Makefile.am rename to test/Makefile.am diff --git a/ctests/avail.c b/test/avail.c similarity index 100% rename from ctests/avail.c rename to test/avail.c diff --git a/ctests/cygprofile.c b/test/cygprofile.c similarity index 100% rename from ctests/cygprofile.c rename to test/cygprofile.c diff --git a/ctests/cygprofilesubs.c b/test/cygprofilesubs.c similarity index 100% rename from ctests/cygprofilesubs.c rename to test/cygprofilesubs.c diff --git a/ctests/global.c b/test/global.c similarity index 100% rename from ctests/global.c rename to test/global.c diff --git a/ctests/gran_overhead.c b/test/gran_overhead.c similarity index 100% rename from ctests/gran_overhead.c rename to test/gran_overhead.c diff --git a/ctests/knownflopcount.c b/test/knownflopcount.c similarity index 100% rename from ctests/knownflopcount.c rename to test/knownflopcount.c diff --git a/ctests/nestedomp.c b/test/nestedomp.c similarity index 100% rename from ctests/nestedomp.c rename to test/nestedomp.c diff --git a/ctests/papiomptest.c b/test/papiomptest.c similarity index 100% rename from ctests/papiomptest.c rename to test/papiomptest.c diff --git a/ctests/pmpi.c b/test/pmpi.c similarity index 100% rename from ctests/pmpi.c rename to test/pmpi.c diff --git a/ctests/printwhileon.c b/test/printwhileon.c similarity index 100% rename from ctests/printwhileon.c rename to test/printwhileon.c diff --git a/ctests/run_par_pmpi_test.sh b/test/run_par_pmpi_test.sh similarity index 100% rename from ctests/run_par_pmpi_test.sh rename to test/run_par_pmpi_test.sh diff --git a/ctests/run_par_test.sh b/test/run_par_test.sh similarity index 100% rename from ctests/run_par_test.sh rename to test/run_par_test.sh diff --git a/ctests/summary.c b/test/summary.c similarity index 100% rename from ctests/summary.c rename to test/summary.c diff --git a/ctests/testpapi.c b/test/testpapi.c similarity index 100% rename from ctests/testpapi.c rename to test/testpapi.c diff --git a/ctests/tst_simple.c b/test/tst_simple.c similarity index 100% rename from ctests/tst_simple.c rename to test/tst_simple.c