From a87e19a9a8b31c5f131c3561b6a2c6b0fd790168 Mon Sep 17 00:00:00 2001 From: rosinski Date: Sat, 5 Apr 2008 14:16:28 +0000 Subject: [PATCH] Update doc. Get rid of cfort.h --- README | 64 +++++++++++++++++++---------------------------- cfort.h | 5 ---- macros.make.linux | 11 +++++--- 3 files changed, 33 insertions(+), 47 deletions(-) delete mode 100644 cfort.h diff --git a/README b/README index 05d5b046..8118e5b3 100644 --- a/README +++ b/README @@ -1,53 +1,39 @@ -GPTL is a general-purpose timing library. By itself it can gather wallclock +GPTL is a general-purpose timing library. By itself it can gather wallclock and cpu timing statistics for a code instrumented with an aribtrary sequence of calls to the pair of routines "GPTLstart" and "GPTLstop" (more details -below). It is thread-safe, presuming either OpenMP or pthreads is available. +below). It is thread-safe, presuming either OpenMP or pthreads is +available. If the Fortran interface is built, entry point names and the API +are exactly the same as in C, except that Fortran is case-insensitive. GPTL also provides hooks into the hardware counters library PAPI -(http://icl.cs.utk.edu/papi/index.html). If this option is enabled -(./configure --enable-papi), the same "GPTLstart" and "GPTLstop" calls can be -used to provide various low-level hardware counter info, such as total -cycles, floating point ops, cache misses, and various other performance -information depending on the target architecture. PAPI must already be -installed in order to enable this option. +(http://icl.cs.utk.edu/papi/index.html). If this option is enabled, the same +"GPTLstart" and "GPTLstop" calls can be used to provide various low-level +hardware counter info, such as total cycles, floating point ops, cache +misses, and various other performance information depending on the target +architecture. PAPI must already be installed in order to enable this option. Building GPTL --------- --- +------------- -The simplest procedure for building GPTL is: +After untarring the distribution and then doing "cd gptl", construct a +macros.make file by editing one of the templates provided (currenty there's +macros.make.linux, and macros.make.sicortex) that is closest to the machine +you're building the library on. Step-by-step instructions for setting each +configuration option are embedded in that file. Then: -./configure -make -make install +% make all +% make install -Some important options to configure are: - ---enable-papi Enables support for the PAPI low-level counters library. ---with-papi= Specify path to root of PAPI installation (only useful if - --enable-papi also specified) ---enable-openmp Enables OpenMP threading support. This means the - same timer can be called from multiple threads. ---enable-pthreads Enables pthreads threading support. OpenMP is preferable - if available, because the pthreads option utilizes an - arbitrary (but changeable) upper limit on the number of - available threads. --enable-openmp overrides - --enable-pthreads if both are specified. ---enable-bit64 build 64-bit version of library. For now this only has an - effect on AIX and IRIX. ---enable-debug Turn on -g and turn off optimization compiler flags. ---enable-opt Turn on compiler optimization (recommended). ---prefix= For installing GPTL in a non-standard place. - -configure also accepts CC= and F77= command line options to specify C and -Fortran compilers, respectively. - -Don't hesitate to edit the Makefile that configure produces if you like. It -is quite straightforward. +In addition to building the library, the "make all" step will build test +codes in subdirectories ctests/ and (if applicable) ftests/. Currently +there's not an automated testing procedure. To test the library and see how +it works, you'll need to "cd" into ctests/ or ftests/ and run the desired +test executables individually. Using GPTL ------ --- +---------- Code instrumentation to utilize GPTL involves an arbitrary number of calls to GPTLsetoption(), then a single call to GPTLinitialize(), then an arbitrary @@ -78,7 +64,9 @@ allowed. The printed results will be indented to indicate the level of nesting. GPTLpr prints the results to a file named timing., where is -an input argument to GPTLpr. +an input argument to GPTLpr. For MPI jobs, it is most convenient to use the +MPI rank. There is also an entry point GPTLpr_file, which takes a single +argument which is the output file to write to. GPTLfinalize can be called to clean up the GPTL environment. All space malloc'ed by the GPTL library will be freed by this call. diff --git a/cfort.h b/cfort.h deleted file mode 100644 index bd9afbb9..00000000 --- a/cfort.h +++ /dev/null @@ -1,5 +0,0 @@ -#if ( defined GFORTRAN ) || ( defined G95 ) || ( defined LINUX ) -#define FORTRANDOUBLEUNDERSCORE -#elif ( defined SUNOS ) || ( defined IRIX64 ) || ( defined OSF1 ) || ( defined NEC_SX ) || ( defined UNICOSMP ) -#define FORTRANUNDERSCORE -#endif diff --git a/macros.make.linux b/macros.make.linux index 90a7d3b4..4d83aa23 100644 --- a/macros.make.linux +++ b/macros.make.linux @@ -24,16 +24,19 @@ else LDFLAGS += -lpthread endif -# For gcc, -Dinline=inline is a no-op. For other C compilers, things like -Dinline=__inline__ -# may be required. Autoconf test AC_C_INLINE can find the right definition. +# For gcc, -Dinline=inline is a no-op. For other C compilers, things like +# -Dinline=__inline__ may be required. Autoconf test AC_C_INLINE can find the +# right definition. INLINEFLAG = -Dinline=inline # To build the Fortran interface, set FORTRAN=yes and define the entries under # ifeq ($(FORTRAN),yes). Otherwise, set FORTRAN=no and skip this section. FORTRAN = yes ifeq ($(FORTRAN),yes) -# Fortran name mangling: possibilities are: leave UNDERSCORING blank (none), -# -DFORTRANDOUBLEUNDERSCORE (e.g. g77), and -DFORTRANUNDERSCORE (e.g. gfortran) +# Fortran name mangling: possibilities are: leave UNDERSCORING blank meaning none +# (e.g. xlf90), -DFORTRANDOUBLEUNDERSCORE (e.g. g77), and -DFORTRANUNDERSCORE +# (e.g. gfortran, pathf95) +# # UNDERSCORING = # UNDERSCORING = -DFORTRANDOUBLEUNDERSCORE UNDERSCORING = -DFORTRANUNDERSCORE