1
1

Added changes from VampirTrace-5.8

This commit was SVN r22436.
Этот коммит содержится в:
Matthias Jurenz 2010-01-18 09:32:57 +00:00
родитель 3fe5e3e142
Коммит da29975788
436 изменённых файлов: 60614 добавлений и 16859 удалений

Просмотреть файл

@ -22,7 +22,7 @@
# [action-if-cant-compile])
# ------------------------------------------------
AC_DEFUN([OMPI_contrib_vt_CONFIG],[
contrib_vt_args="--disable-option-checking --with-openmpi --disable-config-titles --disable-config-summary"
contrib_vt_args="--disable-option-checking --with-openmpi-inside"
contrib_vt_skip=no
eval "set x $ac_configure_args"; shift

Просмотреть файл

@ -1,5 +1,5 @@
VampirTrace is developped in collaboration with the KOJAK project
at ZAM/FZ Juelich (http://www.fz-juelich.de/zam/kojak)
at Juelich Supercomputing Centre (http://www.fz-juelich.de/jsc/kojak)
Staff at ZIH:
Matthias Jurenz
@ -7,6 +7,9 @@ Andreas Knuepfer
Ronny Brendel
Matthias Lieber
Jens Doleschal
Robert Henschel
Holger Mickler
Michael Heyde
Matthias Mueller
Staff at HLRS:
Rainer Keller

Просмотреть файл

@ -2,14 +2,26 @@
./configure CC=icc CXX=icpc F77=ifort FC=ifort --with-local-tmp-dir=/scratch --with-papi-dir=/opt/papi/3.2.1 --with-papi-lib="-lpapi /opt/papi/3.2.1/lib/libpfm.a" --with-dyninst-dir=/licsoft/tools/dyninst/5.0.1
+++ IBM Regatta p690+ (Research Centre Juelich)
./configure AR="ar -X32_64" CC=xlc_r CFLAGS="-O2 -g -q64" CXX=xlC_r CXXFLAGS="-O2 -g -q64" F77=xlf_r FFLAGS="-O2 -g -q64" FC=xlf90_r FCFLAGS="-O2 -g -q64" --with-papi-dir=/usr/local/beta/papi --with-papi-lib=-lpapi64
+++ IBM Power6 575 (Research Centre Juelich)
./configure AR="ar -X32_64" NM="nm -X32_64 -B" CC=xlc_r CFLAGS="-O2 -g -q64" CXX=xlC_r CXXFLAGS="-O2 -g -q64" F77=xlf_r FFLAGS="-O2 -g -q64" FC=xlf90_r FCFLAGS="-O2 -g -q64" MPICC=mpcc_r MPIF77=mpxlf_r --disable-shared --with-mpi-dir=/usr/lpp/ppe.poe --with-papi-dir=/usr/local/beta/papi --with-papi-lib=-lpapi64
+++ BlueGene/P (Research Centre Juelich)
./configure --build=powerpc64-unknown-linux-gnu --host=powerpc64-ibm-linux CC=bgxlc_r CXX=bgxlC_r F77=bgxlf_r FC=bgxlf95_r MPICC=mpixlc_r CC_FOR_BUILD=xlc_r --disable-shared CXX_FOR_BUILD=xlC_r --with-cross-prefix=bg --with-mpi-dir=/bgsys/drivers/V1R2M0_200_2008-080513P/ppc/comm/default --with-mpibgp --with-zlib-dir=/usr/local/bg_soft/zlib
+++ BlueGene/L (University of Edinburgh)
./configure CC=blrts_xlc CFLAGS="-O2 -g" CXX=blrts_xlC CXXFLAGS="-O2 -g" F77=blrts_xlf90 FC=blrts_xlf90 CC_FOR_BUILD=xlc_r CXX_FOR_BUILD=xlC_r MPICC=mpixlc --build=powerpc64-unknown-linux-gnu --host=powerpc64-ibm-linux --disable-shared --with-otf-lib=-lotf --with-mpi-dir=/bgl/BlueLight/ppcfloor/bglsys --with-mpi-lib=-lmpich.rts --with-pmpi-lib=-lmpich.rts --with-fmpi-lib=-lfmpich.rts
+++ NEC SX-8 (High Performance Computing Center Stuttgart)
./configure CC=sxcc CXX=sxc++ F77=sxf90 FC=sxf90 AR=sxar CXX_FOR_BUILD=c++ RANLIB="sxar st" OMPFLAG=-Popenmp --build=ia64-unknown-linux-gnu --host=sx8-nec-superux15.1 --with-otf-lib=-lotf
./configure CC=sxcc CXX=sxc++ F77=sxf90 FC=sxf90 AR=sxar MPICC=sxmpicc CC_FOR_BUILD=cc CXX_FOR_BUILD=c++ RANLIB="sxar st" OMPFLAG=-Popenmp --build=ia64-unknown-linux-gnu --host=sx8-nec-superux15.1 --with-otf-lib=-lotf
+++ Sun Fire E6900 (RWTH Aachen)
./configure CC=cc CXX=CC F77=f90 F90=f90 CFLAGS="-xtarget=ultra4 -fast -xarch=v9a" CXXFLAGS="-xtarget=ultra4 -fast -xarch=v9a" FCFLAGS="-xtarget=ultra4 -fast -xarch=v9a" FFLAGS="-xtarget=ultra4 -fast -xarch=v9a"
./configure CC=cc CXX=CC F77=f90 F90=f90 CFLAGS="-xtarget=ultra4 -fast -xarch=v9a" CXXFLAGS="-xtarget=ultra4 -fast -xarch=v9a" FCFLAGS="-xtarget=ultra4 -fast -xarch=v9a" FFLAGS="-xtarget=ultra4 -fast -xarch=v9a" --with-mpi-lib=-lmpi_mt --with-pmpi-lib=-lmpi_mt --enable-fmpi-lib
+++ Cray XT4 (NCCS)
PGI: ./configure CC="cc" CXX="CC" F77="ftn" FC="ftn" CFLAGS="-fastsse -Mipa=fast,inline -g" CXXFLAGS="-fastsse -Mipa=fast,inline -g" FFLAGS="-fastsse -Mipa=fast,inline -g" FCFLAGS="-fastsse -Mipa=fast,inline -g" --enable-compinst=pgi --enable-fmpi-lib --disable-iotrace --disable-libctrace --with-local-tmp-dir="."
GNU: ./configure CC="cc" CXX="CC" F77="ftn" FC="ftn" CFLAGS="-O3 -g" CXXFLAGS="-O3 -g" FFLAGS="-O3 -g" FCFLAGS="-O3 -g" --enable-compinst=gnu --enable-fmpi-lib --disable-iotrace --disable-libctrace --with-local-tmp-dir="."

Просмотреть файл

@ -1,8 +1,11 @@
Copyright (c) 2005-2008, ZIH, TU Dresden, Federal Republic of Germany
Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
Centre, Federal Republic of Germany
Copyright (c) 2007-2008, High Performance Computing Center Stuttgart,
Federal Republic of Germany
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
@ -15,10 +18,10 @@ this list of conditions and the following disclaimer.
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
- Neither the name of ZIH, TU Dresden or Forschungszentrum Juelich, Juelich
Supercomputing Centre nor the names of its contributors may be used to endorse
or promote products derived from this software without pecific prior written
permission.
- Neither the name of ZIH, TU Dresden, Forschungszentrum Juelich, Juelich
Supercomputing Centre, or High Performance Computing Center Stuttgart, nor the
names of its contributors may be used to endorse or promote products derived
from this software without pecific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

Просмотреть файл

@ -1,56 +1,237 @@
5.4.11
5.8openmpi
- updated version of internal OTF to 1.6.4openmpi
(see extlib/otf/ChangeLog)
- added support for tracing calls to arbitrary third party libraries
The new tool 'vtlibwrapgen' can be used to generate a wrapper library.
- extended the region filter mechanism to allow MPI-rank specific
filter directives
- added support for automatic instrumentation with PGI 9 compiler using
its new compiler flag '-Minstrument'
- disabled simultaneous support for multiple compiler instrumentation
types in one VampirTrace installation
(all known compiler instrumentation types for the compiler wrappers
(e.g. gnu,pgi,xl) are summarized by "compinst")
- added wrapper script 'vtjava' which invoke the usual Java application
launcher with the necessary options for tracing
- enhanced creating global definitions in vtunify
- create a process group with the real node name on CrayXT platforms
- fixed a bug which caused incomplete traces if using automatic instr.
for MPI/C++ applications on CrayXT platforms
- fixed erroneous error messaging in libc tracing
- fixed wrong order of attributes in 'vt_def_region'
- fixed erroneous reading of input filter file in vtfilter
5.4.10
- reduced list of supported MPI implementations to Open MPI
(support for other MPI implementations are available in the latest
stand-alone release of VampirTrace;
see http://www.tu-dresden.de/zih/vampirtrace/)
- changed meaning of configure option '--with-openmpi': this option
indicates an Open MPI internal build
- fixed a bug in Fortran MPI wrappers: added conversion for MPI_BOTTOM
and MPI_IN_PLACE
5.4.9
- updated version of internal OTF to 1.3.12 (see extlib/otf/ChangeLog)
5.7
- updated version of internal OTF to 1.6.1stingray
(see extlib/otf/ChangeLog)
- added support for MPI correctness checking by Universal MPI
Correctness Interface (UniMCI)
- added support for automatic instrumentation by using OpenUH compiler
(version 4.0 or higher required)
- added support for Java tracing using JVMTI
- added support for CPU ID tracing (requires GLIBC >= 2.6)
- added support for MPI-2 one-sided communication
- full support for MPI-2 I/O (using I/O begin/end records)
- improved tracing of nested POSIX/OpenMP threads: record parent thread
identifier of each child thread so that the parent-child relationship
will be evident
- improved tracing of POSIX threads: reuse thread identifiers of
terminated threads
- improved memory allocation tracing: write marker for each alloc/free
event which show the allocated/freed bytes
- added environment variable VT_MAX_STACK_DEPTH which can be used to
specify the maximum depth of call stack to record
- extended user API for intermediate time synchronization and buffer
flushes and for updating all counters which specified by the
environment variables VT_METRICS and VT_RUSAGE
- added support email address to assert strings and #error directives
- added writing of I/O begin/end records for LIBC's I/O tracing
- added support for tracing file locking via 'flockfile()', 'lockf()'
and 'fcntl()'
- use handle from dlopen(<libc>) for dlsym() calls instead of RTLD_NEXT
=> LIBC (+I/O) tracing works with statically linked programs now
- added support for cycle counter timer on Alpha and Sparc platforms
- install header files to 'PREFIX/include/vampirtrace' by default to
- added platform configurartion files that provide several default
options
- added configure check for function '__getReg' which required to use
the ITC timer on IA64/Linux
- added configure check for PAPI's special type 'long_long'
(will be defined, if the header file 'papi.h' doesn't provide this)
- install header files to 'PREFIX/include/vampirtrace' by default to
avoid conflicts with the OpenMPI integrated version of VT
- do not install 'vtCC' and the corresponding config file, if the file
system is case insensitive (e.g. HFS+ on MacOS X)
- added configure option '--with[out]-bfd' to control usage of BFD
library to get symbol information for GNU, Intel, and Pathscale
compiler instrumentation
- fixed detection of Sun Studio compiler on Linux for automatic
instrumentation
- preselect availability of MPI type converter functions
(e.g. MPI_Comm_f2c), if '--with-openmpi' was given
(further preselections for other MPI implementations will follow)
- fixed detection of Sun Studio compiler for automatic instrumentation
- fixed a bug in GNU demangling of C++ names
- fixed wrong output of dlsym errors in I/O tracing
- fixed faulty searching for matching filter directive
- fixed assertion which might be occurred during tracing applications
using pthreads and recording PAPI counters
- fixed not-increasing counter values for tracing threaded applications
- fixed a bug in Fortran MPI wrappers: added conversion for MPI_BOTTOM
and MPI_IN_PLACE
- fixed Fortran User API for markers
- fixed a bug in vtfilter: strip the '.otf'-suffix from input/output
trace file names, if necessary
- fixed a bug in the Fortran compiler wrappers: don't remove generated
- OPARI header files (*.opari.inc) before compiling the table source
- file (opari.tab.c)
- enhancement to OPARI (see tools/opari/ChangeLog:16,17)
- use handle from dlopen(<libc>) for dlsym() calls instead of RTLD_NEXT
- fixed segmentation fault when encountering invalid file descriptors
- use hard limit for maximum number of fds
5.4.8
- added wrapper for MPI function 'MPI_Init_thread'
- fixed potential segmentation fault during shutdown the trace
environment after tracing C++ programs
5.6.3
- updated version of internal OTF to 1.5.2dolphin
(see extlib/otf/ChangeLog)
- added environment variables VT_PFORM_LDIR_CHECK and
VT_PFORM_GDIR_CHECK to enable/disable checking for write access to
the local/global trace directories
- added configure variable 'NM' for the command to list symbols from
object files
- added configure options '--with-mvapich[2]' to set the MPI-libs for
MVAPICH[2]
- added configure check for header file 'asm/intrinsics.h' and
definition of '_IA64_REG_AR_ITC' which required to use the ITC timer
on IA64/Linux
- added support for demangling of C++ names also if the header file
'demangle.h' is not available
- do not build shared libraries on IBM BlueGene
- replaced usage of PATH_MAX by VT_PATH_MAX to avoid compile errors
on some platforms
5.4.7
(the cycle counter timer is not available on all Linux platforms)
- added configure check for header file 'asm/intrinsics.h' and
definition of '_IA64_REG_AR_ITC' which are required to use the
ITC timer on IA64/Linux
- fixed faulty timer selection in configure
- fixed compile error which occurred if support for enhanced time
synchronization enabled and using the Sun Performance Library from
Sun Studio 12
- fixed compile error on RedHat/CentOS due to missing header include
of 'cctype.h' in the sources of 'vtunify'
- fixed a bug in the compiler wrappers: add compiler flag '-I.' for
compiling OPARI modified sources in subdirectories in order to find
the corresponding OPARI include files
- fixed a bug in the compiler wrappers for Fortran: do not mix C flags
(especially the pthread flag '-D_THREAD_SAFE' for IBM compilers) with
Fortran compiler flags
- fixed faulty timer selection in configure
(the cycle counter timer is not available on all Linux platforms)
- fixed detection of Sun Studio compilers on Linux
(related to the automatic instrumentation)
- patch libtool to avoid a bug in detection of the Sun Studio Fortran
compiler
- fixed missing definition of vt_node_id in vt_pform_sun
- added wrapper for 'pthread_exit' for correct decomposition of the
call stack
- fixed I/O calls not being affected by region filters
- disabled recording of I/O events from within filtered out functions
- disabled recording of MPI messages from within filtered out functions
- check return value of MPI_Get_count in status handling
5.4.6
- updated version of internal OTF to 1.3.11 (see extlib/otf/ChangeLog)
- added support for Cray CNL
- added support for automatic instrumentation by using Pathscale
compiler (version 3.1 or higher required)
- fixed a bug in vtfilter where the tool dies when a counter appears
outside of function
- fixed faulty shell comparison in configure which may cause an infinite
loop
5.6.2
- replaced all dots in library names by dashs in order to avoid a
naming problem in libtool and for more consistent
- added dependencies to all necessary libraries (e.g. PAPI, BFD, etc.)
to the shared VT libraries
- changed default of VT_PFORM_LDIR to '.' on SiCortex platforms
- fixed use of gethostid() that may fail without error -> check return
value and retry
- use 1 MB buffer for copying traces from local to global destination,
may be tuned by VT_COPY_BUFFER_SIZE
5.6.1
- updated version of internal OTF to 1.5.1dolphin
(see extlib/otf/ChangeLog)
- added support for building shared libraries
- fixed compile error which occurred if configure was unable to find
MPI2 I/O support
- fixed compile error due to missing header include in the sources of
the compiler wrappers
- fixed faulty calculation of unique node id on SUN Solaris platforms
- fixed compiler flags for building OPARI's table object file
- fixed a bug which could prevent LIBC's I/O tracing
5.6
- updated version of internal OTF to 1.5 (see extlib/otf/ChangeLog)
- enhanced time synchronization
- added support for MPI-2 extended collective operations
- added support for recording statistics of MPI collective operations
- added support for hardware performance counters on NEC SX platforms
- added support for POSIX threads
- extended user API to record user-defined markers
- added wrapper for MPI function 'MPI_Init_thread'
- fixed faulty calculation of sent/received bytes for MPI_Bcast
5.5.4
- added support for OpenMP on BlueGene/P
- fixed invalid conversion from 'const char*' to 'char*' in macro
'VT_TRACER'
5.5.3
- updated version of internal OTF to 1.4.1 (see extlib/otf/ChangeLog)
- added support for NEC MPI/SX Fortran 8-Byte Integers
- added support for IBM BlueGene/P
- added configure options '--with-sunmpi[-mt]' to set MPI libs for
SUN MPI
- bugfix: added configure check for I/O functions functions 'fseeko()'
(this function is not available on NEC SX platforms)
- enhancement to OPARI (see tools/opari/ChangeLog:14,15)
- fixed faulty shell comparison in configure which may cause an infinite
loop
- fixed compile error: removed faulty header include for builds
without MPI support
- fixed stack corios during intercepting I/O function 'unlink()'
- fixed stack-level mismatch in regions with tracing disabled (VT_OFF)
in combination with MPI collective operations
- fixed faulty handling of MPI_F_STATUS[ES]_IGNORE in MPI wrapper
functions
5.5.2
- added wrapper for LIBC's I/O function 'unlink()'
- fixed a bug in handling of OpenMP critical sections
- fixed a bug in Fortran MPI wrappers: added conversion of MPI_Aint
5.5.1
- added wrapper functions for 'wait()' and 'waitpid()'
- improved tracing of 'fork()': automatic unifying of local traces
- added support for Cray CNL
- added option '-p' for vtunify to show a progress display during
unifying events
- added configure options to specify the installed MPI-implementation
(e.g. the option '--with-mpich2' sets the MPI-libs for MPICH2)
- fixed not-increasing timestamps during buffer flush
(occurred if memory allocation tracing was enabled)
- fixed missing variable-declarations in Fortran MPI wrappers
- fixed a bug in unique trace file naming which occurred when 'fork()'
used (child process gots a wrong unique file number)
- fixed a bug in vtfilter where the tool dies when a counter appears
outside of function
- enhancement to OPARI (see tools/opari/ChangeLog:15)
5.5
- updated version of internal OTF to 1.4 (see extlib/otf/ChangeLog)
- added support for automatic instrumentation by using Pathscale
compiler (version 3.1 or higher required)
- added support for recording function and message statistics
- extended user API for enable/disable tracing
- added wrapper functions for the complete MPI-1.2 standard,
MPI-2 One-Sided Communications, and MPI-2 I/O
- added support for tracing resource usage via 'getrusage()'
- added support for tracing 'fork()', 'system()', and 'exec' functions
- added support for unique trace file naming
- added determining of executable's path, if VT_APPPATH not given
(currently that works *only* for linux, altix, macos, ibm, and sun)
- set default trace file prefix to name of executable (from VT_APPPATH)
- added support for CPC hardware performance counter
- enhanced movement of the local temporary traces (VT_PFORM_LDIR) to
the global directory (VT_PFORM_GDIR), if both directories are on the
same device
- added configure option (--with-cross-prefix) to set a prefix for the
"cross"-executables of the compiler wrappers (e.g. cross-vtcc)
- added configure options (--with-wrapper-<cc|cxx|f77|f90>) to set the
default underlying compiler of the compiler wrappers
- enhancement to OPARI (see tools/opari/ChangeLog:14)
5.4.5
- updated version of internal OTF to 1.3.10 (see extlib/otf/ChangeLog)
@ -72,8 +253,8 @@
- fixed a bug for determining the timer-resolution for ITC
- added process group definition for MPI communicator MPI_COMM_SELF
- cleanup call stack when maximum number of flushes was reached
- added check if we can link '-lz' in order to pass either '-lotf -lz'
or just '-lotf' as OTF link option
- added configure check if we can link '-lz' in order to pass either
'-lotf -lz' or just '-lotf' as OTF link option
- renamed configure's option '--with[out]-mpi-io' to
'[enable/disable]-mpi-io' for more consistent
@ -90,7 +271,7 @@
5.4.2
- bugfix for VPATH builds
- added check for PAPI version to configure script
- added configure check for PAPI version
(only support for version 3.x)
5.4.1
@ -104,7 +285,7 @@
5.4.0
- updated version of internal OTF to 1.3.8 (see extlib/otf/ChangeLog)
- added support for user defined counters
- added support for user-defined counters
- if available, PAPI cycle counter can be used as timer
(see config.h after configure)
- recording of events will be stopped if the maximum number of
@ -151,12 +332,12 @@
- fixed potentially race condition by tracing OpenMP apps.
- fixed some little memory leaks
- fixed native counter issue on IA64 systems
- added check for header files 'stdint.h' and 'inttypes.h'; if none of
these files found, then own integer types will be defined
- added configure check for header files 'stdint.h' and 'inttypes.h';
if none of these files found, then own integer types will be defined
5.2.4
- updated version of internal OTF to 1.2.19 (see extlib/otf/ChangeLog)
- fixed compile error, which occurred by using old SUN compilers
- fixed compile error which occurred by using old SUN compilers
- added a configure summary
- added HP MPI support
- renamed Fortran MPI wrapper library to 'libvt.fmpi' to avoid possible
@ -169,8 +350,8 @@
(adjustable by configure option '--infodir')
- forward configure options '--exec-prefix', '--bindir', '--libdir', ',
'--includedir', and '--infodir' to configure command of internal OTF
- added checking for CPP-Style Fortran preprocessor of gfortran
- added checking for location of 'mmtimer.h'
- added configure check for CPP-Style Fortran preprocessor of gfortran
- added configure check for location of 'mmtimer.h'
- made sure that peers of events (e.g. msg. send enter + msg. send)
have the same timestamp
- clock synchronization can be forced
@ -184,7 +365,7 @@
5.2.1
- fixed several performance issues
- improved mechanism for getting clock cycles on IBM PPC64 machines
- the user can specify the mechanism, which used for getting timer
- the user can specify the mechanism which used for getting timer
(only for Linux, SGI Altix, IBM AIX, Cray X1
- see config.h after configure)
@ -194,7 +375,7 @@
- changed base name (e.g. environment variables, source files) to VT...
(see doc/USAGE)
- added OpenMP support by using OPARI instrumentation tool
- write process group records, which contain the location of processes
- write process group records which contain the location of processes
(node name)
- added tool 'vtconfig' to simplify determining the right compiler and
linker flags
@ -221,7 +402,7 @@
- enhanced progress display of elg_otfunify
5.1.3
- fixed little bugs in build system, which occurred if multiple
- fixed little bugs in build system which occurred if multiple
mode building used (Makefile.32-64)
- added support for clusters of IBM Power3/4 machines
and Linux PPC cluster with IBM compilers
@ -239,7 +420,7 @@
- added region filter and grouping managment
5.0.6
- added creator informations of tracefile (tracelib, version, date
- added creator informations of trace file (tracelib, version, date
and time)
- reduced offset of process group token
- improved name of process groups

Просмотреть файл

@ -20,8 +20,12 @@ How to install and configure VampirTrace
However, for more details, read also the following instructions. Sometimes
it might be necessary to provide ./configure with options, e.g.
specifications of paths or compilers. Consult the CONFIG-EXAMPLES file to
get an idea of how to configure VampirTrace for your platform.
specifications of paths or compilers.
VampirTrace comes with example programs written in C, C++, and Fortran.
They can be used to test different instrumentation types of the
VampirTrace installation.
You can find them in the directory examples of the VampirTrace package.
Configure Options
@ -50,39 +54,123 @@ How to install and configure VampirTrace
* Optional Features
--enable-compinst=COMPINSTLIST
enable support for compiler instrumentation
(gnu,intel,pgi,phat,xl,ftrace), default:
automatically by configure
NOTE: the first item in list is the default
instrumentation type for the compiler-wrapper
--enable-compinst=LIST
enable support for compiler instrumentation,
(gnu,intel,pathscale,pgi,sun,xl,ftrace,openuh)
A VampirTrace installation can handle different
compilers. The first item in the list is the
run-time default.
default: automatically by configure
--enable-mpi enable MPI support, default: enable if
Open MPI found by configure
--enable-dyninst
enable support for Dyninst instrumentation,
default: enable if found by configure
Note: Requires Dyninst version 5.1 or higher!
--enable-omp enable OpenMP support, default: enable if given
compiler supports OpenMP
--enable-dyninst-attlib
build shared library which attaches Dyninst to
the running application, default: enable if
Dyninst found by configure and system supports
shared libraries
--enable-hyb enable Hybrid (MPI/OpenMP) support, default:
enable if MPI-installation found and given
compiler supports OpenMP
--enable-iotrace
enable LIBC's I/O tracing support, default: enable
if libdl found by configure
--enable-dyninst enable support for binary-instrumentation using
Dyninst, default: enable if found by configure
Note: needs Dyninst version 5.0.1 or higher !
(downloadable at http://www.dyninst.org)
--enable-libctrace
enable tracing support for several LIBC functions,
default: enable if libdl found by configure
--enable-dyninst-attlib build shared library which attach dyninst to running
user's application, default: enable if dyninst found
by configure and system supports shared libraries
--enable-memtrace
enable memory tracing support, default: enable if
found by configure
--enable-papi enable PAPI hardware counter support, default:
--enable-cpuidtrace
enable CPU ID tracing support, default: enable if
found by configure
--enable-rutrace
enable resource usage tracing support, default:
enable if found by configure
--enable-metrics=TYPE
enable support for hardware performance counter
(papi,cpc,necsx), default: automatically by
configure
--enable-zlib
enable ZLIB trace compression support, default:
enable if found by configure
--enable-mpi
enable MPI support, default: enable if
MPI found by configure
--enable-fmpi-lib
build the MPI Fortran support library, in case your
system does not have a MPI Fortran library.
default: enable if no MPI Fortran library
found by configure
--enable-fmpi-handle-convert
do convert MPI handles, default: enable if MPI
conversion functions found by configure
--enable-mpi2-thread
enable MPI-2 Thread support, default: enable if
found by configure
--enable-mpi2-1sided
enable MPI-2 One-Sided Communication support,
default: enable if found by configure
--enable-mpi2-extcoll
enable MPI-2 Extended Collective Operation support,
default: enable if found by configure
--enable-mpi2-io
enable MPI-2 I/O support, default: enable if found
by configure
--enable-mpicheck
enable support for Universal MPI Correctness
Interface (UniMCI), default: enable if
unimci-config found by configure
--enable-etimesync
enable enhanced timer synchronization support,
default: enable if C-LAPACK found by configure
--enable-threads=LIST
enable support for threads (pthread, omp), default:
automatically by configure
--enable-java
enable Java support, default: enable if JVMTI
found by configure
* Important Optional Packages
--with-local-tmp-dir=LTMPDIR
This a summary of the most important optional features. For a full list
of all available features run `./configure --help'.
--with-platform=PLATFORM
configure for given platform
(altix,bgl,bgp,crayt3e,crayx1,crayxt,ibm,linux,
macos,necsx,origin,sicortex,sun,generic),
default: automatically by configure
--with-bitmode=<32|64>
specify bit mode
--with-options=FILE
load options from FILE, default: configure
searches for a config file in config/defaults
based on given platform and bitmode
--with-local-tmp-dir=DIR
give the path for node-local temporary directory,
default: /tmp
@ -90,15 +178,18 @@ How to install and configure VampirTrace
temporary trace files.
If you would like to use an external version of OTF library, set
--with-extern-otf use external OTF library, default: not set
--with-extern-otf
use external OTF library, default: not seta
--with-extern-otf-dir=OTFDIR
give the path for OTF, default: /usr
--with-otf-extra-opts=OTFEXTRAOPTS
extra options for OTF configuration
--with-otf-flags=FLAGS
pass FLAGS to the OTF distribution configuration
(only for internal OTF version)
--with-otf-lib=OTFLIB use given otf lib, default: -lotf -lz
--with-otf-lib=OTFLIB
use given otf lib, default: -lotf -lz
If used OTF library was built without zlib support, then it will do
to set OTFLIB to '-lotf'.
@ -109,11 +200,15 @@ How to install and configure VampirTrace
--with-papi-dir=PAPIDIR
give the path for PAPI, default: /usr
--with-cpc-dir=CPCDIR
give the path for CPC, default: /usr
If you don't have specified the environment variable MPICC
(MPI compiler command), use following options to set location
of your MPI installation:
--with-mpi-dir=MPIDIR give the path for MPI, default: /usr
--with-mpi-dir=MPIDIR
give the path for MPI, default: /usr
--with-mpi-inc-dir=MPIINCDIR
give the path for MPI-include-files, default:
@ -123,9 +218,113 @@ How to install and configure VampirTrace
give the path for MPI-libraries, default:
MPIDIR/lib
--with-mpi-lib=MPILIB use given mpi lib
--with-mpi-lib
use given mpi lib
--with-pmpi-lib=PMPILIB use given pmpi lib, default MPILIB
--with-pmpi-lib
use given pmpi lib
If your system does not have a MPI Fortran library,
set '--enable-fmpi-lib' (see above), otherwise set
--with-fmpi-lib
use given fmpi lib
Use the following options to specify your MPI-implementation
--with-hpmpi set MPI-libs for HP MPI
--with-intelmpi set MPI-libs for Intel MPI
--with-intelmpi2 set MPI-libs for Intel MPI2
--with-lam set MPI-libs for LAM/MPI
--with-mpibgl set MPI-libs for IBM BG/L
--with-mpibgp set MPI-libs for IBM BG/P
--with-mpich set MPI-libs for MPICH
--with-mpich2 set MPI-libs for MPICH2
--with-mvapich set MPI-libs for MVAPICH
--with-mvapich2 set MPI-libs for MVAPICH2
--with-mpisx set MPI-libs for NEC MPI/SX
--with-mpisx-ew set MPI-libs for NEC MPI/SX with
8 Byte Fortran Integer
--with-openmpi set MPI-libs for Open MPI
--with-sgimpt set MPI-libs for SGI MPT
--with-sunmpi set MPI-libs for SUN MPI
--with-sunmpi-mt set MPI-libs for SUN MPI-MT
To enable enhanced timer synchronization a LAPACK library with C wrapper
support is needed:
--with-clapack-dir=LAPACKDIR
set the path for CLAPACK,
default: /usr
--with-clapack-lib
set CLAPACK-libs, default:
-lclapack -lcblas -lf2c
--with-clapack-acml set CLAPACK-libs for ACML
--with-clapack-essl set CLAPACK-libs for ESSL
--with-clapack-mkl set CLAPACK-libs for MKL
--with-clapack-sunperf set CLAPACK-libs for SUN Performance Library
To enable Java support the JVM Tool Interface (JVMTI) version 1.0 or
higher is needed:
--with-jvmti-dir=JVMTIDIR
give the path for JVMTI, default: JAVA_HOME
--with-jvmti-inc-dir=JVMTIINCDIR
give the path for JVMTI-include files, default:
JVMTI/include
Cross Compilation
-----------------
Building VampirTrace on cross compilation platforms needs some special attention.
The compiler wrappers and OPARI are built for the front-end (build system) whereas
the VampirTrace libraries, vtdyn, vtunify, and vtfilter are built for the back-end
(host system). Some configure options which are of interest for cross compilation
are shown below:
* Set CC, CXX, F77, and FC to the cross compilers installed on the front-end.
* Set CXX_FOR_BUILD to the native compiler of the front-end
(used to compile compiler wrappers and OPARI only).
* Set --host= to the output of config.guess on the back-end.
* Set --with-cross-prefix= to a prefix which will be prepended to the executables
of the compiler wrappers and OPARI (default: cross-)
* Maybe you also need to set additional commands and flags for the back-end
(e.g. RANLIB, AR, MPICC, CXXFLAGS).
For example, this configure command line works for an NEC SX6 system with an X86_64
based front-end:
./configure CC=sxcc CXX=sxc++ F77=sxf90 FC=sxf90 MPICC=sxmpicc
AR=sxar RANLIB="sxar st" CXX_FOR_BUILD=c++
--host=sx6-nec-superux14.1
--with-cross-prefix=sx
--with-otf-lib=-lotf
Set up the Environment
@ -149,25 +348,14 @@ How to install and configure VampirTrace
Notes for Developers
--------------------
* Building
* Build from CVS
If you have checked out a DEVELOPER'S COPY of VampirTrace (i.e. you
checked out from CVS), you should first run:
$ ./bootstrap
$ ./bootstrap [--otf-package <package>] [--version <version>]
(Note that GNU Autoconf 2.53 or higher is required.)
* Creating a distribution tarball (VampirTrace-X.X.X.tar.gz)
If you would like create a new distribution tarball, run:
$ ./makedist <version> <otftarball>
instead of 'make dist'.
The script 'makedist' adapts the version number (<version>) in
configure.in and extracts given OTF-tarball (<otftarball>) in
./extlib/otf.
Note that GNU Autoconf >= 2.60 and GNU Automake >= 1.9.6 is required.
You can download them from http://www.gnu.org/software/autoconf and
http://www.gnu.org/software/automake.

Просмотреть файл

@ -1,8 +1,11 @@
Copyright (c) 2005-2008, ZIH, TU Dresden, Federal Republic of Germany
Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
Centre, Federal Republic of Germany
Copyright (c) 2007-2008, High Performance Computing Center Stuttgart,
Federal Republic of Germany
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
@ -15,10 +18,10 @@ this list of conditions and the following disclaimer.
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
- Neither the name of ZIH, TU Dresden or Forschungszentrum Juelich, Juelich
Supercomputing Centre nor the names of its contributors may be used to endorse
or promote products derived from this software without pecific prior written
permission.
- Neither the name of ZIH, TU Dresden, Forschungszentrum Juelich, Juelich
Supercomputing Centre, or High Performance Computing Center Stuttgart, nor the
names of its contributors may be used to endorse or promote products derived
from this software without pecific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

Просмотреть файл

@ -1,17 +1,41 @@
ACLOCAL_AMFLAGS = -I config/m4
SUBDIRS = \
util \
extlib \
vtlib \
tools \
doc
doc \
etc
vtdata_SCRIPTS = $(top_builddir)/libtool
vtdatadir = $(datadir)
EXTRA_DIST = \
config_bottom.h \
CONFIG-EXAMPLES \
VERSION \
config/defaults/bgl \
config/defaults/bgp \
config/defaults/ibm \
config/defaults/ibm-64 \
config/defaults/sicortex \
config/defaults/sicortex-32 \
config/defaults/sun \
config/defaults/necsx \
config/mpigen/c_dont_generate.txt \
config/mpigen/fortran_dont_generate.txt \
config/mpigen/mpi_standard.h \
config/mpigen/mpi2_1sided.h \
config/mpigen/mpi2_extcoll.h \
config/mpigen/mpi2_file.h \
config/mpigen/mpi2_proc.h \
config/mpigen/mpi2_thread.h \
config/mpigen/mpi2_standard.h \
examples/c/Makefile \
examples/c/Makefile.config \
examples/c/hello.c \
examples/c/mdlbrot.c \
examples/c/pi.c \
examples/c/ring.c \
examples/cxx/Makefile \

Просмотреть файл

@ -8,3 +8,5 @@ VampirTrace version is available as open source software under the BSD license,
For instructions on how use VampirTrace to instrument application programs so that they produce an OTF event trace when executed, see 'doc/UserManual.pdf'.
Please, report bugs, wishes, and suggestions to
<vampirsupport@zih.tu-dresden.de>.

Просмотреть файл

@ -1,37 +1 @@
# This is the VERSION file for VampirTrace, describing the precise
# version of VampirTrace in this distribution. The various components of
# the version number below are combined to form a single version
# number string.
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If release is zero, then it is omitted.
major=5
minor=4
release=11
# greek is used for alpha or beta release tags. If it is non-empty,
# it will be appended to the version number. It does not have to be
# numeric. Common examples include a1 (alpha release 1),
# b1 (beta release 1), sc2005 (Super Computing 2005 release). The
# only requirement is that it must be entirely printable ASCII
# characters and have no white space.
greek=
# If want_svn=1, then the SVN r number will be included in the overall
# VampirTrace version number in some form.
want_svn=0
# If svn_r=-1, then the SVN r numbere will be obtained dynamically at
# run time, either 1) via the "svnversion" command (if this is a
# Subversion checkout) in the form "r<svn_r>", or b) with the date (if
# this is not a Subversion checkout, and the svnversion command cannot
# be used) in the form of "svn<date>". Alternatively, if svn_r is not
# -1, the value of svn_r will be directly appended to the version
# string. This happens during "make dist", for example: if the
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=
5.8openmpi

Разница между файлами не показана из-за своего большого размера Загрузить разницу

344
ompi/contrib/vt/vt/config.h.in Обычный файл
Просмотреть файл

@ -0,0 +1,344 @@
/* config.h.in. Generated from configure.in by autoheader. */
#ifndef _CONFIG_H
#define _CONFIG_H
/* default pathname of LIBC */
#undef DEFAULT_LIBC_PATHNAME
/* Path for node-local temporary directory */
#undef DEFAULT_PFORM_LDIR
/* Define to 1 if you have the ACML. */
#undef HAVE_ACML
/* Define to 1 if you have the <asm/intrinsics.h> header file. */
#undef HAVE_ASM_INTRINSICS_H
/* Define to 1 if you have the `asprintf' function. */
#undef HAVE_ASPRINTF
/* Define to 1 if you have the <catamount/data.h> header file. */
#undef HAVE_CATAMOUNT_DATA_H
/* Define to 1 if you have the <catamount/dclock.h> header file. */
#undef HAVE_CATAMOUNT_DCLOCK_H
/* Define to 1 if you have the `creat64' function. */
#undef HAVE_CREAT64
/* Define to 1 if you have the declaration of `long_long', and to 0 if you
don't. */
#undef HAVE_DECL_LONG_LONG
/* Define to 1 if you have the declaration of `MPI_IN_PLACE', and to 0 if you
don't. */
#undef HAVE_DECL_MPI_IN_PLACE
/* Define to 1 if you have the declaration of `MPI_STATUS_SIZE', and to 0 if
you don't. */
#undef HAVE_DECL_MPI_STATUS_SIZE
/* Define to 1 if you have the declaration of `RTLD_NEXT', and to 0 if you
don't. */
#undef HAVE_DECL_RTLD_NEXT
/* Define to 1 if you have the <demangle.h> header file. */
#undef HAVE_DEMANGLE_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the ESSL. */
#undef HAVE_ESSL
/* Define to 1 if you have the `execl' function. */
#undef HAVE_EXECL
/* Define to 1 if you have the `execle' function. */
#undef HAVE_EXECLE
/* Define to 1 if you have the `execlp' function. */
#undef HAVE_EXECLP
/* Define to 1 if you have the `execv' function. */
#undef HAVE_EXECV
/* Define to 1 if you have the `execve' function. */
#undef HAVE_EXECVE
/* Define to 1 if you have the `execvp' function. */
#undef HAVE_EXECVP
/* Define to 1 if VT is configured with Fortran 77 support. */
#undef HAVE_F77
/* Define to 1 if VT is configured with Fortran 90 support. */
#undef HAVE_F90
/* Define to 1 if you have the `flockfile' function. */
#undef HAVE_FLOCKFILE
/* Define to 1 if VT is configured with MPI Fortran support. */
#undef HAVE_FMPI
/* Define to 1 if you have the <fnmatch.h> header file. */
#undef HAVE_FNMATCH_H
/* Define to 1 if you have the `fopen64' function. */
#undef HAVE_FOPEN64
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
/* Define to 1 if you have the `fseeko' function. */
#undef HAVE_FSEEKO
/* Define to 1 if you have the `fseeko64' function. */
#undef HAVE_FSEEKO64
/* Define to 1 if you have the `fsetpos64' function. */
#undef HAVE_FSETPOS64
/* Define to 1 if you have the `ftrylockfile' function. */
#undef HAVE_FTRYLOCKFILE
/* Define to 1 if you have the `funlockfile' function. */
#undef HAVE_FUNLOCKFILE
/* Define to 1 if you can use GNU demangling of C++ names. */
#undef HAVE_GNU_DEMANGLE
/* Define to 1 if VT is configured with Hybrid (MPI/Threads) support. */
#undef HAVE_HYBRID
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <linux/mmtimer.h> header file. */
#undef HAVE_LINUX_MMTIMER_H
/* Define to 1 if you have the `lockf' function. */
#undef HAVE_LOCKF
/* Define to 1 if you have the `lseek64' function. */
#undef HAVE_LSEEK64
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the MKL. */
#undef HAVE_MKL
/* Define to 1 if you have the <mmtimer.h> header file. */
#undef HAVE_MMTIMER_H
/* Define to 1 if VT is configured with MPI support. */
#undef HAVE_MPI
/* Define to 1 if you have functions for MPI-2 One-Sided Communications. */
#undef HAVE_MPI2_1SIDED
/* Define to 1 if you have functions for MPI-2 Extended Collective Operations.
*/
#undef HAVE_MPI2_EXTCOLL
/* Define to 1 if you have functions for MPI-2 I/O. */
#undef HAVE_MPI2_IO
/* Define to 1 if you have functions for MPI-2 Thread support. */
#undef HAVE_MPI2_THREAD
/* Define to 1 if VT is configured with OpenMP support. */
#undef HAVE_OMP
/* Define to 1 if you have the `open64' function. */
#undef HAVE_OPEN64
/* Define to 1 if you have the `pread64' function. */
#undef HAVE_PREAD64
/* Define to 1 if VT is configured with Pthreads support. */
#undef HAVE_PTHREAD
/* Define to 1 if you have the `pwrite64' function. */
#undef HAVE_PWRITE64
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <sn/mmtimer.h> header file. */
#undef HAVE_SN_MMTIMER_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the SUN Performance Library. */
#undef HAVE_SUNPERF
/* Define to 1 if you have the `system' function. */
#undef HAVE_SYSTEM
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if VT is configured with Threads support. */
#undef HAVE_THREADS
/* Define to 1 if you have the `__va_copy' function. */
#undef HAVE_UNDERSCORE_VA_COPY
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vasprintf' function. */
#undef HAVE_VASPRINTF
/* Define to 1 if you have the `va_copy' function. */
#undef HAVE_VA_COPY
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
/* Define to 1 if you have the `wait' function. */
#undef HAVE_WAIT
/* Define to 1 if you have the `waitpid' function. */
#undef HAVE_WAITPID
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of `mode_t', as computed by sizeof. */
#undef SIZEOF_MODE_T
/* The size of `void*', as computed by sizeof. */
#undef SIZEOF_VOIDP
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Use timer (see below) */
#undef TIMER
/* Use `_bgp_GetTimeBase' function */
#undef TIMER_BGP_GET_TIMEBASE
/* Use `clock_gettime' function */
#undef TIMER_CLOCK_GETTIME
/* CRAY Real-Time-Clock */
#undef TIMER_CRAY_RTCLOCK
/* Cycle counter (e.g. TSC) */
#undef TIMER_CYCLE_COUNTER
/* Use `dclock' function */
#undef TIMER_DCLOCK
/* gethrtime */
#undef TIMER_GETHRTIME
/* Use `gettimeofday' function */
#undef TIMER_GETTIMEOFDAY
/* Define to 1 if the selected timer is global (doesn't need synchronization)
*/
#undef TIMER_IS_GLOBAL
/* Intel Multimedia Timer */
#undef TIMER_MMTIMER
/* PAPI_get_real_cyc */
#undef TIMER_PAPI_REAL_CYC
/* PAPI_get_real_usec */
#undef TIMER_PAPI_REAL_USEC
/* IBM Power family Real-Time-Clock */
#undef TIMER_POWER_REALTIME
/* RTC (DOES NOT WORK YET WITH FORTRAN CODES) */
#undef TIMER_RTC
/* Use `rts_get_timebase' function */
#undef TIMER_RTS_GET_TIMEBASE
/* Hardware Switch-Clock (it's necessary to link your application with
'-lswclock') */
#undef TIMER_SWITCH_CLOCK
/* NEC SX HGTIME */
#undef TIMER_SYSSX_HGTIME
/* UniMCI's checker name */
#undef UNIMCI_CHECKER_NAME
/* UniMCI's checker version */
#undef UNIMCI_CHECKER_VERSION
/* Version number of package */
#undef VERSION
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
#include "config_bottom.h"
#endif /* _CONFIG_H */

14
ompi/contrib/vt/vt/config/defaults/bgl Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
CC="blrts_xlc"
CXX="blrts_xlC"
F77="blrts_xlf90"
FC="blrts_xlf90"
MPICC="mpixlc"
CC_FOR_BUILD="xlc_r"
CXX_FOR_BUILD="xlC_r"
enable_shared="no"
enable_threads="no"
enable_libctrace="no"
enable_iotrace="no"
enable_cpuidtrace="no"
with_cross_prefix="blrts_"
with_mpibgl="yes"

14
ompi/contrib/vt/vt/config/defaults/bgp Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
CC="bgxlc_r"
CXX="bgxlC_r"
F77="bgxlf_r"
FC="bgxlf95_r"
MPICC="mpixlc_r"
CC_FOR_BUILD="xlc_r"
CXX_FOR_BUILD="xlC_r"
enable_shared="no"
enable_threads="no"
enable_libctrace="no"
enable_iotrace="no"
enable_cpuidtrace="no"
with_cross_prefix="bg"
with_mpibgp="yes"

14
ompi/contrib/vt/vt/config/defaults/ibm Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
CC="xlc_r"
CXX="xlC_r"
F77="xlf_r"
FC="xlf90_r"
CFLAGS="-O2 -qsuppress=1500-030"
CXXFLAGS="-O2 -qstaticinline -qrtti -qsuppress=1500-029:1500-030"
FFLAGS="-O2 -qsuppress=cmpmsg"
FCFLAGS="-O2"
OPENMP_CFLAGS="-qsmp=omp"
PTHREAD_CFLAGS="-D_THREAD_SAFE"
PTHREAD_LIBS="-lpthreads"
enable_shared="no"
enable_memtrace="no"
enable_cpuidtrace="no"

15
ompi/contrib/vt/vt/config/defaults/ibm-64 Обычный файл
Просмотреть файл

@ -0,0 +1,15 @@
AR="ar -X64"
CC="xlc_r"
CXX="xlC_r"
F77="xlf_r"
FC="xlf90_r"
CFLAGS="-q64 -O2 -qsuppress=1500-030"
CXXFLAGS="-q64 -O2 -qstaticinline -qrtti -qsuppress=1500-029:1500-030:1501-201"
FFLAGS="-q64 -O2 -qsuppress=cmpmsg"
FCFLAGS="-q64 -O2"
OPENMP_CFLAGS="-qsmp=omp"
PTHREAD_CFLAGS="-D_THREAD_SAFE"
PTHREAD_LIBS="-lpthreads"
enable_shared="no"
enable_memtrace="no"
enable_cpuidtrace="no"

25
ompi/contrib/vt/vt/config/defaults/necsx Обычный файл
Просмотреть файл

@ -0,0 +1,25 @@
AR="sxar"
CC="sxcc"
CXX="sxc++"
F77="sxf90"
FC="sxf90"
CCAS="sxas"
MPICC="sxmpicc"
MPIF77="sxmpif90"
CC_FOR_BUILD="cc"
CXX_FOR_BUILD="c++"
CFLAGS="-Csopt"
CXXFLAGS="-Csopt"
FFLAGS="-Csopt"
FCFLAGS="-Csopt"
OPENMP_CFLAGS="-Popenmp"
PTHREAD_LIBS="-lpthread"
enable_shared="no"
enable_memtrace="no"
enable_libctrace="no"
enable_iotrace="no"
enable_cpuidtrace="no"
enable_mpi2_io="no"
enable_metrics="necsx"
with_cross_prefix="sx"
with_mpisx="yes"

14
ompi/contrib/vt/vt/config/defaults/sicortex Обычный файл
Просмотреть файл

@ -0,0 +1,14 @@
CC="scpathcc"
CXX="scpathCC"
F77="scpathf95"
FC="scpathf95"
MPICC="scmpicc"
MPIF77="scmpif77"
CC_FOR_BUILD="gcc"
CXX_FOR_BUILD="g++"
OPENMP_CFLAGS="-mp"
PTHREAD_CFLAGS="-pthread"
enable_fmpi_lib="yes"
with_mpi_lib="-lscmpi"
with_pmpi_lib="-lscmpi"
with_cross_prefix="sc"

Просмотреть файл

@ -0,0 +1,20 @@
CC="scpathcc32"
CXX="scpathCC32"
F77="scpathf9532"
FC="scpathf9532"
MPICC="scmpicc32"
MPIF77="scmpif7732"
CFLAGS="-mabi=n32"
CXXFLAGS="-mabi=n32"
FFLAGS="-mabi=n32"
FCFLAGS="-mabi=n32"
CC_FOR_BUILD="gcc"
CXX_FOR_BUILD="g++"
CFLAGS_FOR_BUILD="-m32"
CXXFLAGS_FOR_BUILD="-m32"
OPENMP_CFLAGS="-mp"
PTHREAD_CFLAGS="-pthread"
enable_fmpi_lib="yes"
with_mpi_lib="-lscmpi"
with_pmpi_lib="-lscmpi"
with_cross_prefix="sc"

13
ompi/contrib/vt/vt/config/defaults/sun Обычный файл
Просмотреть файл

@ -0,0 +1,13 @@
CC="cc"
CXX="CC"
F77="f77"
FC="f95"
CFLAGS="-xO3"
CXXFLAGS="-xO3"
FFLAGS="-xO3"
FCFLAGS="-xO3"
OPENMP_CFLAGS="-xopenmp -xO3 -D_REENTRANT"
PTHREAD_CFLAGS="-D_REENTRANT"
PTHREAD_LIBS="-lpthread"
enable_memtrace="no"
enable_cpuidtrace="no"

Просмотреть файл

@ -0,0 +1,238 @@
dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
dnl @summary figure out how to build C programs using POSIX threads
dnl
dnl This macro figures out how to build C programs using POSIX threads.
dnl It sets the PTHREAD_LIBS output variable to the threads library and
dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
dnl C compiler flags that are needed. (The user can also force certain
dnl compiler flags/libs to be tested by setting these environment
dnl variables.)
dnl
dnl Also sets PTHREAD_CC to any special C compiler that is needed for
dnl multi-threaded programs (defaults to the value of CC otherwise).
dnl (This is necessary on AIX to use the special cc_r compiler alias.)
dnl
dnl NOTE: You are assumed to not only compile your program with these
dnl flags, but also link it with them as well. e.g. you should link
dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
dnl $LIBS
dnl
dnl If you are only building threads programs, you may wish to use
dnl these variables in your default LIBS, CFLAGS, and CC:
dnl
dnl LIBS="$PTHREAD_LIBS $LIBS"
dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
dnl CC="$PTHREAD_CC"
dnl
dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
dnl default action will define HAVE_PTHREAD.
dnl
dnl Please let the authors know if this macro fails on any platform, or
dnl if you have any other suggestions or comments. This macro was based
dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
dnl We are also grateful for the helpful feedback of numerous users.
dnl
dnl @category InstalledPackages
dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
dnl @version 2005-06-15
dnl @license GPLWithACException
AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
AC_LANG_C
acx_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
AC_MSG_RESULT($acx_pthread_ok)
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# ... -mt is also the pthreads flag for HP/aCC
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
;;
esac
if test x"$acx_pthread_ok" = xno; then
for flag in $acx_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
if test x"$acx_pthread_config" = xno; then continue; fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($acx_pthread_ok)
if test "x$acx_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$acx_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_MSG_CHECKING([for joinable pthread attribute])
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
[attr_name=$attr; break])
done
AC_MSG_RESULT($attr_name)
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with cc_r
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
else
PTHREAD_CC="$CC"
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
acx_pthread_ok=no
$2
fi
AC_LANG_RESTORE
])dnl ACX_PTHREAD

Просмотреть файл

@ -0,0 +1,71 @@
dnl @synopsis AX_OPENMP([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
dnl @summary determine how to compile programs using OpenMP
dnl
dnl This macro tries to find out how to compile programs that use
dnl OpenMP a standard API and set of compiler directives for parallel
dnl programming (see http://www-unix.mcs/)
dnl
dnl On success, it sets the
dnl OPENMP_CFLAGS/OPENMP_CXXFLAGS/OPENMP_F77FLAGS output variable to
dnl the flag (e.g. -omp) used both to compile *and* link OpenMP
dnl programs in the current language.
dnl
dnl NOTE: You are assumed to not only compile your program with these
dnl flags, but also link it with them as well.
dnl
dnl If you want to compile everything with OpenMP, you should set:
dnl
dnl CFLAGS="$CFLAGS $OPENMP_CFLAGS"
dnl #OR# CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
dnl #OR# FFLAGS="$FFLAGS $OPENMP_FFLAGS"
dnl
dnl (depending on the selected language).
dnl
dnl The user can override the default choice by setting the
dnl corresponding environment variable (e.g. OPENMP_CFLAGS).
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if an OpenMP
dnl flag is found, and ACTION-IF-NOT-FOUND is a list of commands to run
dnl it if it is not found. If ACTION-IF-FOUND is not specified, the
dnl default action will define HAVE_OPENMP.
dnl
dnl @category InstalledPackages
dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
dnl @version 2006-01-24
dnl @license GPLWithACException
AC_DEFUN([AX_OPENMP], [
AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown
# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI),
# -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX),
# -Popenmp (NECSX), none
ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp -Popenmp none"
if test "x$OPENMP_[]_AC_LANG_PREFIX[]FLAGS" != x; then
ax_openmp_flags="$OPENMP_[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flags"
fi
for ax_openmp_flag in $ax_openmp_flags; do
case $ax_openmp_flag in
none) []_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[] ;;
*) []_AC_LANG_PREFIX[]FLAGS="$save[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flag" ;;
esac
AC_TRY_COMPILE([], [
#ifndef _OPENMP
# error "_OPENMP not defined"
#endif
], [ax_cv_[]_AC_LANG_ABBREV[]_openmp=$ax_openmp_flag; break])
done
[]_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[]FLAGS
])
if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" = "xunknown"; then
m4_default([$2],:)
else
if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" != "xnone"; then
OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ax_cv_[]_AC_LANG_ABBREV[]_openmp
fi
m4_default([$1],:)
fi
])dnl AX_OPENMP

Просмотреть файл

@ -0,0 +1,71 @@
AC_DEFUN([ACVT_BFD],
[
bfd_error="no"
check_bfd="yes"
force_bfd="no"
have_bfd="no"
BFDDIR=
BFDINCDIR=
BFDLIBDIR=
BFDLIB=
AC_ARG_WITH(bfd,
AC_HELP_STRING([--with-bfd], [use BFD to get symbol information of an executable instrumented with GNU, Intel, or Pathscale compiler, default: yes]),
[AS_IF([test x"$withval" = "xyes"], [force_bfd="yes"], [check_bfd="no"])])
AC_ARG_WITH(bfd-dir,
AC_HELP_STRING([--with-bfd-dir=BFDDIR], [give the path for BFD, default: /usr]),
[BFDDIR="$withval/"])
AC_ARG_WITH(bfd-inc-dir,
AC_HELP_STRING([--with-bfd-inc-dir=BFDINCDIR],
[give the path for BFD-include files, default: BFDDIR/include]),
[BFDINCDIR="-I$withval/"],
[AS_IF([test x"$BFDDIR" != x], [BFDINCDIR="-I$BFDDIR"include/])])
AC_ARG_WITH(bfd-lib-dir,
AC_HELP_STRING([--with-bfd-lib-dir=BFDLIBDIR],
[give the path for BFD-libraries, default: BFDDIR/lib]),
[BFDLIBDIR="-L$withval/"],
[AS_IF([test x"$BFDDIR" != x], [BFDLIBDIR="-L$BFDDIR"lib/])])
AC_ARG_WITH(bfd-lib,
AC_HELP_STRING([--with-bfd-lib=BFDLIB], [use given bfd lib, default: -lbfd]),
[BFDLIB="$withval"])
AS_IF([test x"$check_bfd" = "xyes"],
[
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $BFDINCDIR"
AC_CHECK_HEADER([bfd.h], [],
[
AC_MSG_NOTICE([error: no bfd.h found; check path for BFD package first...])
bfd_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
AS_IF([test x"$BFDLIB" = x -a "$bfd_error" = "no"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $BFDLIBDIR -lbfd"
AC_MSG_CHECKING([whether linking with -lbfd works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); BFDLIB=-lbfd],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$BFDLIB" = x -a "$bfd_error" = "no"],
[
AC_MSG_NOTICE([error: no libbfd found; check path for BFD package first...])
bfd_error="yes"
])
AS_IF([test "$bfd_error" = "no"], [have_bfd="yes"])
])
AC_SUBST(BFDINCDIR)
AC_SUBST(BFDLIBDIR)
AC_SUBST(BFDLIB)
])

Просмотреть файл

@ -0,0 +1,179 @@
AC_DEFUN([ACVT_CLAPACK],
[
clapack_error="no"
have_clapack="no"
clapack_3thparty=
CLAPACKDIR=
CLAPACKINCDIR=
CLAPACKLIBDIR=
CLAPACKLIB=
AC_ARG_WITH(clapack-dir,
AC_HELP_STRING([--with-clapack-dir=LAPACKDIR], [give the path for CLAPACK, default: /usr]),
[CLAPACKDIR="$withval/"])
AC_ARG_WITH(clapack-inc-dir,
AC_HELP_STRING([--with-clapack-inc-dir=CLAPACKINCDIR],
[give the path for CLAPACK-include files, default: CLAPACKDIR/include)]),
[CLAPACKINCDIR="-I$withval/"],
[AS_IF([test x"$CLAPACKDIR" != x], [CLAPACKINCDIR="-I$CLAPACKDIR"include/])])
AC_ARG_WITH(clapack-lib-dir,
AC_HELP_STRING([--with-clapack-lib-dir=CLAPACKLIBDIR],
[give the path for CLAPACK-libraries, default: CLAPACKDIR/lib]),
[CLAPACKLIBDIR="-L$withval/"],
[AS_IF([test x"$CLAPACKDIR" != x], [CLAPACKLIBDIR="-L$CLAPACKDIR"lib/])])
AC_ARG_WITH(clapack-mkl,
AC_HELP_STRING([--with-clapack-mkl], [set CLAPACK-lib for MKL]),
[
AS_IF([test x"$withval" = "xyes"],
[
CLAPACKLIB="-lmkl -lmkl_lapack"
clapack_3thparty="mkl"
])
])
AC_ARG_WITH(clapack-acml,
AC_HELP_STRING([--with-clapack-acml], [set CLAPACK-lib for ACML]),
[
AS_IF([test x"$withval" = "xyes"],
[
CLAPACKLIB="-lacml"
clapack_3thparty="acml"
])
])
AC_ARG_WITH(clapack-essl,
AC_HELP_STRING([--with-clapack-essl], [set CLAPACK-lib for ESSL]),
[
AS_IF([test x"$withval" = "xyes"],
[
CLAPACKLIB="-lessl"
clapack_3thparty="essl"
])
])
AC_ARG_WITH(clapack-sunperf,
AC_HELP_STRING([--with-clapack-sunperf], [set CLAPACK-lib for Sun Performace Library]),
[
AS_IF([test x"$withval" = "xyes"],
[
CLAPACKLIB="-lsunperf -lfsu -lfui"
clapack_3thparty="sunperf"
])
])
AC_ARG_WITH(clapack-lib,
AC_HELP_STRING([--with-clapack-lib=CLAPACKLIB], [use given clapack lib, default: -lclapack -lcblas -lf2c]),
[CLAPACKLIB="$withval"])
sav_CPPFLAGS=$CPPFLAGS
sav_CFLAGS=$CFLAGS
CPPFLAGS="$CPPFLAGS $CLAPACKINCDIR"
CFLAGS="$CFLAGS $CLAPACKINCDIR"
AS_IF([test x"$clapack_3thparty" = "xmkl"],
[
AC_CHECK_HEADER([mkl.h],
[AC_DEFINE([HAVE_MKL], [1], [Define to 1 if you have the MKL.])],
[
AC_MSG_NOTICE([error: no mkl.h found; check path for MKL package first...])
clapack_error="yes"
])
])
AS_IF([test x"$clapack_3thparty" = "xacml"],
[
AC_CHECK_HEADER([acml.h],
[AC_DEFINE([HAVE_ACML], [1], [Define to 1 if you have the ACML.])],
[
AC_MSG_NOTICE([error: no acml.h found; check path for ACML package first...])
clapack_error="yes"
])
])
AS_IF([test x"$clapack_3thparty" = "xessl"],
[
AC_CHECK_HEADER([essl.h],
[AC_DEFINE([HAVE_ESSL], [1], [Define to 1 if you have the ESSL.])],
[
AC_MSG_NOTICE([error: no essl.h found; check path for ESSL package first...])
clapack_error="yes"
])
])
AS_IF([test x"$clapack_3thparty" = "xsunperf"],
[
AC_CHECK_HEADER([sunperf.h],
[AC_DEFINE([HAVE_SUNPERF], [1], [Define to 1 if you have the SUN Performance Library.])],
[
AC_MSG_NOTICE([error: no sunperf.h found; check path for SUNPERF package first...])
clapack_error="yes"
])
])
AS_IF([test x"$clapack_3thparty" = x],
[
AC_CHECK_HEADER([f2c.h], [],
[
AC_MSG_NOTICE([error: no f2c.h found; check path for CLAPACK package first...])
clapack_error="yes"
])
AS_IF([test x"$clapack_error" = "xno"],
[
AC_MSG_CHECKING([for clapack.h])
AC_TRY_COMPILE(
[
#include "f2c.h"
#include "clapack.h"
], [],
[AC_MSG_RESULT([yes])],
[
AC_MSG_RESULT([no])
AC_MSG_NOTICE([error: no clapack.h found; check path for CLAPACK package first...])
clapack_error="yes"
])
])
AS_IF([test x"$clapack_error" = "xno"],
[
AC_MSG_CHECKING([for blaswrap.h])
AC_TRY_COMPILE(
[
#include "f2c.h"
#include "blaswrap.h"
], [],
[AC_MSG_RESULT([yes])],
[
AC_MSG_RESULT([no])
AC_MSG_NOTICE([error: no blaswrap.h found; check path for CLAPACK package first...])
clapack_error="yes"
])
])
])
CPPFLAGS=$sav_CPPFLAGS
CFLAGS=$sav_CFLAGS
AS_IF([test x"$CLAPACKLIB" = x -a x"$clapack_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $CLAPACKLIBDIR -lclapack -lcblas -lf2c"
AC_MSG_CHECKING([whether linking with -lclapack -lcblas -lf2c works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); CLAPACKLIB="-lclapack -lcblas -lf2c"], [AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$CLAPACKLIB" = x -a x"$clapack_error" = "xno"],
[
AC_MSG_NOTICE([error: either libclapack, libcblas or libf2x not found; check path for CLAPACK package first...])
clapack_error="yes"
])
AS_IF([test x"$clapack_error" = "xno"], [have_clapack="yes"])
AC_SUBST(CLAPACKINCDIR)
AC_SUBST(CLAPACKLIBDIR)
AC_SUBST(CLAPACKLIB)
])

Просмотреть файл

@ -0,0 +1,256 @@
AC_DEFUN([ACVT_COMPINST],
[
compinst_error="no"
check_compinst="yes"
force_compinst="no"
compinst_type=
compinst_cflags=
compinst_cxxflags=
compinst_fflags=
compinst_fcflags=
compinst_gnu_cflags="-g -finstrument-functions"
compinst_gnu_cxxflags="$compinst_gnu_cflags"
compinst_gnu_fflags="$compinst_gnu_cflags"
compinst_gnu_fcflags="$compinst_gnu_cflags"
compinst_pgi_cflags="-Mprof=func"
compinst_pgi_cxxflags="$compinst_pgi_cflags"
compinst_pgi_fflags="$compinst_pgi_cflags"
compinst_pgi_fcflags="$compinst_pgi_cflags"
compinst_pgi9_cflags="-Minstrument=functions"
compinst_pgi9_cxxflags="$compinst_pgi9_cflags"
compinst_pgi9_fflags="$compinst_pgi9_cflags"
compinst_pgi9_fcflags="$compinst_pgi9_cflags"
compinst_sun_cflags=""
compinst_sun_cxxflags=""
compinst_sun_fflags=""
compinst_sun_fcflags="-O -Qoption f90comp -phat"
compinst_xl_cflags="-qdebug=function_trace"
compinst_xl_cxxflags="$compinst_xl_cflags"
compinst_xl_fflags="$compinst_xl_cflags"
compinst_xl_fcflags="$compinst_xl_cflags"
compinst_nec_cflags="-ftrace"
compinst_nec_cxxflags="$compinst_nec_cflags"
compinst_nec_fflags="$compinst_nec_cflags"
compinst_nec_fcflags="$compinst_nec_cflags"
compinst_openuh_cflags="-fb_create inst -fb_type=1 -fb_phase=0 -epilog -OPT:instr_proc"
compinst_openuh_cxxflags="$compinst_openuh_cflags"
compinst_openuh_fflags="$compinst_openuh_cflags"
compinst_openuh_fcflags="$compinst_openuh_cflags"
AC_ARG_ENABLE(compinst,
AC_HELP_STRING([--enable-compinst=TYPE],
[enable support for compiler instrumentation (gnu,intel,pathscale,pgi,pgi9,sun,xl,nec,openuh), default: automatically by configure]),
[AS_IF([test x"$enableval" = "xno"], [check_compinst="no"], [enable_compinst="$enableval"])])
AS_IF([test x"$check_compinst" = "xyes"],
[
AC_MSG_CHECKING([for compiler instrumentation])
AS_IF([test x"$enable_compinst" != x], [force_compinst="yes"])
AS_IF([test x"$enable_compinst" = "xyes"], [enable_compinst=""])
AS_IF([test x"$enable_compinst" != x],
[
AC_MSG_RESULT([skipped (--enable-compinst=$enable_compinst)])
case $enable_compinst in
gnu | intel | pathscale)
compinst_type="gnu"
;;
pgi)
compinst_type="pgi"
;;
pgi9)
compinst_type="pgi9"
;;
sun)
compinst_type="sun"
;;
xl)
compinst_type="xl"
;;
nec)
compinst_type="nec"
;;
openuh)
compinst_type="openuh"
;;
*) AC_MSG_ERROR([unknown compiler instrumentation '$enable_compinst'])
;;
esac
],
[
base_CC=`basename $CC`
case $base_CC in
gcc* | scgcc* | ppu-gcc*)
compinst_type="gnu"
AC_MSG_RESULT([gnu])
;;
icc*)
compver=`$CC -dumpversion`
compver_major=`echo $compver | cut -d '.' -f 1`
AS_IF([test $compver_major -ge 10],
[
compinst_type="gnu"
AC_MSG_RESULT([gnu (intel)])
],
[
AC_MSG_RESULT([unknown])
AC_MSG_NOTICE([error: the version of the Intel compiler ($compver) doesn't support instrumentation!])
compinst_error="yes"
])
;;
pathcc*)
compver=`$CC -dumpversion`
compver_major=`echo $compver | cut -d '.' -f 1`
compver_minor=`echo $compver | cut -d '.' -f 2`
AS_IF([test $compver_major -ge 3 -a $compver_minor -ge 1],
[
compinst_type="gnu"
AC_MSG_RESULT([gnu (pathscale)])
],
[
AC_MSG_RESULT([unknown])
AC_MSG_NOTICE([error: the version of the Pathscale compiler ($compver) doesn't support instrumentation!])
compinst_error="yes"
])
;;
scpathcc*)
compinst_type="gnu"
AC_MSG_RESULT([gnu (pathscale)])
;;
pgcc*)
sav_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $compinst_pgi9_cflags"
AC_TRY_COMPILE([], [],
[
compinst_type="pgi9"
AC_MSG_RESULT([pgi9])
],
[
compinst_type="pgi"
AC_MSG_RESULT([pgi])
])
CFLAGS=$sav_CFLAGS
;;
xlc* | blrts_xlc* | bgxlc*)
compinst_type="xl"
AC_MSG_RESULT([xl])
;;
suncc*)
compinst_type="sun"
AC_MSG_RESULT([sun])
;;
cc*)
compver=`$CC -V 2>&1 | grep "Sun C"`
AS_IF([test "$?" = "0"],
[
compinst_type="sun"
AC_MSG_RESULT([sun])
])
;;
uhcc* | opencc*)
compver=`$CC -dumpversion`
compver_major=`echo $compver | cut -d '.' -f 1`
AS_IF([test $compver_major -ge 4],
[
compinst_type="openuh"
AC_MSG_RESULT([openuh])
],
[
AC_MSG_RESULT([unknown])
AC_MSG_NOTICE([error: the version of the OpenUH compiler ($compver) doesn't support instrumentation!])
compinst_error="yes"
])
;;
sxcc*)
compinst_type="nec"
AC_MSG_RESULT([nec])
;;
*)
;;
esac
AS_IF([test x"$compinst_error" = "xno" -a x"$compinst_type" = x],
[
AC_MSG_RESULT([unknown])
AC_MSG_NOTICE([error: the compiler '$base_CC' doesn't support instrumentation!])
compinst_error="yes"
])
])
AS_IF([test x"$compinst_error" = "xno"],
[
AS_IF([test x"$compinst_type" = "xgnu" -o x"$compinst_type" = "xpgi9"],
[
ACVT_BFD
AS_IF([test x"$bfd_error" = "xyes"],
[
AS_IF([test x"$force_bfd" = "xyes"], [exit 1])
AC_MSG_WARN([no usable BFD found; using nm-output file for addr./symbol mapping])
],
[
AS_IF([test x"$have_bfd" = "xyes"],
[ACVT_GNUDMGL])
])
])
])
AS_IF([test x"$compinst_error" = "xno" -a x"$compinst_type" != x],
[
case $compinst_type in
gnu)
compinst_cflags=$compinst_gnu_cflags
compinst_cxxflags=$compinst_gnu_cxxflags
compinst_fflags=$compinst_gnu_fflags
compinst_fcflags=$compinst_gnu_fcflags
;;
pgi)
compinst_cflags=$compinst_pgi_cflags
compinst_cxxflags=$compinst_pgi_cxxflags
compinst_fflags=$compinst_pgi_fflags
compinst_fcflags=$compinst_pgi_fcflags
;;
pgi9)
compinst_cflags=$compinst_pgi9_cflags
compinst_cxxflags=$compinst_pgi9_cxxflags
compinst_fflags=$compinst_pgi9_fflags
compinst_fcflags=$compinst_pgi9_fcflags
;;
sun)
compinst_cflags=$compinst_sun_cflags
compinst_cxxflags=$compinst_sun_cxxflags
compinst_fflags=$compinst_sun_fflags
compinst_fcflags=$compinst_sun_fcflags
;;
xl)
compinst_cflags=$compinst_xl_cflags
compinst_cxxflags=$compinst_xl_cxxflags
compinst_fflags=$compinst_xl_fflags
compinst_fcflags=$compinst_xl_fcflags
;;
nec)
compinst_cflags=$compinst_nec_cflags
compinst_cxxflags=$compinst_nec_cxxflags
compinst_fflags=$compinst_nec_fflags
compinst_fcflags=$compinst_nec_fcflags
;;
openuh)
compinst_cflags=$compinst_openuh_cflags
compinst_cxxflags=$compinst_openuh_cxxflags
compinst_fflags=$compinst_openuh_fflags
compinst_fcflags=$compinst_openuh_fcflags
;;
esac
])
])
])

Просмотреть файл

@ -0,0 +1,151 @@
AC_DEFUN([ACVT_COMPWRAP],
[
VT_WRAPPER_CC=
VT_WRAPPER_CXX=
VT_WRAPPER_F77=
VT_WRAPPER_FC=
VT_WRAPPER_EXTRA_CFLAGS=
VT_WRAPPER_EXTRA_CXXFLAGS=
VT_WRAPPER_EXTRA_FFLAGS=
VT_WRAPPER_EXTRA_FCFLAGS=
VT_WRAPPER_EXTRA_LDFLAGS=
VT_WRAPPER_EXTRA_LIBS=
VT_WRAPPER_INCDIR=
VT_WRAPPER_LIBDIR=
VT_WRAPPER_VTLIB=
VT_WRAPPER_VTMPILIB=
VT_WRAPPER_VTMTLIB=
VT_WRAPPER_VTHYBLIB=
VT_WRAPPER_OPARI_BIN=
VT_WRAPPER_OPARI_TAB_CC=
VT_WRAPPER_OPARI_TAB_CFLAGS=
VT_WRAPPER_COMPINST_CFLAGS=
VT_WRAPPER_COMPINST_CXXFLAGS=
VT_WRAPPER_COMPINST_FFLAGS=
VT_WRAPPER_COMPINST_FCFLAGS=
VT_WRAPPER_AVAIL_INST="manual"
VT_WRAPPER_DEFAULT_INST=manual
AC_REQUIRE([ACVT_COMPINST])
AC_REQUIRE([ACVT_DYNINST])
AC_REQUIRE([ACVT_THREADS])
AC_ARG_WITH(wrapper-cc,
AC_HELP_STRING([--with-wrapper-cc],
[underlying C compiler command for vtcc, default: CC]),
[VT_WRAPPER_CC=$withval], [VT_WRAPPER_CC=$CC])
AC_ARG_WITH(wrapper-cflags,
AC_HELP_STRING([--with-wrapper-cflags],
[extra flags to add to CFLAGS when using vtcc]),
[VT_WRAPPER_EXTRA_CFLAGS=$withval])
AC_ARG_WITH(wrapper-cxx,
AC_HELP_STRING([--with-wrapper-cxx],
[underlying C++ compiler command for vtcxx, default: CXX]),
[VT_WRAPPER_CXX=$withval], [VT_WRAPPER_CXX=$CXX])
AC_ARG_WITH(wrapper-cxxflags,
AC_HELP_STRING([--with-wrapper-cxxflags],
[extra flags to add to CXXFLAGS when using vtcxx]),
[VT_WRAPPER_EXTRA_CXXFLAGS=$withval])
AC_ARG_WITH(wrapper-f77,
AC_HELP_STRING([--with-wrapper-f77],
[underlying Fortran 77 compiler command for vtf77, default: F77]),
[VT_WRAPPER_F77=$withval], [VT_WRAPPER_F77=$F77])
AC_ARG_WITH(wrapper-fflags,
AC_HELP_STRING([--with-wrapper-fflags],
[extra flags to add to FFLAGS when using vtf77]),
[VT_WRAPPER_EXTRA_FFLAGS=$withval])
AC_ARG_WITH(wrapper-fc,
AC_HELP_STRING([--with-wrapper-fc],
[underlying Fortran compiler command for vtf90, default: FC]),
[VT_WRAPPER_FC=$withval], [VT_WRAPPER_FC=$FC])
AC_ARG_WITH(wrapper-fcflags,
AC_HELP_STRING([--with-wrapper-fcflags],
[extra flags to add to FCFLAGS when using vtf90]),
[VT_WRAPPER_EXTRA_FCFLAGS=$withval])
AC_ARG_WITH(wrapper-ldflags,
AC_HELP_STRING([--with-wrapper-ldflags],
[extra flags to add to LDFLAGS when using wrapper compilers]),
[VT_WRAPPER_EXTRA_LDFLAGS=$withval])
AC_ARG_WITH(wrapper-libs,
AC_HELP_STRING([--with-wrapper-libs],
[extra flags to add to LIBS when using wrapper compilers]),
[VT_WRAPPER_EXTRA_LIBS=$withval])
ACVT_CONF_EXPAND_VARS([$includedir], [VT_WRAPPER_INCDIR])
AS_IF([test x"$VT_WRAPPER_INCDIR" = "x/usr/include"],
[VT_WRAPPER_INCDIR=""])
ACVT_CONF_EXPAND_VARS([$libdir], [VT_WRAPPER_LIBDIR])
AS_IF([test x"$VT_WRAPPER_LIBDIR" = "x/usr/lib"],
[VT_WRAPPER_LIBDIR=""])
VT_WRAPPER_VTLIB="-lvt"
VT_WRAPPER_VTMPILIB="-lvt-mpi"
VT_WRAPPER_VTMTLIB="-lvt-mt"
VT_WRAPPER_VTHYBLIB="-lvt-hyb"
AS_IF([test x"$compinst_type" = "xpgi9"],
[
VT_WRAPPER_VTLIB="-Wl,--whole-archive $VT_WRAPPER_VTLIB -Wl,--no-whole-archive"
VT_WRAPPER_VTMPILIB="-Wl,--whole-archive $VT_WRAPPER_VTMPILIB -Wl,--no-whole-archive"
VT_WRAPPER_VTMTLIB="-Wl,--whole-archive $VT_WRAPPER_VTMTLIB -Wl,--no-whole-archive"
VT_WRAPPER_VTHYBLIB="-Wl,--whole-archive $VT_WRAPPER_VTHYBLIB -Wl,--no-whole-archive"
])
AS_IF([test x"$build_opari" = "xyes"],
[
ACVT_CONF_EXPAND_VARS([$bindir/opari], [VT_WRAPPER_OPARI_BIN])
VT_WRAPPER_OPARI_TAB_CC="$CC"
VT_WRAPPER_OPARI_TAB_CFLAGS="$CFLAGS"
])
AS_IF([test x"$compinst_type" != x],
[
VT_WRAPPER_COMPINST_CFLAGS="$compinst_cflags"
VT_WRAPPER_COMPINST_CXXFLAGS="$compinst_cxxflags"
VT_WRAPPER_COMPINST_FFLAGS="$compinst_fflags"
VT_WRAPPER_COMPINST_FCFLAGS="$compinst_fcflags"
VT_WRAPPER_AVAIL_INST="$VT_WRAPPER_AVAIL_INST compinst"
VT_WRAPPER_DEFAULT_INST="compinst"
])
AS_IF([test x"$have_dyninst" = "xyes"],
[
VT_WRAPPER_AVAIL_INST="$VT_WRAPPER_AVAIL_INST dyninst"
])
AC_SUBST(VT_WRAPPER_CC)
AC_SUBST(VT_WRAPPER_CXX)
AC_SUBST(VT_WRAPPER_F77)
AC_SUBST(VT_WRAPPER_FC)
AC_SUBST(VT_WRAPPER_EXTRA_CFLAGS)
AC_SUBST(VT_WRAPPER_EXTRA_CXXFLAGS)
AC_SUBST(VT_WRAPPER_EXTRA_FFLAGS)
AC_SUBST(VT_WRAPPER_EXTRA_FCFLAGS)
AC_SUBST(VT_WRAPPER_EXTRA_LDFLAGS)
AC_SUBST(VT_WRAPPER_EXTRA_LIBS)
AC_SUBST(VT_WRAPPER_INCDIR)
AC_SUBST(VT_WRAPPER_LIBDIR)
AC_SUBST(VT_WRAPPER_VTLIB)
AC_SUBST(VT_WRAPPER_VTMPILIB)
AC_SUBST(VT_WRAPPER_VTMTLIB)
AC_SUBST(VT_WRAPPER_VTHYBLIB)
AC_SUBST(VT_WRAPPER_OPARI_BIN)
AC_SUBST(VT_WRAPPER_OPARI_TAB_CC)
AC_SUBST(VT_WRAPPER_OPARI_TAB_CFLAGS)
AC_SUBST(VT_WRAPPER_COMPINST_CFLAGS)
AC_SUBST(VT_WRAPPER_COMPINST_CXXFLAGS)
AC_SUBST(VT_WRAPPER_COMPINST_FFLAGS)
AC_SUBST(VT_WRAPPER_COMPINST_FCFLAGS)
AC_SUBST(VT_WRAPPER_AVAIL_INST)
AC_SUBST(VT_WRAPPER_DEFAULT_INST)
])

Просмотреть файл

@ -0,0 +1,335 @@
AC_DEFUN([ACVT_CONF_INIT],
[
AC_ARG_ENABLE(config-summary,
AC_HELP_STRING([--enable-config-summary],
[show summary of configuration, default: enabled]),
[enable_config_summary="$enableval"], [enable_config_summary="yes"])
AC_ARG_ENABLE(config-titles,
AC_HELP_STRING([--enable-config-titles],
[show titles for each configure section, default: enabled]),
[enable_config_titles="$enableval"], [enable_config_titles="yes"])
])
AC_DEFUN([ACVT_CONF_OPTIONS],
[
options_dir="$srcdir/config/defaults"
options_file=
AC_REQUIRE([ACVT_PLATFORM])
AC_MSG_CHECKING([for options file])
AC_ARG_WITH(options,
AC_HELP_STRING([--with-options=FILE],
[load options from FILE]),
[
AC_MSG_RESULT([skipped (--with-options=$withval)])
AS_IF([test x"$withval" = "xyes"],
[AC_MSG_ERROR([value of '--with-options' not properly set])])
AS_IF([test x"$withval" != "xno"],
[
dnl if no path, check in config/defaults
AS_IF([test "`basename $withval`" = "$withval"],
[
AS_IF([test -r "$options_dir/$withval"],
[withval="$options_dir/$withval"])
])
dnl make sure file exists
AS_IF([test ! -r "$withval"],
[AC_MSG_ERROR([options file '$withval' not found])])
options_file="$withval"
])
],
[
dnl if no file given, generate options file name and look for it
dnl in config/defaults
AS_IF([test x"$BITMODE" != x],
[
AS_IF([test -r "$options_dir/$PLATFORM-$BITMODE"],
[options_file="$options_dir/$PLATFORM-$BITMODE"])
])
AS_IF([test x"$options_file" = x],
[
AS_IF([test -r "$options_dir/$PLATFORM"],
[options_file="$options_dir/$PLATFORM"])
])
AS_IF([test x"$options_file" != x],
[AC_MSG_RESULT([$options_file])], [AC_MSG_RESULT([no])])
])
dnl load options from file
AS_IF([test x"$options_file" != x],
[
AC_MSG_NOTICE([loading options from '$options_file'])
dnl save command line options
rm -f confopts
for var in $ac_precious_vars; do
set | grep ^$var= >>confopts
done
set | grep ^enable_.*= >>confopts
set | grep ^with_.*= >>confopts
dnl show + load options into environment
cat $options_file
set -a
. $options_file
dnl restore command line options
. ./confopts
set +a
rm -f confopts
])
])
AC_DEFUN([ACVT_CONF_TITLE],
[
AS_IF([test x"$enable_config_titles" = "xyes"],
[echo; echo "*** $1"])
])
AC_DEFUN([ACVT_CONF_SUBTITLE],
[
AS_IF([test x"$enable_config_titles" = "xyes"],
[echo "+++ $1"])
])
AC_DEFUN([ACVT_CONF_SUBSUBTITLE],
[
AS_IF([test x"$enable_config_titles" = "xyes"],
[echo "--- $1"])
])
AC_DEFUN([ACVT_CONF_EXPAND_VARS],
[
var=$1
while :
do
$2=`eval echo $var`
AS_IF([test x"$$2" = "x$var"], [break], [var=$$2])
done
])
AC_DEFUN([ACVT_CONF_SUMMARY],
[
AS_IF([test x"$enable_config_summary" = "xyes"],
[
echo ""
echo "-----------------------------------------------------------------------------"
echo "Configuration:"
echo ""
AS_IF([test x"$options_file" != x],
[answer="$options_file"], [answer="no"])
echo " Options file: $answer"
echo ""
echo " Build (B): $build"
echo " Host (H): $host"
echo " Cross compiling: $cross_compiling"
echo ""
AS_IF([test x"$cross_compiling" = "xyes"],
[echo " C Compiler (H|B): $CC | $CC_FOR_BUILD"],
[echo " C Compiler: $CC"])
AS_IF([test x"$cross_compiling" = "xyes"],
[echo " C++ Compiler (H|B): $CXX | $CXX_FOR_BUILD"],
[echo " C++ compiler: $CXX"])
echo " Fortran 77 compiler: $F77"
echo " Fortran 90 compiler: $FC"
AS_IF([test x"$cross_compiling" = "xyes"],
[echo " C preprocessor (H|B): $CPP | $CPP_FOR_BUILD"],
[echo " C preprocessor: $CPP"])
AS_IF([test x"$cross_compiling" = "xyes"],
[echo " C++ preprocessor (H|B): $CXXCPP | $CXXCPP_FOR_BUILD"],
[echo " C++ preprocessor: $CXXCPP"])
echo ""
AS_IF([test x"$cross_compiling" = "xyes"],
[echo " CFLAGS (H|B): $CFLAGS | $CFLAGS_FOR_BUILD"],
[echo " CFLAGS: $CFLAGS"])
AS_IF([test x"$cross_compiling" = "xyes"],
[echo " CXXFLAGS (H|B): $CXXFLAGS | $CXXFLAGS_FOR_BUILD"],
[echo " CXXFLAGS: $CXXFLAGS"])
echo " FFLAGS: $FFLAGS"
echo " FCFLAGS: $FCFLAGS"
AS_IF([test x"$cross_compiling" = "xyes"],
[echo " LDFLAGS (H|B): $LDFLAGS | $LDFLAGS_FOR_BUILD"],
[echo " LDFLAGS: $LDFLAGS"])
AS_IF([test x"$cross_compiling" = "xyes"],
[echo " LIBS (H|B): $LIBS | $LIBS_FOR_BUILD"],
[echo " LIBS: $LIBS"])
echo ""
AS_IF([test x"$have_mpi" = "xyes"],
[
echo " MPI C compiler: $MPICC"
echo " MPI C++ compiler: $MPICXX"
echo " MPI Fortran 77 compiler: $MPIF77"
echo ""
echo " MPICFLAGS (append to CFLAGS): $MPICFLAGS"
echo " MPICXXFLAGS (append to CXXFLAGS): $MPICXXFLAGS"
echo " MPIFFLAGS (append to FFLAGS): $MPIFFLAGS"
echo ""
])
echo " Source code location: $PWD"
echo " Install path: $prefix"
echo ""
answer=""
AS_IF([test x"$use_extern_otf" = "xno"],
[answer="yes"], [answer="no"])
echo " Build OTF library and tools: $answer"
AS_IF([test x"$have_zlib" = "xyes"],
[answer="yes"], [answer="no"])
echo " ZLIB trace compression support: $answer"
AS_IF([test x"$have_mpi" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build MPI support: $answer"
AS_IF([test x"$have_mpi" = "xyes"],
[
AS_IF([test x"$have_fmpi" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build MPI Fortran support: $answer"
AS_IF([test x"$have_fmpi" = "xyes"],
[
AS_IF([test x"$build_fmpiwraplib" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build MPI Fortran wrapper library: $answer"
])
echo " Build MPI-2 support for"
AS_IF([test x"$have_mpi2_1sided" = "xyes"],
[answer="yes"], [answer="no"])
echo " One-Sided Communications: $answer"
AS_IF([test x"$have_mpi2_extcoll" = "xyes"],
[answer="yes"], [answer="no"])
echo " Extended Collective Operations: $answer"
AS_IF([test x"$have_mpi2_io" = "xyes"],
[answer="yes"], [answer="no"])
echo " I/O: $answer"
AS_IF([test x"$have_etimesync" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build enhanced time sync. support: $answer"
AS_IF([test x"$have_unimci" = "xyes"],
[answer="yes ($unimci_checker_name $unimci_checker_version)"],
[answer="no"])
echo " Build MPI correctness checking support: $answer"
])
AS_IF([test x"$have_threads" = "xyes"],
[
answer=
AS_IF([test x"$have_pthread" = "xyes"],
[answer="POSIX threads"])
AS_IF([test x"$have_omp" = "xyes"],
[AS_IF([test x"$answer" != x],
[answer="$answer, OpenMP"],
[answer="OpenMP"])])
answer="yes ($answer)"
], [answer="no"])
echo " Build Multithreading support: $answer"
AS_IF([test x"$build_hybrid" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build Hybrid (MPI/Threads) support: $answer"
AS_IF([test x"$have_java" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build Java support: $answer"
AS_IF([test x"$have_papi" = "xyes"],
[answer="yes (PAPI)"], [AS_IF([test x"$have_cpc" = "xyes"],
[answer="yes (CPC)"], [AS_IF([test x"$have_necsxcntr" = "xyes"],
[answer="yes (NEC SX)"], [answer="no"])])])
echo " Build Hardware Perf. Counter support: $answer"
AS_IF([test x"$have_rusage" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build Resource usage trace support: $answer"
AS_IF([test x"$have_memhooks" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build GLIBC's memory alloc. trace support: $answer"
AS_IF([test x"$have_getcpu" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build GLIBC's CPU ID trace support: $answer"
AS_IF([test x"$have_libwrap" = "xyes"],
[
answer="yes"
AS_IF([test x"$have_libcwrap" = "xyes" -o x"$have_iowrap" = "xyes"],
[
answer=
AS_IF([test x"$have_libcwrap" = "xyes"],
[answer="LIBC"])
AS_IF([test x"$have_iowrap" = "xyes"],
[AS_IF([test x"$answer" != x],
[answer="$answer, LIBC-I/O"],
[answer="LIBC-I/O"])])
answer="yes ($answer)"
])
], [answer="no"])
echo " Build Library trace support: $answer"
AS_IF([test x"$have_libwrap" = "xyes"],
[
AS_IF([test x"$build_libwrapgen" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build Library wrapper generator: $answer"
])
AS_IF([test x"$compinst_type" != x],
[answer=`echo $compinst_type | sed s/gnu/gnu*/g`],
[answer="no"])
echo ""
echo " Build compiler instrumentation support: $answer"
AS_IF([test x"$compinst_type" = "xgnu" -o x"$compinst_type" = "xpgi9"],
[
AS_IF([test x"$have_bfd" = "xyes"],
[answer="yes"], [answer="no"])
echo " Use BFD to get symbol information: $answer"
AS_IF([test x"$have_gnudmgl" = "xyes"],
[answer="yes"], [answer="no"])
echo " Name demangling of C++ symbols: $answer"
AS_IF([test x"$compinst_type" != "xpgi9"],
[
echo ""
echo " * The instrumentation type 'gnu' also"
echo " works for Intel and Pathscale compilers."
])
])
AS_IF([test x"$have_dyninst" = "xyes"],
[answer="yes"], [answer="no"])
echo ""
echo " Build binary instrumentation support"
echo " by using Dyninst: $answer"
AS_IF([test x"$build_dynattlib" = "xyes"],
[answer="yes"], [answer="no"])
echo " Build Dyninst attach library: $answer"
echo ""
echo " See config.h for further configuration information."
echo "-----------------------------------------------------------------------------"
])
])

Просмотреть файл

@ -0,0 +1,87 @@
AC_DEFUN([ACVT_CPC],
[
cpc_error="no"
have_cpc="no"
CPCDIR=
CPCINCDIR=
CPCLIBDIR=
CPCLIB=
AC_ARG_WITH(cpc-dir,
AC_HELP_STRING([--with-cpc-dir=CPCDIR],
[give the path for CPC, default: /usr]),
[CPCDIR="$withval/"])
AC_ARG_WITH(cpc-inc-dir,
AC_HELP_STRING([--with-cpc-inc-dir=CPCINCDIR],
[give the path for CPC-include files, default: CPCDIR/include]),
[CPCINCDIR="-I$withval/"],
[AS_IF([test x"$CPCDIR" != x], [CPCINCDIR="-I$CPCDIR"include/])])
AC_ARG_WITH(cpc-lib-dir,
AC_HELP_STRING([--with-cpc-lib-dir=CPCLIBDIR],
[give the path for CPC-libraries, default: CPCDIR/lib]),
[CPCLIBDIR="-L$withval/"],
[AS_IF([test x"$CPCDIR" != x], [CPCLIBDIR="-L$CPCDIR"lib/])])
AC_ARG_WITH(cpc-lib,
AC_HELP_STRING([--with-cpc-lib=CPCLIB], [use given cpc lib, default: -lcpc]),
[CPCLIB="$withval"])
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $CPCINCDIR"
AC_CHECK_HEADER([libcpc.h], [],
[
AC_MSG_NOTICE([error: no libcpc.h found; check path for CPC package first...])
cpc_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
AS_IF([test x"$CPCLIB" = x -a x"$cpc_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $CPCLIBDIR -lcpc"
AC_MSG_CHECKING([whether linking with -lcpc works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); CPCLIB=-lcpc],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$CPCLIB" = x -a x"$cpc_error" = "xno"],
[
AC_MSG_NOTICE([error: no libcpc found; check path for CPC package first...])
cpc_error="yes"
])
AS_IF([test x"$cpc_error" = "xno"],
[
AC_MSG_CHECKING([whether CPC version = 2])
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $CPCINCDIR"
AC_TRY_COMPILE([#include <libcpc.h>],
[
#ifndef CPC_VER_CURRENT
# error "CPC_VER_CURRENT not defined"
#elif CPC_VER_CURRENT != 2
# error "CPC_VER_CURRENT != 2"
#endif
],
[AC_MSG_RESULT([yes])],
[
AC_MSG_RESULT([no])
AC_MSG_NOTICE([error: CPC version could not be determined and/or is incompatible (!= 2)
See \`config.log' for more details.])
cpc_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
])
AS_IF([test x"$CPCLIB" != x -a x"$cpc_error" = "xno"], [have_cpc="yes"])
AC_SUBST(CPCINCDIR)
AC_SUBST(CPCLIBDIR)
AC_SUBST(CPCLIB)
])

Просмотреть файл

@ -0,0 +1,119 @@
AC_DEFUN([ACVT_CROSS],
[
CROSS_PREFIX=
comp_for_build_given="no"
AC_ARG_VAR(CC_FOR_BUILD, [C compiler command for build system])
AC_ARG_VAR(CFLAGS_FOR_BUILD, [C compiler flags for build system])
AC_ARG_VAR(CPP_FOR_BUILD, [C preprocessor for build system])
AC_ARG_VAR(CXX_FOR_BUILD, [C++ compiler command for build system])
AC_ARG_VAR(CXXFLAGS_FOR_BUILD, [C++ compiler flags for build system])
AC_ARG_VAR(CXXCPP_FOR_BUILD, [C++ preprocessor for build system])
AC_ARG_VAR(CPPFLAGS_FOR_BUILD, [C/C++/Objective C preprocessor flags for build system])
AC_ARG_VAR(LDFLAGS_FOR_BUILD, [linker flags for build system])
AC_ARG_VAR(LIBS_FOR_BUILD, [libraries to pass to the linker for build system])
AS_IF([test x"$cross_compiling" != "xyes"],
[
# reset *_FOR_BUILD variables, if no cross compiling
CC_FOR_BUILD=$CC; CFLAGS_FOR_BUILD=$CFLAGS; CPP_FOR_BUILD=$CPP
CXX_FOR_BUILD=$CXX; CXXFLAGS_FOR_BUILD=$CXXFLAGS; CXXCPP_FOR_BUILD=$CXXCPP
CPPFLAGS_FOR_BUILD=$CPPFLAGS; LDFLAGS_FOR_BUILD=$LDFLAGS; LIBS_FOR_BUILD=$LIBS
],
[
AC_MSG_CHECKING([for C compiler for build system ($build)])
AS_IF([test x"$CC_FOR_BUILD" = x],
[AC_MSG_RESULT([$CC])], [AC_MSG_RESULT([$CC_FOR_BUILD])])
AC_MSG_CHECKING([for C++ compiler for build system ($build)])
AS_IF([test x"$CXX_FOR_BUILD" = x],
[AC_MSG_RESULT([$CXX])], [AC_MSG_RESULT([$CXX_FOR_BUILD])])
AS_IF([test x"$CC_FOR_BUILD" = x -a x"$CXX_FOR_BUILD" != x],
[
AC_MSG_ERROR([no C compiler command for build system given
Set \`CC_FOR_BUILD' to the C compiler of build system.])
])
AS_IF([test x"$CXX_FOR_BUILD" = x -a x"$CC_FOR_BUILD" != x],
[
AC_MSG_ERROR([no C++ compiler command for build system given
Set \`CXX_FOR_BUILD' to the C++ compiler of build system.])
])
AS_IF([test x"$CC_FOR_BUILD" != x -a x"$CXX_FOR_BUILD" != x],
[
comp_for_build_given="yes"
])
AS_IF([test x"$CC_FOR_BUILD" = x -a x"$CXX_FOR_BUILD" = x],
[
AC_MSG_NOTICE([no C/C++ compiler command for build system given
In cross compile mode, it's recommended to build the compiler wrappers and OPARI for the build system. Set \`CC_FOR_BUILD' and `CXX_FOR_BUILD' to the C/C++ compiler of build system.])
CC_FOR_BUILD=$CC
CXX_FOR_BUILD=$CXX
])
AS_IF([test x"$CFLAGS_FOR_BUILD" = x], [CFLAGS_FOR_BUILD=$CFLAGS])
AS_IF([test x"$CXXFLAGS_FOR_BUILD" = x], [CXXFLAGS_FOR_BUILD=$CXXFLAGS])
AS_IF([test x"$CPPFLAGS_FOR_BUILD" = x], [CPPFLAGS_FOR_BUILD=$CPPFLAGS])
AS_IF([test x"$LDFLAGS_FOR_BUILD" = x], [LDFLAGS_FOR_BUILD=$LDFLAGS])
AS_IF([test x"$LIBS_FOR_BUILD" = x], [LIBS_FOR_BUILD=$LIBS])
AS_IF([test x"$comp_for_build_given" = "xyes"],
[
sav_CPPFLAGS=$CPPFLAGS; sav_LDFLAGS=$LDFLAGS; sav_LIBS=$LIBS
CPPFLAGS=$CPPFLAGS_FOR_BUILD; LDFLAGS=$LDFLAGS_FOR_BUILD; LIBS=$LIBS_FOR_BUILD
sav_CC=$CC; sav_CFLAGS=$CFLAGS; sav_CPP=$CPP
CC=$CC_FOR_BUILD; CFLAGS=$CFLAGS_FOR_BUILD
AC_MSG_CHECKING([whether the C compiler for build system works])
AC_TRY_LINK([], [],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([C compiler for build system cannot create executables
See \`config.log' for more details.])])
AS_IF([test x"$CPP_FOR_BUILD" = x],
[
unset CPP
unset ac_cv_prog_CPP # clear cache variable for CPP
AC_PROG_CPP
CPP_FOR_BUILD=$CPP
])
CC=$sav_CC; CFLAGS=$sav_CFLAGS; CPP=$sav_CPP
AC_LANG([C++])
sav_CXX=$CXX; sav_CXXFLAGS=$CXXFLAGS; sav_CXXCPP=$CXXCPP
CXX=$CXX_FOR_BUILD; CXXFLAGS=$CXXFLAGS_FOR_BUILD
AC_MSG_CHECKING([whether the C++ compiler for build system works])
AC_TRY_LINK([], [],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([C++ compiler for build system cannot create executables
See \`config.log' for more details.])])
AS_IF([test x"$CXXCPP_FOR_BUILD" = x],
[
unset CXXCPP
unset ac_cv_prog_CXXCPP # clear cache variable for CXXCPP
AC_PROG_CXXCPP
CXXCPP_FOR_BUILD=$CXXCPP
])
CXX=$sav_CXX; CXXFLAGS=$sav_CXXFLAGS; CXXCPP=$sav_CXXCPP
AC_LANG([C])
CPPFLAGS=$sav_CPPFLAGS; LDFLAGS=$sav_LDFLAGS; LIBS=$sav_LIBS
])
])
# Check prefix for cross-tool's executables
cross_prefix="cross-"
AC_ARG_WITH(cross-prefix,
AC_HELP_STRING([--with-cross-prefix=PREFIX],
[prefix for cross-tool's executables (e.g. PREFIXvtcc, PREFIXvtf77), default: cross-]),
[
AS_IF([test x"$withval" = "xno"], [cross_prefix=],
[AS_IF([test x"$withval" != "xyes"], [cross_prefix=$withval])])
])
AS_IF([test x"$cross_compiling" = "xyes" -a x"$comp_for_build_given" = "xyes"],
[CROSS_PREFIX=$cross_prefix], [CROSS_PREFIX=])
AC_SUBST(CROSS_PREFIX)
])

Просмотреть файл

@ -0,0 +1,22 @@
AC_DEFUN([ACVT_CSFS],
[
have_csfs="no"
AC_MSG_CHECKING([if build filesystem is case sensitive])
cat > conftest.out << EOF
lowercase
EOF
cat > CONFTEST.OUT <<EOF
uppercase
EOF
AS_IF([test "`cat conftest.out`" = "lowercase"],
[have_csfs="yes"])
AC_MSG_RESULT([$have_csfs])
rm -f conftest.out CONFTEST.OUT
])

Просмотреть файл

@ -0,0 +1,79 @@
AC_DEFUN([ACVT_CTOOL],
[
ctool_error="no"
have_ctool="no"
CTOOLDIR=
CTOOLINCDIR=
CTOOLLIBDIR=
CTOOLLIB=
AC_ARG_WITH(ctool-dir,
AC_HELP_STRING([--with-ctool-dir=CTOOLDIR],
[give the path for CTool, default: /usr]),
[CTOOLDIR="$withval/"])
AC_ARG_WITH(ctool-inc-dir,
AC_HELP_STRING([--with-ctool-inc-dir=CTOOLINCDIR],
[give the path for CTool-include files, default: CTOOLDIR/include]),
[CTOOLINCDIR="-I$withval/"],
[AS_IF([test x"$CTOOLDIR" != x], [CTOOLINCDIR="-I$CTOOLDIR"include/])])
AC_ARG_WITH(ctool-lib-dir,
AC_HELP_STRING([--with-ctool-lib-dir=CTOOLLIBDIR],
[give the path for CTool-libraries, default: CTOOLDIR/lib]),
[CTOOLLIBDIR="-L$withval/"],
[AS_IF([test x"$CTOOLDIR" != x], [CTOOLLIBDIR="-L$CTOOLDIR"lib/])])
AC_ARG_WITH(ctool-lib,
AC_HELP_STRING([--with-ctool-lib=CTOOLLIB], [use given CTool lib, default: -lctool]),
[CTOOLLIB="$withval"])
AC_LANG([C++])
sav_CXX=$CXX; CXX=$CXX_FOR_BUILD
sav_CXXFLAGS=$CXXFLAGS; CXXFLAGS=$CXXFLAGS_FOR_BUILD
sav_CXXCPP=$CXXCPP; CXXCPP=$CXXCPP_FOR_BUILD
sav_CPPFLAGS=$CPPFLAGS; CPPFLAGS=$CPPFLAGS_FOR_BUILD
sav_LDFLAGS=$LDFLAGS; LDFLAGS=$LDFLAGS_FOR_BUILD
sav_LIBS=$LIBS; LIBS=$LIBS_FOR_BUILD
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $CTOOLINCDIR"
AC_CHECK_HEADER([ctool/ctool.h], [],
[
AC_MSG_NOTICE([error: no ctool/ctool.h found; check path for CTool package first...])
ctool_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
AS_IF([test x"$CTOOLLIB" = x -a x"$ctool_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $CTOOLLIBDIR -lctool"
AC_MSG_CHECKING([whether linking with -lctool works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); CTOOLLIB=-lctool],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
CXX=$sav_CXX
CXXFLAGS=$sav_CXXFLAGS
CXXCPP=$sav_CXXCPP
CPPFLAGS=$sav_CPPFLAGS
LDFLAGS=$sav_LDFLAGS
LIBS=$sav_LIBS
AC_LANG([C])
AS_IF([test x"$CTOOLLIB" = x -a x"$ctool_error" = "xno"],
[
AC_MSG_NOTICE([error: no libctool found; check path for CTool package first...])
ctool_error="yes"
])
AS_IF([test x"$ctool_error" = "xno"], [have_ctool="yes"])
AC_SUBST(CTOOLINCDIR)
AC_SUBST(CTOOLLIBDIR)
AC_SUBST(CTOOLLIB)
])

Просмотреть файл

@ -0,0 +1,69 @@
AC_DEFUN([ACVT_DL],
[
dl_error="no"
have_dl="no"
DLDIR=
DLINCDIR=
DLLIBDIR=
DLLIB=
AC_ARG_WITH(dl-dir,
AC_HELP_STRING([--with-dl-dir=DLDIR], [give the path for libdl, default: /usr]),
[DLDIR="$withval/"])
AC_ARG_WITH(dl-inc-dir,
AC_HELP_STRING([--with-dl-inc-dir=DLINCDIR],
[give the path for libdl-include files, default: DLDIR/include]),
[DLINCDIR="-I$withval/"],
[AS_IF([test x"$DLDIR" != x], [DLINCDIR="-I$DLDIR"include/])])
AC_ARG_WITH(dl-lib-dir,
AC_HELP_STRING([--with-dl-lib-dir=DLLIBDIR],
[give the path for libdl-libraries, default: DLDIR/lib]),
[DLLIBDIR="-L$withval/"],
[AS_IF([test x"$DLDIR" != x], [DLLIBDIR="-L$DLDIR"lib/])])
AC_ARG_WITH(dl-lib,
AC_HELP_STRING([--with-dl-lib=DLLIB], [use given libdl lib, default: -ldl]),
[DLLIB="$withval"])
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $DLINCDIR"
AC_CHECK_HEADER([dlfcn.h], [],
[
AC_MSG_NOTICE([error: no dlfcn.h found; check path for libdl package first...])
dl_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
AS_IF([test x"$DLLIB" = x -a x"$dl_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $DLLIBDIR -ldl"
AC_MSG_CHECKING([whether linking with -ldl works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); DLLIB=-ldl],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$DLLIB" = x -a x"$dl_error" = "xno"],
[
AC_MSG_NOTICE([error: no libdl found; check path for libdl package first...])
dl_error="yes"
])
AS_IF([test x"$dl_error" = "xno"],
[
have_dl="yes"
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $DLINCDIR -D_GNU_SOURCE"
AC_CHECK_DECLS([RTLD_NEXT], [], [], [#include <dlfcn.h>])
CPPFLAGS=$sav_CPPFLAGS
])
AC_SUBST(DLINCDIR)
AC_SUBST(DLLIBDIR)
AC_SUBST(DLLIB)
])

Просмотреть файл

@ -0,0 +1,139 @@
AC_DEFUN([ACVT_DYNINST],
[
dyninst_error="no"
dynattlib_error="no"
check_dyninst="yes"
force_dyninst="no"
check_dynattlib="yes"
force_dynattlib="no"
build_dynattlib="no"
have_dyninst="no"
DYNIDIR=
DYNIINCDIR=
DYNILIBDIR=
DYNILIB=
VTDYNATTLIB=
AC_ARG_ENABLE(dyninst,
AC_HELP_STRING([--enable-dyninst],
[enable support for binary instrumentation by using Dyninst, default: enable if found by configure]),
[AS_IF([test x"$enableval" = "xyes"], [force_dyninst="yes"], [check_dyninst="no"])])
AC_ARG_ENABLE(dyninst-attlib,
AC_HELP_STRING([--enable-dyninst-attlib],
[build shared library which attaches Dyninst to running application, default: enable if Dyninst found by configure and system supports shared libraries]),
[AS_IF([test x"$enableval" = "xyes"], [force_dyninst="yes"; check_dyninst="yes"; force_dynattlib="yes"; build_dynattlib="yes"], [check_dynattlib="no"])])
AC_ARG_WITH(dyninst-dir,
AC_HELP_STRING([--with-dyninst-dir=DYNIDIR], [give the path for Dyninst, default: /usr]),
[DYNIDIR="$withval/"])
AC_ARG_WITH(dyninst-inc-dir,
AC_HELP_STRING([--with-dyninst-inc-dir=DYNIINCDIR],
[give the path for Dyninst-include files, default: DYNIDIR/include]),
[DYNIINCDIR="-I$withval/"],
[AS_IF([test x"$DYNIDIR" != x], [DYNIINCDIR="-I$DYNIDIR"include/])])
AC_ARG_WITH(dyninst-lib-dir,
AC_HELP_STRING([--with-dyninst-lib-dir=DYNILIBDIR],
[give the path for Dyninst-libraries, default: DYNIDIR/lib]),
[DYNILIBDIR="-L$withval/"],
[AS_IF([test x"$DYNIDIR" != x], [DYNILIBDIR="-L$DYNIDIR"lib/])])
AC_ARG_WITH(dyninst-lib,
AC_HELP_STRING([--with-dyninst-lib=DYNILIB], [use given Dyninst lib, default: -ldyninstAPI -liberty]),
[DYNILIB="$withval"])
AS_IF([test "$check_dyninst" = "yes"],
[
AS_IF([test x"$liberty_error" = x], [ACVT_LIBERTY])
AS_IF([test x"$have_liberty" = "xno"], [dyninst_error="yes"])
AC_LANG([C++])
AS_IF([test x"$dyninst_error" = "xno"],
[
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $DYNIINCDIR"
AC_CHECK_HEADER([BPatch.h], [],
[
AC_MSG_NOTICE([error: no BPatch.h found; check path for Dyninst package first...])
dyninst_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
])
AS_IF([test x"$DYNILIB" = x -a x"$dyninst_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $DYNILIBDIR -ldyninstAPI $LIBERTYLIBDIR $LIBERTYLIB"
AC_MSG_CHECKING([whether linking with -ldyninstAPI $LIBERTYLIB works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); DYNILIB="-ldyninstAPI $LIBERTYLIBDIR $LIBERTYLIB"],
[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$DYNILIB" = x -a x"$dyninst_error" = "xno"],
[
AC_MSG_NOTICE([error: no libdyninstAPI found; check path for Dyninst package first...])
dyninst_error="yes"
])
AS_IF([test x"$dyninst_error" = "xno"],
[
AC_MSG_CHECKING([whether Dyninst version >= 5.1])
sav_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $DYNIINCDIR"
AC_TRY_COMPILE([#include <BPatch.h>],
[
#ifndef DYNINST_5_1
# error "DYNINST_5_1 not defined"
#endif
],
[AC_MSG_RESULT([yes])],
[
AC_MSG_RESULT([no])
AC_MSG_NOTICE([error: Dyninst version could not be determined and/or is incompatible (< 5.1)
See \`config.log' for more details.])
dyninst_error="yes"
])
CXXFLAGS=$sav_CXXFLAGS
])
AC_LANG([C])
AS_IF([test x"$dyninst_error" = "xno"],
[
have_dyninst="yes"
ACVT_CONF_SUBSUBTITLE([Dyninst attach library])
AS_IF([test x"$check_dynattlib" = "xyes"],
[
AC_MSG_CHECKING([whether we can build shared libraries])
AS_IF([test x"$enable_shared" = "xyes"],
[
AC_MSG_RESULT([yes])
build_dynattlib="yes"
VTDYNATTLIB="-lvt-dynatt"
],
[
AC_MSG_RESULT([no])
dynattlib_error="yes"
])
],
[
AS_IF([test x"$enable_config_titles" = "xyes"],
[AC_MSG_NOTICE([disabled via command line switch])])
])
])
])
AC_SUBST(DYNIINCDIR)
AC_SUBST(DYNILIBDIR)
AC_SUBST(DYNILIB)
AC_SUBST(VTDYNATTLIB)
])

Просмотреть файл

@ -0,0 +1,26 @@
AC_DEFUN([ACVT_ETIMESYNC],
[
etimesync_error="no"
check_etimesync="yes"
force_etimesync="no"
have_etimesync="no"
AC_ARG_ENABLE(etimesync,
AC_HELP_STRING([--enable-etimesync],
[enable enhanced time synchronization support, default: enable if LAPACK found by configure]),
[AS_IF([test x"$enableval" = "xyes"], [force_etimesync="yes"], [check_etimesync="no"])])
AS_IF([test x"$check_etimesync" = "xyes"],
[
AS_IF([test x"$math_error" = x], [ACVT_MATH])
AS_IF([test x"$have_math" = "xno"], [etimesync_error="yes"])
AS_IF([test x"$etimesync_error" = "xno"],
[
ACVT_CLAPACK
AS_IF([test x"$have_clapack" = "xyes"],
[have_etimesync="yes"], [etimesync_error="yes"])
])
])
])

Просмотреть файл

@ -0,0 +1,42 @@
AC_DEFUN([ACVT_GETCPU],
[
getcpu_error="no"
check_getcpu="yes"
force_getcpu="no"
have_getcpu="no"
AC_ARG_ENABLE(cpuidtrace,
AC_HELP_STRING([--enable-cpuidtrace], [enable CPU ID tracing support, default: enable if found by configure]),
[AS_IF([test x"$enableval" = "xyes"], [force_getcpu="yes"], [check_getcpu="no"])])
AS_IF([test x"$check_getcpu" = "xyes"],
[
AC_CHECK_HEADER([sched.h], [],
[
AC_MSG_NOTICE([error: no sched.h found])
getcpu_error="yes"
])
AS_IF([test x"$getcpu_error" = "xno"],
[
AC_CHECK_FUNC([sched_getcpu], [], [getcpu_error="yes"])
])
AS_IF([test x"$getcpu_error" = "xno" -a x"$cross_compiling" = "xno"],
[
AC_MSG_CHECKING([whether sched_getcpu works])
AC_TRY_RUN(
[
#include <sched.h>
int main() { return (sched_getcpu() != -1) ? 0 : 1; }
],
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); getcpu_error="yes"], [])
])
AS_IF([test x"$getcpu_error" = "xno"],
[
have_getcpu="yes"
])
])
])

Просмотреть файл

@ -0,0 +1,32 @@
AC_DEFUN([ACVT_GNUDMGL],
[
gnudmgl_error="no"
have_gnudmgl="no"
ACVT_LIBERTY
AS_IF([test x"$LIBERTYLIB" = x], [gnudmgl_error="yes"])
AS_IF([test x"$gnudmgl_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $LIBERTYLIBDIR $LIBERTYLIB"
AC_CHECK_FUNC([cplus_demangle], [], [gnudmgl_error="yes"])
LIBS=$sav_LIBS
])
AS_IF([test x"$gnudmgl_error" = "xno"],
[
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LIBERTYINCDIR"
AC_CHECK_HEADERS([demangle.h])
CPPFLAGS=$sav_CPPFLAGS
])
AS_IF([test x"$gnudmgl_error" = "xno"],
[
have_gnudmgl="yes"
AC_DEFINE([HAVE_GNU_DEMANGLE],
[1], [Define to 1 if you can use GNU demangling of C++ names.])
])
])

Просмотреть файл

@ -0,0 +1,32 @@
AC_DEFUN([ACVT_IOWRAP],
[
iowrap_error="no"
have_iowrap="no"
AS_IF([test x"$libc_error" = x], [ACVT_LIBC])
AS_IF([test x"$libc_pathname" = x], [iowrap_error="yes"])
AS_IF([test x"$iowrap_error" = "xno"],
[
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
AC_CHECK_FUNCS([ \
creat64 \
fopen64 \
fseeko \
fseeko64 \
lseek64 \
fsetpos64 \
open64 \
pread64 \
pwrite64 \
flockfile \
ftrylockfile \
funlockfile \
lockf])
CPPFLAGS=$sav_CPPFLAGS
have_iowrap="yes"
])
])

Просмотреть файл

@ -0,0 +1,27 @@
AC_DEFUN([ACVT_JAVA],
[
java_error="no"
check_java="yes"
force_java="no"
have_java="no"
AC_ARG_ENABLE(java,
AC_HELP_STRING([--enable-java],
[enable Java support, default: enable if JVMTI found by configure]),
[AS_IF([test x"$enableval" = "xyes"], [force_java="yes"], [check_java="no"])])
AS_IF([test x"$check_java" = "xyes"],
[
AC_MSG_CHECKING([whether we can build shared libraries])
AS_IF([test x"$enable_shared" = "xyes"],
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); java_error="yes"])
AS_IF([test x"$java_error" = "xno"],
[
ACVT_JVMTI
AS_IF([test x"$have_jvmti" = "xyes"],
[have_java="yes"], [java_error="yes"])
])
])
])

Просмотреть файл

@ -0,0 +1,50 @@
AC_DEFUN([ACVT_JVMTI],
[
jvmti_error="no"
have_jvmti="no"
JVMTIDIR=
JVMTIINCDIR=
AC_REQUIRE([ACVT_PLATFORM])
AC_ARG_WITH(jvmti-dir,
AC_HELP_STRING([--with-jvmti-dir=JVMTIDIR],
[give the path for JVMTI, default: JAVA_HOME]),
[JVMTIDIR="$withval/"],
[AS_IF([test x"$JAVA_HOME" != x], [JVMTIDIR="$JAVA_HOME/"])])
AC_ARG_WITH(jvmti-inc-dir,
AC_HELP_STRING([--with-jvmti-inc-dir=JVMTIINCDIR],
[give the path for JVMTI-include files, default: JVMTI/include]),
[JVMTIINCDIR="-I$withval/"],
[AS_IF([test x"$JVMTIDIR" != x], [JVMTIINCDIR="-I$JVMTIDIR"include/])])
extra_inc_dir=
case $PLATFORM in
linux)
extra_inc_dir=linux
;;
sun)
extra_inc_dir=solaris
;;
esac
AS_IF([test x"$extra_inc_dir" != x],
[
AS_IF([test x"$JVMTIINCDIR" != x],
[JVMTIINCDIR="$JVMTIINCDIR $JVMTIINCDIR$extra_inc_dir/"],
[JVMTIINCDIR="-I/usr/include/$extra_inc_dir/"])
])
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $JVMTIINCDIR"
AC_CHECK_HEADER([jvmti.h], [have_jvmti="yes"],
[
AC_MSG_NOTICE([error: no jvmti.h found; check path for JVMTI package first...])
jvmti_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
AC_SUBST(JVMTIINCDIR)
])

Просмотреть файл

@ -0,0 +1,53 @@
AC_DEFUN([ACVT_LIBC],
[
libc_error="no"
libc_pathname=
AC_ARG_WITH(libc,
AC_HELP_STRING([--with-libc=NAME],
[give the pathname for LIBC, default: automatically by configure]),
[
AS_IF([test x"$withval" = "xyes" -o x"$withval" = "xno"],
[AC_MSG_ERROR([value of '--with-libc' not properly set])])
libc_pathname=$withval
])
AC_MSG_CHECKING([for LIBC's pathname])
AS_IF([test x"$libc_pathname" = x],
[
rm -f conftest
AC_TRY_LINK([], [],
[
AS_IF([test -r "conftest"],
[
libc_pathname=`ldd conftest | grep "libc\." | \
sed -e "s/.*=>//" \
-e "s/[[\(].*[\)]]//" \
-e "s/[[ ]]//g" \
-e "s%^[[^/]].*%%" | \
head -n1`
],
[
libc_error="yes"
])
],
[
libc_error="yes"
])
])
AS_IF([test x"$libc_pathname" != x -a x"$libc_error" = "xno"],
[
AC_MSG_RESULT([$libc_pathname])
AC_DEFINE_UNQUOTED([DEFAULT_LIBC_PATHNAME],
["$libc_pathname"], [default pathname of LIBC])
],
[
AC_MSG_RESULT([unknown])
AC_MSG_NOTICE([error: could not determine pathname of LIBC!])
libc_error="yes"
])
])

Просмотреть файл

@ -0,0 +1,28 @@
AC_DEFUN([ACVT_LIBCWRAP],
[
libcwrap_error="no"
have_libcwrap="no"
have_fork="no"
AS_IF([test x"$libc_error" = x], [ACVT_LIBC])
AS_IF([test x"$libc_pathname" = x], [libcwrap_error="yes"])
AS_IF([test x"$libcwrap_error" = "xno"],
[
AC_CHECK_FUNCS([fork], [have_fork="yes"])
AC_CHECK_FUNCS([ \
execl \
execle \
execlp \
execv \
execve \
execvp \
system \
wait \
waitpid])
have_libcwrap="yes"
])
])

Просмотреть файл

@ -0,0 +1,63 @@
AC_DEFUN([ACVT_LIBERTY],
[
liberty_error="no"
have_liberty="no"
LIBERTYDIR=
LIBERTYINCDIR=
LIBERTYLIBDIR=
LIBERTYLIB=
AC_ARG_WITH(liberty-dir,
AC_HELP_STRING([--with-liberty-dir=LIBERTYDIR], [give the path for LIBERTY, default: /usr]),
[LIBERTYDIR="$withval/"])
AC_ARG_WITH(liberty-inc-dir,
AC_HELP_STRING([--with-liberty-inc-dir=LIBERTYINCDIR],
[give the path for LIBERTY-include files, default: LIBERTYDIR/include]),
[LIBERTYINCDIR="-I$withval/"],
[AS_IF([test x"$LIBERTYDIR" != x], [LIBERTYINCDIR="-I$LIBERTYDIR"include/])])
AC_ARG_WITH(liberty-lib-dir,
AC_HELP_STRING([--with-liberty-lib-dir=LIBERTYLIBDIR],
[give the path for LIBERTY-libraries, default: LIBERTYDIR/lib]),
[LIBERTYLIBDIR="-L$withval/"],
[AS_IF([test x"$LIBERTYDIR" != x], [LIBERTYLIBDIR="-L$LIBERTYDIR"lib/])])
AC_ARG_WITH(liberty-lib,
AC_HELP_STRING([--with-liberty-lib=LIBERTYLIB], [use given liberty lib, default: -liberty]),
[LIBERTYLIB="$withval"])
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LIBERTYINCDIR"
AC_CHECK_HEADER([libiberty.h], [],
[
AC_MSG_NOTICE([error: no libiberty.h found; check path for LIBERTY package first...])
liberty_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
AS_IF([test x"$LIBERTYLIB" = x -a x"$liberty_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $LIBERTYLIBDIR -liberty"
AC_MSG_CHECKING([whether linking with -liberty works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); LIBERTYLIB=-liberty],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$LIBERTYLIB" = x -a x"$liberty_error" = "xno"],
[
AC_MSG_NOTICE([error: no libiberty found; check path for LIBERTY package first...])
liberty_error="yes"
])
AS_IF([test x"$LIBERTYLIB" != x -a x"$liberty_error" = "xno"],
[have_liberty="yes"])
AC_SUBST(LIBERTYINCDIR)
AC_SUBST(LIBERTYLIBDIR)
AC_SUBST(LIBERTYLIB)
])

Просмотреть файл

@ -0,0 +1,95 @@
AC_DEFUN([ACVT_LIBWRAP],
[
libwrap_error="no"
check_libwrap="gen libc io"
force_libwrap="no"
have_libwrap="no"
force_libwrapgen="no"
build_libwrapgen="no"
force_libcwrap="no"
force_iowrap="no"
AC_REQUIRE([ACVT_PLATFORM])
AC_ARG_ENABLE(libtrace,
AC_HELP_STRING([--enable-libtrace=LIST],
[enable library tracing support (gen,libc,io), default: automatically by configure]),
[
AS_IF([test x"$enableval" = "xno"], [check_libwrap="no"])
AS_IF([test x"$enableval" = "xyes"], [force_libwrap="yes"])
AS_IF([test x"$enableval" != "xyes" -a x"$enableval" != "xno"],
[
check_libwrap=`echo $enableval | sed 's/,/ /g'`
for lw in $check_libwrap
do
case $lw in
gen)
force_libwrapgen="yes"
;;
libc)
force_libcwrap="yes"
;;
io)
force_iowrap="yes"
;;
*)
AC_MSG_ERROR([value of '--enable-libtrace' not properly set])
;;
esac
done
force_libwrap="yes"
])
])
AS_IF([test x"$check_libwrap" != "xno"],
[
AS_IF([test "$PLATFORM" = "bgl" -o "$PLATFORM" = "bgp"],
[
AC_MSG_NOTICE([error: library tracing not supported on IBM BlueGene])
libwrap_error="yes"
],
[
AS_IF([test x"$dl_error" = x], [ACVT_DL])
AS_IF([test x"$have_dl" = "xno"], [libwrap_error="yes"])
AS_IF([test x"$libwrap_error" = "xno"],
[
for lw in $check_libwrap
do
case $lw in
gen)
ACVT_CONF_SUBTITLE([Library wrapper generator])
ACVT_CTOOL
AS_IF([test x"$have_ctool" = "xyes"],
[have_libwrap="yes"; build_libwrapgen="yes"],
[
AS_IF([test x"$force_libwrapgen" = "xyes"],
[libwrap_error="yes"; break])
])
;;
libc)
ACVT_CONF_SUBTITLE([LIBC])
ACVT_LIBCWRAP
AS_IF([test x"$have_libcwrap" = "xyes"], [have_libwrap="yes"],
[
AS_IF([test x"$force_libcwrap" = "xyes"],
[libwrap_error="yes"; break])
])
;;
io)
ACVT_CONF_SUBTITLE([LIBC-I/O])
ACVT_IOWRAP
AS_IF([test x"$have_iowrap" = "xyes"], [have_libwrap="yes"],
[
AS_IF([test x"$force_iowrap" = "xyes"],
[libwrap_error="yes"; break])
])
;;
esac
done
])
])
])
])

Просмотреть файл

@ -0,0 +1,20 @@
AC_DEFUN([ACVT_LTMPDIR],
[
local_tmp_dir=
AC_ARG_WITH(local-tmp-dir,
AC_HELP_STRING([--with-local-tmp-dir=DIR],
[give the path for node-local temporary directory, default: /tmp]),
[
AS_IF([test x"$withval" = "xyes" -o x"$withval" = "xno"],
[AC_MSG_ERROR([value of '--with-local-tmp-dir' not properly set])])
local_tmp_dir=$withval
])
AS_IF([test x"$local_tmp_dir" != x],
[
AC_DEFINE_UNQUOTED(DEFAULT_PFORM_LDIR,
["$local_tmp_dir"], [Path for node-local temporary directory])
])
])

Просмотреть файл

@ -0,0 +1,29 @@
AC_DEFUN([ACVT_MATH],
[
math_error="no"
have_math="no"
MATHLIB=
AC_CHECK_HEADER([math.h], [],
[
AC_MSG_NOTICE([error: no math.h found; check path for libmath package first...])
math_error="yes"
])
AS_IF([test x"$math_error" = "xno"],
[
AC_MSG_CHECKING([whether we need to link -lm to get math functions])
AC_TRY_LINK([#include <math.h>],
[
volatile double c, x = 47.11;
c = ceil(x);
],
[AC_MSG_RESULT([no])], [AC_MSG_RESULT([yes]); MATHLIB=-lm])
])
AS_IF([test x"$math_error" = "xno"], [have_math="yes"])
AC_SUBST(MATHLIB)
])

Просмотреть файл

@ -0,0 +1,32 @@
AC_DEFUN([ACVT_MEMHOOKS],
[
memhooks_error="no"
check_memhooks="yes"
force_memhooks="no"
have_memhooks="no"
AC_ARG_ENABLE(memtrace,
AC_HELP_STRING([--enable-memtrace], [enable memory tracing support, default: enable if found by configure]),
[AS_IF([test x"$enableval" = "xyes"], [force_memhooks="yes"], [check_memhooks="no"])])
AS_IF([test x"$check_memhooks" = "xyes"],
[
AC_CHECK_HEADER([malloc.h], [],
[
AC_MSG_NOTICE([error: no malloc.h found])
memhooks_error="yes"
])
AS_IF([test x"$memhooks_error" = "xno"],
[
memhooks_error="yes"
AC_CHECK_FUNC([__malloc_hook],
[AC_CHECK_FUNC([__realloc_hook],
[AC_CHECK_FUNC([__free_hook], [memhooks_error="no"],
[])])])
])
AS_IF([test x"$memhooks_error" = "xno"], [have_memhooks="yes"])
])
])

Просмотреть файл

@ -0,0 +1,62 @@
AC_DEFUN([ACVT_METRICS],
[
metrics_error="no"
check_metrics="papi cpc necsx"
force_metrics="no"
have_metrics="no"
AC_REQUIRE([ACVT_PLATFORM])
AC_ARG_ENABLE(metrics,
AC_HELP_STRING([--enable-metrics=TYPE],
[enable support for hardware performance counter (papi,cpc,necsx), default: automatically by configure]),
[
AS_IF([test x"$enableval" = "xno"], [check_metrics="no"])
AS_IF([test x"$enableval" = "xyes"], [force_metrics="yes"])
AS_IF([test x"$enableval" != "xyes" -a x"$enableval" != "xno"],
[
AS_IF([test x"$enableval" != "xpapi" -a x"$enableval" != "xcpc" -a x"$enableval" != "xnecsx"],
[AC_MSG_ERROR([value of '--enable-metrics' not properly set])])
check_metrics="$enableval"
force_metrics="yes"
])
])
AS_IF([test x"$check_metrics" != "xno"],
[
for cm in $check_metrics
do
AS_IF([test x"$cm" = "xpapi"],
[
ACVT_CONF_SUBTITLE([PAPI])
ACVT_PAPI
AS_IF([test x"$have_papi" = "xyes"], [have_metrics="yes"; break])
])
AS_IF([test x"$cm" = "xcpc"],
[
ACVT_CONF_SUBTITLE([CPC])
ACVT_CPC
AS_IF([test x"$have_cpc" = "xyes"], [have_metrics="yes"; break])
])
AS_IF([test x"$cm" = "xnecsx"],
[
ACVT_CONF_SUBTITLE([NEC SX])
AC_MSG_CHECKING([whether we are on a NEC SX])
AS_IF([test x"$PLATFORM" = "xnecsx"],
[
AC_MSG_RESULT([yes])
CCASFLAGS="$CCASFLAGS -m"
have_necsxcntr="yes"
have_metrics="yes"
break
],
[
AC_MSG_RESULT([no])
])
])
done
AS_IF([test x"$have_metrics" = "xno"], [metrics_error="yes"])
])
])

874
ompi/contrib/vt/vt/config/m4/acinclude.mpi.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,874 @@
AC_DEFUN([ACVT_MPI],
[
mpi_error="no"
check_mpi="yes"
force_mpi="no"
have_mpi="no"
have_fmpi="no"
check_mpi2_thread="yes"; force_mpi2_thread="no"; have_mpi2_thread="no"
check_mpi2_1sided="yes"; force_mpi2_1sided="no"; have_mpi2_1sided="no"
check_mpi2_extcoll="yes"; force_mpi2_extcoll="no"; have_mpi2_extcoll="no"
check_mpi2_io="yes"; force_mpi2_io="no"; have_mpi2_io="no"
fmpiwraplib_error="no"
check_fmpiwraplib="yes"
force_fmpiwraplib="no"
build_fmpiwraplib="no"
check_fc_conv="yes"
have_mpi2_const="no"
have_mpi_status_size="no"
MPIDIR=
MPIINCDIR=
FMPIINCDIR=
MPILIBDIR=
MPILIB=
PMPILIB=
FMPILIB=
VT_MPIGEN_HAVE_MPI2_THREAD=0
VT_MPIGEN_HAVE_MPI2_1SIDED=0
VT_MPIGEN_HAVE_MPI2_EXTCOLL=0
VT_MPIGEN_HAVE_MPI2_IO=0
VT_MPIGEN_HAVE_FC_CONV_COMM=0
VT_MPIGEN_HAVE_FC_CONV_ERRH=0
VT_MPIGEN_HAVE_FC_CONV_FILE=0
VT_MPIGEN_HAVE_FC_CONV_GROUP=0
VT_MPIGEN_HAVE_FC_CONV_INFO=0
VT_MPIGEN_HAVE_FC_CONV_OP=0
VT_MPIGEN_HAVE_FC_CONV_REQUEST=0
VT_MPIGEN_HAVE_FC_CONV_STATUS=0
VT_MPIGEN_HAVE_FC_CONV_TYPE=0
VT_MPIGEN_HAVE_FC_CONV_WIN=0
VT_MPIGEN_HAVE_FC_CONV_MPI2CONST=0
AC_ARG_VAR(MPICC, [MPI C compiler command])
AC_ARG_VAR(MPICXX, [MPI C++ compiler command])
AC_ARG_VAR(MPIF77, [MPI Fortran 77 compiler command])
AC_ARG_VAR(MPICFLAGS, [MPI C compiler flags (append to CFLAGS)])
AC_ARG_VAR(MPICXXFLAGS, [MPI C++ compiler flags (append to CXXFLAGS)])
AC_ARG_VAR(MPIFFLAGS, [MPI Fortran 77 compiler flags (append to FFLAGS)])
AS_IF([test x"$inside_openmpi" = "xyes"],
[
AC_MSG_NOTICE([we are configuring inside Open MPI; presetting cache to skip MPI related tests])
ac_cv_prog_MPICC="$CC"
ac_cv_prog_MPICXX="$CXX"
ac_cv_prog_MPIF77="$F77"
MPIINCDIR="-I$top_vt_srcdir/../../../include -I$top_vt_builddir/../../../include"
FMPIINCDIR="$MPIINCDIR"
MPILIBDIR="-L$top_vt_builddir/../../../.libs"
enable_mpi="yes"
with_openmpi="yes"
check_mpi2_io="no"; have_mpi2_io="yes"
AC_ARG_ENABLE(mpi-io,
AC_HELP_STRING([--enable-mpi-io], [equal to --enable-mpi2-io]),
[AS_IF([test x"$enableval" = "xno"], [have_mpi2_io="no"])])
])
AC_ARG_ENABLE(mpi,
AC_HELP_STRING([--enable-mpi],
[enable MPI support, default: enable if MPI-installation found by configure]),
[AS_IF([test x"$enableval" = "xyes"], [force_mpi="yes"], [check_mpi="no"])])
AC_ARG_WITH(mpi-dir,
AC_HELP_STRING([--with-mpi-dir=MPIDIR], [give the path for MPI, default: /usr]),
[MPIDIR="$withval/"])
AC_ARG_WITH(mpi-inc-dir,
AC_HELP_STRING([--with-mpi-inc-dir=MPIINCDIR],
[give the path for MPI-include files, default: MPIDIR/include]),
[MPIINCDIR="-I$withval/"],
[AS_IF([test x"$MPIDIR" != x], [MPIINCDIR="-I$MPIDIR"include/])])
AC_ARG_WITH(fmpi-inc-dir,
AC_HELP_STRING([--with-fmpi-inc-dir=FMPIINCDIR],
[give the path for Fortran MPI-include files, default: MPIINCDIR]),
[FMPIINCDIR="-I$withval/"], [FMPIINCDIR=$MPIINCDIR])
AC_ARG_WITH(mpi-lib-dir,
AC_HELP_STRING([--with-mpi-lib-dir=MPILIBDIR],
[give the path for MPI-libraries, default: MPIDIR/lib]),
[MPILIBDIR="-L$withval/"],
[AS_IF([test x"$MPIDIR" != x], [MPILIBDIR="-L$MPIDIR"lib/])])
AC_ARG_WITH(hpmpi,
AC_HELP_STRING([--with-hpmpi], [set MPI-libs for HP MPI]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmtmpi"
PMPILIB="-lmtpmpi"
FMPILIB="-lvt-fmpi"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(intelmpi,
AC_HELP_STRING([--with-intelmpi], [set MPI-libs for Intel MPI]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpi"
PMPILIB="$MPILIB"
FMPILIB="-lvt-fmpi"
check_mpi2_thread="no"; have_mpi2_thread="no"
check_mpi2_1sided="no"; have_mpi2_1sided="no"
check_mpi2_extcoll="no"; have_mpi2_extcoll="no"
check_mpi2_io="no"; have_mpi2_io="no"
ac_cv_have_decl_MPI_IN_PLACE="no"
])
])
AC_ARG_WITH(intelmpi2,
AC_HELP_STRING([--with-intelmpi2], [set MPI-libs for Intel MPI2]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpi"
PMPILIB="$MPILIB"
FMPILIB="-lvt-fmpi"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(lam,
AC_HELP_STRING([--with-lam], [set MPI-libs for LAM/MPI]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpi -llam"
PMPILIB="$MPILIB"
FMPILIB="-llamf77mpi"
])
])
AC_ARG_WITH(mpibgl,
AC_HELP_STRING([--with-mpibgl], [set MPI-libs for IBM BG/L]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpich.rts"
PMPILIB="-lmpich.rts"
FMPILIB="-lfmpich.rts"
MPICFLAGS="$MPICFLAGS -DMPICH_IGNORE_CXX_SEEK"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(mpibgp,
AC_HELP_STRING([--with-mpibgp], [set MPI-libs for IBM BG/P]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpich.cnk"
PMPILIB="-lmpich.cnk"
FMPILIB="-lfmpich.cnk"
MPICFLAGS="$MPICFLAGS -DMPICH_IGNORE_CXX_SEEK"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(mpich,
AC_HELP_STRING([--with-mpich], [set MPI-libs for MPICH]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpich"
PMPILIB="-lpmpich"
FMPILIB="-lfmpich"
MPICFLAGS="$MPICFLAGS -DMPICH_IGNORE_CXX_SEEK"
check_mpi2_thread="no"; have_mpi2_thread="no"
check_mpi2_1sided="no"; have_mpi2_1sided="no"
check_mpi2_extcoll="no"; have_mpi2_extcoll="no"
check_mpi2_io="no"; have_mpi2_io="no"
ac_cv_have_decl_MPI_IN_PLACE="no"
])
])
AC_ARG_WITH(mpich2,
AC_HELP_STRING([--with-mpich2], [set MPI-libs for MPICH2]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpich"
PMPILIB="$MPILIB"
FMPILIB="-lfmpich"
MPICFLAGS="$MPICFLAGS -DMPICH_IGNORE_CXX_SEEK"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(mvapich,
AC_HELP_STRING([--with-mvapich], [set MPI-libs for MVAPICH]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpich"
PMPILIB="-lpmpich"
FMPILIB="-lfmpich"
MPICFLAGS="$MPICFLAGS -DMPICH_IGNORE_CXX_SEEK"
check_mpi2_thread="no"; have_mpi2_thread="no"
check_mpi2_1sided="no"; have_mpi2_1sided="no"
check_mpi2_extcoll="no"; have_mpi2_extcoll="no"
check_mpi2_io="no"; have_mpi2_io="no"
ac_cv_have_decl_MPI_IN_PLACE="no"
])
])
AC_ARG_WITH(mvapich2,
AC_HELP_STRING([--with-mvapich2], [set MPI-libs for MVAPICH2]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpich"
PMPILIB="$MPILIB"
FMPILIB="-lfmpich"
MPICFLAGS="$MPICFLAGS -DMPICH_IGNORE_CXX_SEEK"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(mpisx,
AC_HELP_STRING([--with-mpisx], [set MPI-libs for NEC MPI/SX]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpi"
PMPILIB="-lpmpi"
FMPILIB="-lvt-fmpi"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
check_mpi2_io="no"; have_mpi2_io="no"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(mpisx-ew,
AC_HELP_STRING([--with-mpisx-ew], [set MPI-libs for NEC MPI/SX with Fortran -ew]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpiw"
PMPILIB="-lpmpiw"
FMPILIB="-lvt-fmpi"
MPICFLAGS="$MPICFLAGS -D_W8"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
check_mpi2_io="no"; have_mpi2_io="no"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(openmpi,
AC_HELP_STRING([--with-openmpi], [set MPI-libs for Open MPI]),
[
AS_IF([test x"$withval" = "xyes"],
[
MPILIB="-lmpi"
PMPILIB="$MPILIB"
FMPILIB="-lvt-fmpi"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
ac_cv_func_MPI_Comm_f2c="yes"; ac_cv_func_MPI_Comm_c2f="yes"
ac_cv_func_MPI_Errhandler_f2c="yes"; ac_cv_func_MPI_Errhandler_c2f="yes"
ac_cv_func_MPI_File_f2c="yes"; ac_cv_func_MPI_File_c2f="yes"
ac_cv_func_MPI_Group_f2c="yes"; ac_cv_func_MPI_Group_c2f="yes"
ac_cv_func_MPI_Info_f2c="yes"; ac_cv_func_MPI_Info_c2f="yes"
ac_cv_func_MPI_Op_f2c="yes"; ac_cv_func_MPI_Op_c2f="yes"
ac_cv_func_MPI_Request_f2c="yes"; ac_cv_func_MPI_Request_c2f="yes"
ac_cv_func_MPI_Status_f2c="yes"; ac_cv_func_MPI_Status_c2f="yes"
ac_cv_func_MPI_Type_f2c="yes"; ac_cv_func_MPI_Type_c2f="yes"
ac_cv_func_MPI_Win_f2c="yes"; ac_cv_func_MPI_Win_c2f="yes"
ac_cv_have_decl_MPI_IN_PLACE="yes"
ac_cv_have_decl_MPI_STATUS_SIZE="no"
])
])
AC_ARG_WITH(sgimpt,
AC_HELP_STRING([--with-sgimpt], [set MPI-libs for SGI MPT]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpi"
PMPILIB="$MPILIB"
FMPILIB="-lvt-fmpi"
check_fc_conv="no"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="no"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(sunmpi,
AC_HELP_STRING([--with-sunmpi], [set MPI-libs for SUN MPI]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpi"
PMPILIB="$MPILIB"
FMPILIB="-lvt-fmpi"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(sunmpi-mt,
AC_HELP_STRING([--with-sunmpi-mt], [set MPI-libs for SUN MPI-MT]),
[
AS_IF([test x"$withval" = "xyes" -a x"$inside_openmpi" = "xno"],
[
MPILIB="-lmpi_mt"
PMPILIB="$MPILIB"
FMPILIB="-lvt-fmpi"
check_mpi2_thread="no"; have_mpi2_thread="yes"
check_mpi2_1sided="no"; have_mpi2_1sided="yes"
check_mpi2_extcoll="no"; have_mpi2_extcoll="yes"
ac_cv_have_decl_MPI_IN_PLACE="yes"
])
])
AC_ARG_WITH(mpi-lib,
AC_HELP_STRING([--with-mpi-lib], [use given mpi lib]),
[MPILIB="$withval"])
AC_ARG_WITH(pmpi-lib,
AC_HELP_STRING([--with-pmpi-lib], [use given pmpi lib]),
[PMPILIB="$withval"])
AC_ARG_WITH(fmpi-lib,
AC_HELP_STRING([--with-fmpi-lib], [use given fmpi lib]),
[FMPILIB="$withval"])
AC_ARG_ENABLE(fmpi-lib,
AC_HELP_STRING([--enable-fmpi-lib],
[build MPI Fortran support library, default: enable if no MPI Fortran library found by configure]),
[AS_IF([test x"$enableval" = "xyes"],
[force_fmpiwraplib="yes"; FMPILIB="-lvt-fmpi"], [check_fmpiwraplib="no"])])
AC_ARG_ENABLE(fmpi-handle-convert,
AC_HELP_STRING([--enable-fmpi-handle-convert],
[do convert MPI handles, default: enable if MPI conversion functions found by configure]),
[AS_IF([test x"$enableval" != "xyes"], [check_fc_conv="no"])])
AC_ARG_ENABLE(mpi2-thread,
AC_HELP_STRING([--enable-mpi2-thread],
[enable MPI-2 Thread support, default: enable if found by configure]),
[AS_IF([test x"$enableval" = "xyes"],
[check_mpi2_thread="yes"; force_mpi2_thread="yes"; have_mpi2_thread="no"],
[check_mpi2_thread="no"]; force_mpi2_thread="no"; have_mpi2_thread="no")])
AC_ARG_ENABLE(mpi2-1sided,
AC_HELP_STRING([--enable-mpi2-1sided],
[enable MPI-2 One-Sided Communication support, default: enable if found by configure]),
[AS_IF([test x"$enableval" = "xyes"],
[check_mpi2_1sided="yes"; force_mpi2_1sided="yes"; have_mpi2_1sided="no"],
[check_mpi2_1sided="no"]; force_mpi2_1sided="no"; have_mpi2_1sided="no")])
AC_ARG_ENABLE(mpi2-extcoll,
AC_HELP_STRING([--enable-mpi2-extcoll],
[enable MPI-2 Extended Collective Operation support, default: enable if found by configure]),
[AS_IF([test x"$enableval" = "xyes"],
[check_mpi2_extcoll="yes"; force_mpi2_extcoll="yes"; have_mpi2_extcoll="no"],
[check_mpi2_extcoll="no"; force_mpi2_extcoll="no"; have_mpi2_extcoll="no"])])
AC_ARG_ENABLE(mpi2-io,
AC_HELP_STRING([--enable-mpi2-io],
[enable MPI-2 I/O support, default: enable if found by configure]),
[AS_IF([test x"$enableval" = "xyes"],
[check_mpi2_io="yes"; force_mpi2_io="yes"; have_mpi2_io="no"],
[check_mpi2_io="no"; force_mpi2_io="no"; have_mpi2_io="no"])])
AS_IF([test x"$check_mpi" = "xyes"],
[
AC_CHECK_PROGS(MPICC, mpicc hcc mpcc mpcc_r mpxlc mpixlc cmpicc mpiicc)
AS_IF([test x"$MPICC" != x],
[
mpicc=`echo $MPICC | cut -d ' ' -f 1`
which_mpicc=`which $mpicc 2>/dev/null`
AS_IF([test x"$which_mpicc" = x], [AC_MSG_ERROR([$mpicc not found])])
mpi_bin_dir=`dirname $which_mpicc`
AS_IF([test "$mpi_bin_dir" != "/usr/bin"],
[
AS_IF([test x"$MPIDIR" = x],
[MPIDIR=`echo $mpi_bin_dir | sed -e 's/bin//'`])
AS_IF([test x"$MPIINCDIR" = x],
[MPIINCDIR=-I`echo $mpi_bin_dir | sed -e 's/bin/include/'`])
AS_IF([test x"$MPILIBDIR" = x],
[MPILIBDIR=-L`echo $mpi_bin_dir | sed -e 's/bin/lib/'`])
])
],
[
MPICC="$CC"
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $MPIINCDIR"
AC_CHECK_HEADER([mpi.h], [],
[
AC_MSG_NOTICE([error: no mpi.h found; check path for MPI package first...])
mpi_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
])
AS_IF([test x"$mpi_error" = "xno"],
[
AC_CHECK_PROGS(MPICXX, mpicxx mpic++ mpiCC hcp mpxlC_r mpxlC mpCC cmpic++)
AS_IF([test x"$MPICXX" = x], [MPICXX="$CXX"])
])
dnl check for MPILIB
AS_IF([test x"$MPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lmpich"
AC_MSG_CHECKING([whether linking with -lmpich works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIB=-lmpich],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
AS_IF([test x"$MPILIB" != x],
[MPICFLAGS="$MPICFLAGS -DMPICH_IGNORE_CXX_SEEK"])
])
AS_IF([test x"$MPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lmpichg2"
AC_MSG_CHECKING([whether linking with -lmpichg2 works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIB=-lmpichg2],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
AS_IF([test x"$MPILIB" != x],
[MPICFLAGS="$MPICFLAGS -DMPICH_IGNORE_CXX_SEEK"])
])
AS_IF([test x"$MPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lhpmpi"
AC_MSG_CHECKING([whether linking with -lhpmpi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIB=-lhpmpi],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
AS_IF([test x"$MPILIB" != x],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lmtmpi"
AC_MSG_CHECKING([whether linking with -lmtmpi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIB=-lmtmpi],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
])
AS_IF([test x"$MPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lmpi"
AC_MSG_CHECKING([whether linking with -lmpi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIB=-lmpi],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
AS_IF([test x"$MPILIB" != x],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -llam"
AC_MSG_CHECKING([whether linking with -llam works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); MPILIB="-lmpi -llam"],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
])
AS_IF([test x"$MPILIB" = x -a x"$mpi_error" = "xno"],
[
AC_MSG_NOTICE([error: no libhpmpi, libmpich, libmpi, or liblam found; check path for MPI package first...])
mpi_error="yes"
])
dnl check for PMPILIB
AS_IF([test x"$PMPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lpmpich"
AC_MSG_CHECKING([whether linking with -lpmpich works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); PMPILIB=-lpmpich],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$PMPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lpmpichg2"
AC_MSG_CHECKING([whether linking with -lpmpichg2 works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); PMPILIB=-lpmpichg2],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$PMPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lpmpi"
AC_MSG_CHECKING([whether linking with -lpmpi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); PMPILIB=-lpmpi],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
AS_IF([test x"$PMPILIB" != x],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lmtpmpi"
AC_MSG_CHECKING([whether linking with -lmtpmpi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); PMPILIB=-lmtpmpi],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
])
AS_IF([test x"$PMPILIB" = x -a x"$mpi_error" = "xno"],
[
PMPILIB="$MPILIB"
AC_MSG_WARN([no libpmpich, or libpmpi found; assuming $MPILIB])
])
dnl check for FMPILIB
AS_IF([test x"$FMPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lfmpich"
AC_MSG_CHECKING([whether linking with -lfmpich works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); FMPILIB=-lfmpich],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$FMPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -llamf77mpi"
AC_MSG_CHECKING([whether linking with -llamf77mpi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); FMPILIB=-llamf77mpi],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$FMPILIB" = x -a x"$mpi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $MPILIBDIR -lfmpi"
AC_MSG_CHECKING([whether linking with -lfmpi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); FMPILIB=-lfmpi],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$mpi_error" = "xno"],
[
AS_IF([test x"$FMPILIB" = x],
[
AS_IF([test x"$check_fmpiwraplib" = "xyes"],
[
AC_MSG_WARN([no libfmpich, liblamf77mpi, or libfmpi found; build libvt-fmpi])
FMPILIB="-lvt-fmpi"
])
],
[
AS_IF([test x"$FMPILIB" = "x-lvt-fmpi"],
[
AS_IF([test x"$check_fmpiwraplib" = "xno"],
[FMPILIB=])
],
[
AS_IF([test x"$force_fmpiwraplib" = "xyes"],
[FMPILIB="-lvt-fmpi"], [check_fmpiwraplib="no"])
])
])
])
dnl check for MPI-2
AS_IF([test x"$mpi_error" = "xno"],
[
sav_CC=$CC
sav_CPPFLAGS=$CPPFLAGS
sav_LIBS=$LIBS
CC=$MPICC
CPPFLAGS="$CPPFLAGS $MPICFLAGS $MPIINCDIR"
LIBS="$LIBS $MPILIBDIR $MPILIB"
dnl check for MPI-2 Thread support
ACVT_CONF_SUBTITLE([MPI-2 Thread support])
AS_IF([test x"$check_mpi2_thread" = "xyes"],
[
AC_CHECK_FUNC([MPI_Init_thread], [have_mpi2_thread="yes"])
AS_IF([test x"$force_mpi2_thread" = "xyes" -a x"$have_mpi2_thread" = "xno"], [exit 1])
],
[
AS_IF([test x"$enable_config_titles" = "xyes"],
[
AS_IF([test x"$have_mpi2_thread" = "xyes"],
[AC_MSG_NOTICE([enabled via command line switch])],
[AC_MSG_NOTICE([disabled via command line switch])])
])
])
dnl check for MPI-2 One-Sided Communications
ACVT_CONF_SUBTITLE([MPI-2 One-Sided Communications])
AS_IF([test x"$check_mpi2_1sided" = "xyes"],
[
AC_CHECK_FUNC([MPI_Get],
[AC_CHECK_FUNC([MPI_Put], [have_mpi2_1sided="yes"])])
AS_IF([test x"$force_mpi2_1sided" = "xyes" -a x"$have_mpi2_1sided" = "xno"], [exit 1])
],
[
AS_IF([test x"$enable_config_titles" = "xyes"],
[
AS_IF([test x"$have_mpi2_1sided" = "xyes"],
[AC_MSG_NOTICE([enabled via command line switch])],
[AC_MSG_NOTICE([disabled via command line switch])])
])
])
dnl check for MPI-2 Extended Collective Operations
ACVT_CONF_SUBTITLE([MPI-2 Extended Collective Operations])
AS_IF([test x"$check_mpi2_extcoll" = "xyes"],
[
AC_CHECK_FUNC([MPI_Alltoallw],
[AC_CHECK_FUNC([MPI_Exscan], [have_mpi2_extcoll="yes"])])
AS_IF([test x"$force_mpi2_extcoll" = "xyes" -a x"$have_mpi2_extcoll" = "xno"], [exit 1])
],
[
AS_IF([test x"$enable_config_titles" = "xyes"],
[
AS_IF([test x"$have_mpi2_extcoll" = "xyes"],
[AC_MSG_NOTICE([enabled via command line switch])],
[AC_MSG_NOTICE([disabled via command line switch])])
])
])
dnl check for MPI-2 I/O
ACVT_CONF_SUBTITLE([MPI-2 I/O])
AS_IF([test x"$check_mpi2_io" = "xyes"],
[
AC_CHECK_FUNC([MPI_File_open],
[AC_CHECK_FUNC([MPI_File_close], [have_mpi2_io="yes"])])
AS_IF([test x"$force_mpi2_io" = "xyes" -a x"$have_mpi2_io" = "xno"], [exit 1])
],
[
AS_IF([test x"$enable_config_titles" = "xyes"],
[
AS_IF([test x"$have_mpi2_io" = "xyes"],
[AC_MSG_NOTICE([enabled via command line switch])],
[AC_MSG_NOTICE([disabled via command line switch])])
])
])
CC=$sav_CC
CPPFLAGS=$sav_CPPFLAGS
LIBS=$sav_LIBS
])
dnl check for Fortran interoperability
AS_IF([test x"$check_fmpiwraplib" = "xyes" -a x"$mpi_error" = "xno"],
[
ACVT_CONF_SUBTITLE([Fortran interoperability])
AC_CHECK_PROGS(MPIF77, mpif77 hf77 mpxlf_r mpxlf mpf77 cmpifc mpif90 mpxlf95_r mpxlf90_r mpxlf95 mpxlf90 mpf90 cmpif90c)
AS_IF([test x"$MPIF77" != x],
[
mpif77=`echo $MPIF77 | cut -d ' ' -f 1`
which_mpif77=`which $mpif77 2>/dev/null`
AS_IF([test x"$which_mpif77" = x], [AC_MSG_ERROR([$mpif77 not found])])
mpi_bin_dir=`dirname $which_mpif77`
AS_IF([test "$mpi_bin_dir" != "/usr/bin"],
[
AS_IF([test x"$FMPIINCDIR" = x],
[FMPIINCDIR=-I`echo $mpi_bin_dir | sed -e 's/bin/include/'`])
])
],
[
AS_IF([test x"$F77" != x],
[
MPIF77="$F77"
AC_MSG_CHECKING([for mpif.h])
AS_IF([test x"$FMPIINCDIR" = x], [FMPIINCDIR="$MPIINCDIR"])
rm -f conftest.f conftest.o
cat > conftest.f << EOF
PROGRAM conftest
INCLUDE 'mpif.h'
END
EOF
eval "$F77 $FFLAGS $MPIFFLAGS $FMPIINCDIR -c conftest.f" >/dev/null 2>&1
AS_IF([test "$?" = "0" -a -s conftest.o], [AC_MSG_RESULT([yes])],
[
AC_MSG_RESULT([no])
AC_MSG_NOTICE([error: no mpif.h found; check path for MPI package first...])
fmpiwraplib_error="yes"
])
rm -f conftest.f conftest.o
],
[
AC_MSG_NOTICE([error: no Fortran 77 compiler command given!])
fmpiwraplib_error="yes"
])
])
AS_IF([test x"$check_fc_conv" = "xyes" -a x"$fmpiwraplib_error" = "xno"],
[
sav_CC=$CC
sav_CPPFLAGS=$CPPFLAGS
sav_LIBS=$LIBS
CC=$MPICC
CPPFLAGS="$CPPFLAGS $MPICFLAGS $MPIINCDIR"
LIBS="$LIBS $MPILIBDIR $MPILIB"
dnl check for handle conversion: MPI_Comm
AC_CHECK_FUNC([MPI_Comm_f2c],
[AC_CHECK_FUNC([MPI_Comm_c2f], [VT_MPIGEN_HAVE_FC_CONV_COMM=1])])
dnl check for handle conversion: MPI_Errhandler
AC_CHECK_FUNC([MPI_Errhandler_f2c],
[AC_CHECK_FUNC([MPI_Errhandler_c2f], [VT_MPIGEN_HAVE_FC_CONV_ERRH=1])])
dnl check for handle conversion: MPI_File
AC_CHECK_FUNC([MPI_File_f2c],
[AC_CHECK_FUNC([MPI_File_c2f], [VT_MPIGEN_HAVE_FC_CONV_FILE=1])])
dnl check for handle conversion: MPI_Group
AC_CHECK_FUNC([MPI_Group_f2c],
[AC_CHECK_FUNC([MPI_Group_c2f], [VT_MPIGEN_HAVE_FC_CONV_GROUP=1])])
dnl check for handle conversion: MPI_Info
AC_CHECK_FUNC([MPI_Info_f2c],
[AC_CHECK_FUNC([MPI_Info_c2f], [VT_MPIGEN_HAVE_FC_CONV_INFO=1])])
dnl check for handle conversion: MPI_Op
AC_CHECK_FUNC([MPI_Op_f2c],
[AC_CHECK_FUNC([MPI_Op_c2f], [VT_MPIGEN_HAVE_FC_CONV_OP=1])])
dnl check for handle conversion: MPI_Request
AC_CHECK_FUNC([MPI_Request_f2c],
[AC_CHECK_FUNC([MPI_Request_c2f], [VT_MPIGEN_HAVE_FC_CONV_REQUEST=1])])
dnl check for handle conversion: MPI_Status
AC_CHECK_FUNC([MPI_Status_f2c],
[AC_CHECK_FUNC([MPI_Status_c2f], [VT_MPIGEN_HAVE_FC_CONV_STATUS=1])])
dnl check for handle conversion: MPI_Datatype
AC_CHECK_FUNC([MPI_Type_f2c],
[AC_CHECK_FUNC([MPI_Type_c2f], [VT_MPIGEN_HAVE_FC_CONV_TYPE=1])])
dnl check for handle conversion: MPI_Win
AC_CHECK_FUNC([MPI_Win_f2c],
[AC_CHECK_FUNC([MPI_Win_c2f], [VT_MPIGEN_HAVE_FC_CONV_WIN=1])])
dnl check for MPI-2 constants
AC_CHECK_DECLS([MPI_IN_PLACE],
[VT_MPIGEN_HAVE_FC_CONV_MPI2CONST=1; have_mpi2_const="yes"], [], [#include "mpi.h"])
dnl check for MPI_STATUS_SIZE
AC_CHECK_DECLS([MPI_STATUS_SIZE], [have_mpi_status_size="yes"], [], [#include "mpi.h"])
CC=$sav_CC
CPPFLAGS=$sav_CPPFLAGS
LIBS=$sav_LIBS
])
AS_IF([test x"$fmpiwraplib_error" = "xno"],
[build_fmpiwraplib="yes"], [MPIF77="$F77"; FMPILIB=])
])
AS_IF([test x"$mpi_error" = "xno"], [have_mpi="yes"],
[MPICC="$CC"; MPICXX="$CXX"; MPIF77="$F77"])
AS_IF([test x"$FMPILIB" != x], [have_fmpi="yes"])
AS_IF([test x"$PMPILIB" = x"$MPILIB"], [PMPILIB=])
AS_IF([test x"$have_mpi2_thread" = "xyes"], [VT_MPIGEN_HAVE_MPI2_THREAD=1])
AS_IF([test x"$have_mpi2_1sided" = "xyes"], [VT_MPIGEN_HAVE_MPI2_1SIDED=1])
AS_IF([test x"$have_mpi2_extcoll" = "xyes"], [VT_MPIGEN_HAVE_MPI2_EXTCOLL=1])
AS_IF([test x"$have_mpi2_io" = "xyes"], [VT_MPIGEN_HAVE_MPI2_IO=1])
])
AS_IF([test x"$have_mpi" = "xyes"],
[AC_DEFINE([HAVE_MPI], [1], [Define to 1 if VT is configured with MPI support.])])
AS_IF([test x"$have_fmpi" = "xyes"],
[AC_DEFINE([HAVE_FMPI], [1], [Define to 1 if VT is configured with MPI Fortran support.])])
AS_IF([test x"$have_mpi2_thread" = "xyes"],
[AC_DEFINE([HAVE_MPI2_THREAD], [1], [Define to 1 if you have functions for MPI-2 Thread support.])])
AS_IF([test x"$have_mpi2_1sided" = "xyes"],
[AC_DEFINE([HAVE_MPI2_1SIDED], [1], [Define to 1 if you have functions for MPI-2 One-Sided Communications.])])
AS_IF([test x"$have_mpi2_extcoll" = "xyes"],
[AC_DEFINE([HAVE_MPI2_EXTCOLL], [1], [Define to 1 if you have functions for MPI-2 Extended Collective Operations.])])
AS_IF([test x"$have_mpi2_io" = "xyes"],
[AC_DEFINE([HAVE_MPI2_IO], [1], [Define to 1 if you have functions for MPI-2 I/O.])])
AC_SUBST(MPIDIR)
AC_SUBST(MPIINCDIR)
AC_SUBST(FMPIINCDIR)
AC_SUBST(MPILIBDIR)
AC_SUBST(MPILIB)
AC_SUBST(PMPILIB)
AC_SUBST(FMPILIB)
AC_SUBST(VT_MPIGEN_HAVE_MPI2_THREAD)
AC_SUBST(VT_MPIGEN_HAVE_MPI2_1SIDED)
AC_SUBST(VT_MPIGEN_HAVE_MPI2_EXTCOLL)
AC_SUBST(VT_MPIGEN_HAVE_MPI2_IO)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_COMM)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_ERRH)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_FILE)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_GROUP)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_INFO)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_OP)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_REQUEST)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_STATUS)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_TYPE)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_WIN)
AC_SUBST(VT_MPIGEN_HAVE_FC_CONV_MPI2CONST)
])

Просмотреть файл

@ -0,0 +1,31 @@
AC_DEFUN([ACVT_OMP],
[
omp_error="no"
build_opari="no"
have_omp="no"
VTPOMPLIB=
AC_ARG_VAR(OPENMP_CFLAGS, [C compiler flags to enable support for OpenMP])
AX_OPENMP([], [omp_error="yes"])
AS_IF([test x"$omp_error" = "xno"],
[
sav_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $OPENMP_CFLAGS"
AC_CHECK_HEADER([omp.h], [], [omp_error="yes"])
CFLAGS=$sav_CFLAGS
])
AS_IF([test x"$omp_error" = "xno"],
[
VTPOMPLIB="-lvt-pomp"
build_opari="yes"
have_omp="yes"
AC_DEFINE([HAVE_OMP], [1], [Define to 1 if VT is configured with OpenMP support.])
])
AC_SUBST(VTPOMPLIB)
])

138
ompi/contrib/vt/vt/config/m4/acinclude.otf.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,138 @@
AC_DEFUN([ACVT_OTF],
[
otf_error="no"
OTFDIR=
OTFINCDIR=
OTFLIBDIR=
AC_REQUIRE([ACVT_ZLIB])
AC_ARG_WITH(extern-otf,
AC_HELP_STRING([--with-extern-otf], [use external OTF library, default: not set]),
[use_extern_otf="yes"], [use_extern_otf="no"])
AC_ARG_WITH(extern-otf-dir,
AC_HELP_STRING([--with-extern-otf-dir=OTFDIR], [give the path for OTF, default: /usr]),
[OTFDIR="$withval/"])
AC_ARG_WITH(extern-otf-inc-dir,
AC_HELP_STRING([--with-extern-otf-inc-dir=OTFINCDIR],
[give the path for OTF-include files, default: OTFDIR/include]),
[OTFINCDIR="-I$withval/"],
[AS_IF([test x"$OTFDIR" != x], [OTFINCDIR="-I$OTFDIR"include/])])
AC_ARG_WITH(extern-otf-lib-dir,
AC_HELP_STRING([--with-extern-otf-lib-dir=OTFLIBDIR],
[give the path for OTF-libraries, default: OTFDIR/lib]),
[OTFLIBDIR="-L$withval/"],
[AS_IF([test x"$OTFDIR" != x], [OTFLIBDIR="-L$OTFDIR"lib/])])
AC_ARG_WITH(otf-lib,
AC_HELP_STRING([--with-otf-lib=OTFLIB], [use given otf lib, default: -lotf -lz]),
[OTFLIB="$withval"])
AC_ARG_WITH(otf-flags,
AC_HELP_STRING([--with-otf-flags=FLAGS], [pass FLAGS to the OTF distribution configuration script]), [OTFFLAGS="$withval"])
AS_IF([test "$use_extern_otf" = "yes"],
[
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $OTFINCDIR"
AC_CHECK_HEADER([otf.h], [],
[
AC_MSG_NOTICE([error: no otf.h found; check path for OTF package first...])
otf_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
AS_IF([test x"$OTFLIB" = x -a "$otf_error" = "no"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $OTFLIBDIR -lotf $ZLIBLIBDIR $ZLIBLIB"
AC_MSG_CHECKING([whether linking with -lotf $ZLIBLIBDIR $ZLIBLIB works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); OTFLIB="-lotf $ZLIBLIBDIR $ZLIBLIB"],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$OTFLIB" = x -a "$otf_error" = "no"],
[
AC_MSG_NOTICE([error: no libotf found; check path for OTF package first...])
otf_error="yes"
])
],
[
otf_parent_dir=`pwd`
otf_dir="extlib/otf"
AC_MSG_NOTICE([configuring in $otf_dir ($otf_parent_dir/$otf_dir)])
AS_IF([test "$srcdir" != "."],
[
test -d "$otf_dir" ||
mkdir -p "$otf_dir" ||
AC_MSG_ERROR([cannot create $otf_dir])
])
cd $otf_dir
case $srcdir in
.)
otf_srcdir="$srcdir"
;;
/*)
otf_srcdir="$srcdir/$otf_dir"
;;
*)
otf_srcdir="../../$srcdir/$otf_dir"
;;
esac
otf_conf_cmd="$otf_srcdir/configure"
otf_conf_args="--enable-static=$enable_static --enable-shared=$enable_shared"
AS_IF([test x"$enable_binaries" != "xyes"],
[
otf_conf_args="$otf_conf_args --disable-binaries"
])
AS_IF([test x"$cross_compiling" = "xyes"],
[
AS_IF([test ! -z $build], [otf_conf_args="$otf_conf_args --build=$build"])
AS_IF([test ! -z $host], [otf_conf_args="$otf_conf_args --host=$host"])
])
AS_IF([test x"$have_zlib" = "xyes"],
[
AS_IF([test x"$force_zlib" = "xyes"],
[otf_conf_args="$otf_conf_args --with-zlib"])
AS_IF([test x"$zlib_dir_withval" != x],
[otf_conf_args="$otf_conf_args --with-zlib-dir=$zlib_dir_withval"])
AS_IF([test x"$zlib_incdir_withval" != x],
[otf_conf_args="$otf_conf_args --with-zlib-inc-dir=$zlib_incdir_withval"])
AS_IF([test x"$zlib_libdir_withval" != x],
[otf_conf_args="$otf_conf_args --with-zlib-lib-dir=$zlib_libdir_withval"])
AS_IF([test x"$ZLIBLIB" != x],
[otf_conf_args="$otf_conf_args --with-zlib-lib=$ZLIBLIB"])
],
[
otf_conf_args="$otf_conf_args --without-zlib"
])
otf_conf_args="$otf_conf_args --prefix=\"$prefix\" --exec-prefix=\"$exec_prefix\" --bindir=\"$bindir\" --libdir=\"$libdir\" --includedir=\"$includedir\" --docdir=\"$docdir/otf\" $OTFFLAGS --cache-file=\"/dev/null\" --srcdir=\"$otf_srcdir\""
AC_MSG_NOTICE([running $SHELL $otf_conf_cmd $otf_conf_args])
eval "$SHELL '$otf_conf_cmd' $otf_conf_args"
AS_IF([test $? != "0"], [AC_MSG_ERROR([$otf_conf_cmd failed for $otf_dir])])
cd $otf_parent_dir
OTFINCDIR=
OTFLIBDIR=
AS_IF([test x"$OTFLIB" = x], [OTFLIB="-lotf $ZLIBLIBDIR $ZLIBLIB"])
])
AC_SUBST(OTFDIR)
AC_SUBST(OTFINCDIR)
AC_SUBST(OTFLIBDIR)
AC_SUBST(OTFLIB)
])

Просмотреть файл

@ -0,0 +1,109 @@
AC_DEFUN([ACVT_PAPI],
[
papi_error="no"
have_papi="no"
PAPIDIR=
PAPIINCDIR=
PAPILIBDIR=
PAPILIB=
AC_ARG_WITH(papi-dir,
AC_HELP_STRING([--with-papi-dir=PAPIDIR],
[give the path for PAPI, default: /usr]),
[PAPIDIR="$withval/"])
AC_ARG_WITH(papi-inc-dir,
AC_HELP_STRING([--with-papi-inc-dir=PAPIINCDIR],
[give the path for PAPI-include files, default: PAPIDIR/include]),
[PAPIINCDIR="-I$withval/"],
[AS_IF([test x"$PAPIDIR" != x], [PAPIINCDIR="-I$PAPIDIR"include/])])
AC_ARG_WITH(papi-lib-dir,
AC_HELP_STRING([--with-papi-lib-dir=PAPILIBDIR],
[give the path for PAPI-libraries, default: PAPIDIR/lib]),
[PAPILIBDIR="-L$withval/"],
[AS_IF([test x"$PAPIDIR" != x], [PAPILIBDIR="-L$PAPIDIR"lib/])])
AC_ARG_WITH(papi-lib,
AC_HELP_STRING([--with-papi-lib=PAPILIB], [use given papi lib, default: -lpapi]),
[PAPILIB="$withval"])
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PAPIINCDIR"
AC_CHECK_HEADER([papi.h], [],
[
AC_MSG_NOTICE([error: no papi.h found; check path for PAPI package first...])
papi_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
AS_IF([test x"$PAPILIB" = x -a x"$papi_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $PAPILIBDIR -lpapi"
AC_MSG_CHECKING([whether linking with -lpapi works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); PAPILIB=-lpapi],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$PAPILIB" = x -a x"$papi_error" = "xno"],
[
AC_MSG_NOTICE([error: no libpapi found; check path for PAPI package first...])
papi_error="yes"
])
AS_IF([test x"$papi_error" = "xno"],
[
AC_MSG_CHECKING([whether PAPI version = 3.x])
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PAPIINCDIR"
AC_TRY_COMPILE([#include <papi.h>],
[
#ifndef PAPI_VERSION
# error "PAPI_VERSION not defined; version < 3.x"
#elif PAPI_VERSION_MAJOR(PAPI_VERSION) != 3
# error "PAPI_VERSION_MAJOR != 3"
#endif
],
[AC_MSG_RESULT([yes])],
[
AC_MSG_RESULT([no])
AC_MSG_NOTICE([error: PAPI version could not be determined and/or is incompatible (!= 3.x)
See \`config.log' for more details.])
papi_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
])
AS_IF([test x"$papi_error" = "xno"],
[
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PAPIINCDIR"
AC_CHECK_DECLS([long_long], [], [], [#include <papi.h>])
CPPFLAGS=$sav_CPPFLAGS
])
AS_IF([test x"$PAPILIB" != x -a x"$papi_error" = "xno"],
[
AC_DEFINE([TIMER_PAPI_REAL_CYC], [10], [PAPI_get_real_cyc])
AC_DEFINE([TIMER_PAPI_REAL_USEC], [11], [PAPI_get_real_usec])
AS_IF([test x"$pform_timer" = "xTIMER_GETTIMEOFDAY"],
[
pform_timer=TIMER_PAPI_REAL_CYC
AC_DEFINE_UNQUOTED([TIMER], [$pform_timer], [Use timer (see below)])
AC_MSG_NOTICE([reselected timer: $pform_timer])
AC_DEFINE([TIMER_IS_GLOBAL], [0],
[Define to 1 if the selected timer is global (doesn't need synchronization)])
AC_MSG_NOTICE([global timer: no])
])
have_papi="yes"
])
AC_SUBST(PAPIINCDIR)
AC_SUBST(PAPILIBDIR)
AC_SUBST(PAPILIB)
])

Просмотреть файл

@ -0,0 +1,85 @@
AC_DEFUN([ACVT_PLATFORM],
[
PLATFORM=
BITMODE=
AC_CANONICAL_HOST
AC_MSG_CHECKING([for platform])
AC_ARG_WITH(platform,
AC_HELP_STRING([--with-platform=PLATFORM],
[configure for given platform (altix,bgl,bgp,crayt3e,crayx1,crayxt,ibm,linux,macos,necsx,origin,sicortex,sun,generic), default: automatically by configure]),
[
AC_MSG_RESULT([skipped (--with-platform=$withval)])
pform_list="altix bgl bgp crayt3e crayx1 crayxt ibm linux macos necsx origin sicortex sun generic"
pform_found="no"
for p in $pform_list
do
AS_IF([test x"$withval" = x"$p"],
[pform_found="yes"; break])
done
AS_IF([test x"$pform_found" = "xno"],
[AC_MSG_ERROR([value of '--with-platform' not properly set])],
[PLATFORM=$withval])
],
[
case $host_os in
linux*)
AS_IF([test "$host_cpu" = "ia64" -a -f /etc/sgi-release],
[PLATFORM=altix],
[AS_IF([test "$host_cpu" = "powerpc64" -a -d /bgl/BlueLight],
[PLATFORM=bgl],
[AS_IF([test "$host_cpu" = "powerpc64" -a -d /bgsys],
[PLATFORM=bgp],
[AS_IF([test "$host_cpu" = "x86_64" -a -d /opt/xt-boot],
[PLATFORM=crayxt],
[AS_IF([test "$host_cpu" = "mips64" -a -d /opt/sicortex],
[PLATFORM=sicortex],
[PLATFORM=linux])])])])])
;;
sunos* | solaris*)
PLATFORM=sun
;;
darwin*)
PLATFORM=macos
;;
irix*)
AS_IF([test "$host_cpu" = "mips"], [PLATFORM="origin"])
;;
aix*)
PLATFORM=ibm
;;
unicosmp*)
PLATFORM=crayx1
;;
superux*)
PLATFORM=necsx
;;
esac
AS_IF([test x"$PLATFORM" = x],
[
AC_MSG_WARN([unknown platform '$host'! using generic configuration])
PLATFORM=generic
],
[
AC_MSG_RESULT([$PLATFORM])
])
])
AC_ARG_WITH(bitmode,
AC_HELP_STRING([--with-bitmode=<32|64>],
[specify bit mode]),
[
AS_IF([test x"$withval" != "x32" -a x"$withval" != "x64"],
[AC_MSG_ERROR([value of '--with-bitmode' not properly set])])
BITMODE=$withval
])
AC_SUBST(PLATFORM)
AC_SUBST(BITMODE)
])

Просмотреть файл

@ -0,0 +1,25 @@
AC_DEFUN([ACVT_PTHREAD],
[
pthread_error="no"
have_pthread="no"
AC_ARG_VAR(PTHREAD_CFLAGS, [C compiler flags to enable support for POSIX threads])
AC_ARG_VAR(PTHREAD_LIBS, [POSIX threads libraries])
ACX_PTHREAD([], [pthread_error="yes"])
AS_IF([test x"$pthread_error" = "xno"],
[
sav_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AC_CHECK_HEADER([pthread.h], [], [pthread_error="yes"])
CFLAGS=$sav_CFLAGS
])
AS_IF([test x"$pthread_error" = "xno"],
[
have_pthread="yes"
AC_DEFINE([HAVE_PTHREAD], [1], [Define to 1 if VT is configured with Pthreads support.])
])
])

Просмотреть файл

@ -0,0 +1,28 @@
AC_DEFUN([ACVT_RUSAGE],
[
rusage_error="no"
check_rusage="yes"
force_rusage="no"
have_rusage="no"
AC_ARG_ENABLE(rutrace,
AC_HELP_STRING([--enable-rutrace], [enable resource usage tracing support, default: enable if found by configure]),
[AS_IF([test x"$enableval" = "xyes"], [force_rusage="yes"], [check_rusage="no"])])
AS_IF([test x"$check_rusage" = "xyes"],
[
AC_CHECK_HEADER([sys/resource.h], [],
[
AC_MSG_NOTICE([error: no sys/resource.h found])
rusage_error="yes"
])
AS_IF([test x"$rusage_error" = "xno"],
[
AC_CHECK_FUNC([getrusage], [], [rusage_error="yes"])
])
AS_IF([test x"$rusage_error" = "xno"], [have_rusage="yes"])
])
])

Просмотреть файл

@ -0,0 +1,54 @@
AC_DEFUN([ACVT_THREADS],
[
threads_error="no"
check_threads="pthread omp"
force_threads="no"
force_threads_list=
have_threads="no"
AC_ARG_ENABLE(threads,
AC_HELP_STRING([--enable-threads=LIST],
[enable support for threads (pthread, omp), default: automatically by configure]),
[
AS_IF([test x"$enableval" = "xno"], [check_threads="no"])
AS_IF([test x"$enableval" = "xyes"], [force_threads="yes"])
AS_IF([test x"$enableval" != "xyes" -a x"$enableval" != "xno"],
[
check_threads="`echo $enableval | sed -e 's/,/ /g'`"
force_threads_list="$check_threads"
force_threads="yes"
])
])
AS_IF([test x"$check_threads" != "xno"],
[
for ct in $check_threads
do
case $ct in
pthread)
ACVT_CONF_SUBSUBTITLE([POSIX threads])
ACVT_PTHREAD
AS_IF([test x"$force_threads_list" != x -a x"$pthread_error" = "xyes"],
[threads_error="yes"; break],
[AS_IF([test x"$have_pthread" = "xyes"], [have_threads="yes"])])
;;
omp)
ACVT_CONF_SUBSUBTITLE([OpenMP])
ACVT_OMP
AS_IF([test x"$force_threads_list" != x -a x"$omp_error" = "xyes"],
[threads_error="yes"; break],
[AS_IF([test x"$have_omp" = "xyes"], [have_threads="yes"])])
;;
*)
AC_MSG_ERROR([unknown thread type '$ct'])
;;
esac
done
AS_IF([test x"$have_threads" = "xno"], [threads_error="yes"])
])
AS_IF([test x"$have_threads" = "xyes"],
[AC_DEFINE([HAVE_THREADS], [1], [Define to 1 if VT is configured with Threads support.])])
])

Просмотреть файл

@ -0,0 +1,140 @@
AC_DEFUN([ACVT_TIMER],
[
timer=
AC_REQUIRE([ACVT_PLATFORM])
case $PLATFORM in
linux)
AC_DEFINE([TIMER_CLOCK_GETTIME], [1], [Use `clock_gettime' function])
AC_DEFINE([TIMER_GETTIMEOFDAY], [2], [Use `gettimeofday' function])
timer=TIMER_GETTIMEOFDAY
case $host_cpu in
i*86 | x86* | powerpc*)
AC_DEFINE([TIMER_CYCLE_COUNTER], [3], [Cycle counter (e.g. TSC)])
timer=TIMER_CYCLE_COUNTER
;;
ia64)
AC_CHECK_HEADERS([asm/intrinsics.h],
[
AC_MSG_CHECKING([for __getReg(_IA64_REG_AR_ITC)])
AC_TRY_LINK([#include <asm/intrinsics.h>],
[
volatile long long r = (long long)__getReg(_IA64_REG_AR_ITC);
],
[
AC_MSG_RESULT([yes])
AC_DEFINE([TIMER_CYCLE_COUNTER], [3], [Cycle counter (e.g. ITC)])
timer=TIMER_CYCLE_COUNTER
], [AC_MSG_RESULT([no])])
])
;;
esac
;;
macos)
AC_DEFINE([TIMER_CYCLE_COUNTER], [1], [Cycle counter (e.g. TSC)])
AC_DEFINE([TIMER_GETTIMEOFDAY], [2], [Use `gettimeofday' function])
timer=TIMER_CYCLE_COUNTER
;;
altix)
AC_DEFINE([TIMER_CLOCK_GETTIME], [1], [Use `clock_gettime' function])
timer=TIMER_CLOCK_GETTIME
mmtimer_h_found=no
AC_CHECK_HEADERS([linux/mmtimer.h], [mmtimer_h_found=yes],
[AC_CHECK_HEADERS([sn/mmtimer.h], [mmtimer_h_found=yes],
[AC_CHECK_HEADERS([mmtimer.h], [mmtimer_h_found=yes])])])
AS_IF([test x"$mmtimer_h_found" = "xyes"],
[
AC_CHECK_FILE([/dev/mmtimer],
[
AC_DEFINE([TIMER_MMTIMER], [2], [Intel Multimedia Timer])
timer=TIMER_MMTIMER
])
])
;;
bgl)
AC_DEFINE([TIMER_RTS_GET_TIMEBASE], [1], [Use `rts_get_timebase' function])
timer=TIMER_RTS_GET_TIMEBASE
;;
bgp)
CPPFLAGS="$CPPFLAGS -I/bgsys/drivers/ppcfloor/arch/include"
AC_DEFINE([TIMER_BGP_GET_TIMEBASE], [1], [Use `_bgp_GetTimeBase' function])
timer=TIMER_BGP_GET_TIMEBASE
;;
ibm)
AC_DEFINE([TIMER_POWER_REALTIME], [1], [IBM Power family Real-Time-Clock])
AC_DEFINE([TIMER_SWITCH_CLOCK], [2], [Hardware Switch-Clock (it's necessary to link your application with '-lswclock')])
timer=TIMER_POWER_REALTIME
;;
sun)
AC_DEFINE([TIMER_GETHRTIME], [1], [gethrtime])
timer=TIMER_GETHRTIME
;;
necsx)
AC_DEFINE([TIMER_SYSSX_HGTIME], [1], [NEC SX HGTIME])
timer=TIMER_SYSSX_HGTIME
;;
crayt3e)
AC_DEFINE([TIMER_CRAY_RTCLOCK],[1], [CRAY Real-Time-Clock])
timer=TIMER_CRAY_RTCLOCK
;;
crayx1)
AC_DEFINE([TIMER_GETTIMEOFDAY], [1], [Use `gettimeofday' function])
AC_DEFINE([TIMER_RTC], [2], [RTC (DOES NOT WORK YET WITH FORTRAN CODES)])
timer=TIMER_GETTIMEOFDAY
;;
crayxt)
AC_DEFINE([TIMER_CLOCK_GETTIME], [1], [Use `clock_gettime' function])
AC_DEFINE([TIMER_CYCLE_COUNTER], [2], [Cycle counter (e.g. TSC)])
AC_DEFINE([TIMER_GETTIMEOFDAY], [3], [Use `gettimeofday' function])
timer=TIMER_CYCLE_COUNTER
AS_IF([test x`basename $CC` = "xcraycc"],
[timer=TIMER_GETTIMEOFDAY])
AC_TRY_COMPILE([],
[
#ifndef __LIBCATAMOUNT__
# error "__LIBCATAMOUNT__ not defined"
#endif
],
[AC_CHECK_HEADERS([catamount/dclock.h],
[AC_CHECK_HEADERS([catamount/data.h],
[
AC_DEFINE([TIMER_DCLOCK], [4], [Use `dclock' function])
timer=TIMER_DCLOCK
])])])
;;
origin)
AC_DEFINE([TIMER_CLOCK_GETTIME], [1], [Use `clock_gettime' function])
timer=TIMER_CLOCK_GETTIME
;;
sicortex)
AC_DEFINE([TIMER_GETTIMEOFDAY], [1], [Use `gettimeofday' function])
timer=TIMER_GETTIMEOFDAY
;;
generic)
AC_DEFINE([TIMER_GETTIMEOFDAY], [1], [Use `gettimeofday' function])
timer=TIMER_GETTIMEOFDAY
;;
esac
AC_DEFINE_UNQUOTED([TIMER], [$timer], [Use timer (see below)])
AC_MSG_NOTICE([selected timer: $timer])
case $timer in
TIMER_BGP_GET_TIMEBASE | TIMER_BGP_GET_TIMEBASE | TIMER_GETTIMEOFDAY)
timer_is_global=yes
timer_is_global_def=1
;;
*)
timer_is_global=no
timer_is_global_def=0
;;
esac
AC_DEFINE_UNQUOTED([TIMER_IS_GLOBAL], [$timer_is_global_def],
[Define to 1 if the selected timer is global (doesn't need synchronization)])
AC_MSG_NOTICE([global timer: $timer_is_global])
])

Просмотреть файл

@ -0,0 +1,242 @@
AC_DEFUN([ACVT_UNIMCI],
[
unimci_error="no"
check_unimci="yes"
force_unimci="no"
have_unimci="no"
unimci_config_cmd=
unimci_checker_name=
unimci_checker_version=
unimci_cc=
unimci_cxx=
unimci_f77=
unimci_f90=
UNIMCI_CFLAGS=
UNIMCI_CLIBS=
UNIMCI_CXXFLAGS=
UNIMCI_CXXLIBS=
UNIMCI_FFLAGS=
UNIMCI_FLIBS=
UNIMCI_FCFLAGS=
UNIMCI_FCLIBS=
UNIMCI_LDFLAGS=
AC_ARG_ENABLE(mpicheck,
AC_HELP_STRING([--enable-mpicheck],
[enable support for Universal MPI Correctness Interface (UniMCI), default: enable if unimci-config found by configure]),
[AS_IF([test x"$enableval" = "xyes"], [force_unimci="yes"], [check_unimci="no"])])
AC_ARG_WITH(unimci-config,
AC_HELP_STRING([--with-unimci-config=UNIMCICONFIG],
[give the command for UniMCI config utility, default: automatically by configure]),
[
AS_IF([test x"$withval" = "xyes" -o x"$withval" = "xno"],
[AC_MSG_ERROR([value of '--with-unimci-config' not properly set!])])
unimci_config_cmd=$withval
])
AS_IF([test x"$check_unimci" = "xyes"],
[
AC_CHECK_PROG(unimci_config_cmd, unimci-config, unimci-config)
AS_IF([test x"$unimci_config_cmd" = x],
[
AC_MSG_NOTICE([error: no unimci-config found; check path for UniMCI package first...])
unimci_error="yes"
])
dnl check for version
AS_IF([test x"$unimci_error" = "xno"],
[
AC_MSG_CHECKING([for UniMCI's version])
unimci_version=`eval "$unimci_config_cmd --version"`
AS_IF([test "$?" = "0"],
[
AC_MSG_RESULT([$unimci_version])
unimci_major_version=`echo $unimci_version | cut -d '.' -f 1`
AS_IF([test $unimci_major_version -ne 1],
[
AC_MSG_NOTICE([error: the version of UniMCI isn't supported!])
unimci_error="yes"
])
],
[
unimci_error="yes"
])
])
dnl check for UniMCI's checker name
AS_IF([test x"$unimci_error" = "xno"],
[
AC_MSG_CHECKING([for UniMCI's checker name])
unimci_checker_name=`eval "$unimci_config_cmd --checker-name"`
AS_IF([test "$?" = "0"],
[AC_MSG_RESULT([$unimci_checker_name])], [unimci_error="yes"])
])
dnl check for UniMCI's checker version
AS_IF([test x"$unimci_error" = "xno"],
[
AC_MSG_CHECKING([for UniMCI's checker version])
unimci_checker_version=`eval "$unimci_config_cmd --checker-version"`
AS_IF([test "$?" = "0"],
[AC_MSG_RESULT([$unimci_checker_version])], [unimci_error="yes"])
])
dnl check for C support
AS_IF([test x"$unimci_error" = "xno"],
[
AC_MSG_CHECKING([whether UniMCI's checker supports C])
unimci_cc=`eval "$unimci_config_cmd --cc"`
AS_IF([test "$?" = "0"],
[
AS_IF([test x"$unimci_cc" != x],
[
AC_MSG_RESULT([yes])
dnl check for C compiler flags and libs
AC_MSG_CHECKING([for UniMCI's C compiler flags])
UNIMCI_CFLAGS=`eval "$unimci_config_cmd --cflags"`
AS_IF([test "$?" = "0"],
[
AC_MSG_RESULT([$UNIMCI_CFLAGS])
AC_MSG_CHECKING([for UniMCI's C libs])
UNIMCI_CLIBS=`eval "$unimci_config_cmd --clib-dirs --clibs"`
AS_IF([test "$?" = "0"],
[AC_MSG_RESULT([$UNIMCI_CLIBS])], [unimci_error="yes"])
], [unimci_error="yes"])
], [AC_MSG_RESULT([no])])
], [unimci_error="yes"])
])
dnl check for C++ support
AS_IF([test x"$unimci_error" = "xno"],
[
AC_MSG_CHECKING([whether UniMCI's checker supports C++])
unimci_cxx=`eval "$unimci_config_cmd --cxx"`
AS_IF([test "$?" = "0"],
[
AS_IF([test x"$unimci_cxx" != x],
[
AC_MSG_RESULT([yes])
dnl check for C++ compiler flags and libs
AC_MSG_CHECKING([for UniMCI's C++ compiler flags])
UNIMCI_CXXFLAGS=`eval "$unimci_config_cmd --cxxflags"`
AS_IF([test "$?" = "0"],
[
AC_MSG_RESULT([$UNIMCI_CXXFLAGS])
AC_MSG_CHECKING([for UniMCI's C++ libs])
UNIMCI_CXXLIBS=`eval "$unimci_config_cmd --cxxlib-dirs --cxxlibs"`
AS_IF([test "$?" = "0"],
[AC_MSG_RESULT([$UNIMCI_CXXLIBS])], [unimci_error="yes"])
], [unimci_error="yes"])
], [AC_MSG_RESULT([no])])
], [unimci_error="yes"])
])
dnl check for Fortran 77 support
AS_IF([test x"$unimci_error" = "xno" -a x"$F77" != x],
[
AC_MSG_CHECKING([whether UniMCI's checker supports Fortran 77])
unimci_f77=`eval "$unimci_config_cmd --f77"`
AS_IF([test "$?" = "0"],
[
AS_IF([test x"$unimci_f77" != x],
[
AC_MSG_RESULT([yes])
dnl check for Fortran 77 compiler flags and libs
AC_MSG_CHECKING([for UniMCI's Fortran 77 compiler flags])
UNIMCI_FFLAGS=`eval "$unimci_config_cmd --f77flags"`
AS_IF([test "$?" = "0"],
[
AC_MSG_RESULT([$UNIMCI_FFLAGS])
AC_MSG_CHECKING([for UniMCI's Fortran 77 libs])
UNIMCI_FLIBS=`eval "$unimci_config_cmd --f77lib-dirs --f77libs"`
AS_IF([test "$?" = "0"],
[AC_MSG_RESULT([$UNIMCI_FLIBS])], [unimci_error="yes"])
], [unimci_error="yes"])
], [AC_MSG_RESULT([no])])
], [unimci_error="yes"])
])
dnl check for Fortran 90 support
AS_IF([test x"$unimci_error" = "xno" -a x"$FC" != x],
[
AC_MSG_CHECKING([whether UniMCI's checker supports Fortran 90])
unimci_f90=`eval "$unimci_config_cmd --f90"`
AS_IF([test "$?" = "0"],
[
AS_IF([test x"$unimci_f90" != x],
[
AC_MSG_RESULT([yes])
dnl check for Fortran 90 compiler flags and libs
AC_MSG_CHECKING([for UniMCI's Fortran 90 compiler flags])
UNIMCI_FCFLAGS=`eval "$unimci_config_cmd --f90flags"`
AS_IF([test "$?" = "0"],
[
AC_MSG_RESULT([$UNIMCI_FCFLAGS])
AC_MSG_CHECKING([for UniMCI's Fortran 90 libs])
UNIMCI_FCLIBS=`eval "$unimci_config_cmd --f90lib-dirs --f90libs"`
AS_IF([test "$?" = "0"],
[AC_MSG_RESULT([$UNIMCI_FCLIBS])], [unimci_error="yes"])
], [unimci_error="yes"])
], [AC_MSG_RESULT([no])])
], [unimci_error="yes"])
])
AS_IF([test x"$unimci_cc" = x -a x"$unimci_cxx" = x -a x"$unimci_f77" = x -a x"$unimci_f90" = x],
[unimci_error="yes"])
dnl check for linker flags
AS_IF([test x"$unimci_error" = "xno"],
[
AC_MSG_CHECKING([for UniMCI's linker flags])
UNIMCI_LDFLAGS=`eval "$unimci_config_cmd --ldflags"`
AS_IF([test "$?" = "0"],
[
AC_MSG_RESULT([$UNIMCI_LDFLAGS])
have_unimci="yes"
],
[
unimci_error="yes"
])
])
AS_IF([test x"$unimci_error" = "xno"],
[
AC_DEFINE_UNQUOTED([UNIMCI_CHECKER_NAME],
["$unimci_checker_name"], [UniMCI's checker name])
AC_DEFINE_UNQUOTED([UNIMCI_CHECKER_VERSION],
["$unimci_checker_version"], [UniMCI's checker version])
have_unimci="yes"
])
])
AC_SUBST(UNIMCI_CFLAGS)
AC_SUBST(UNIMCI_CLIBS)
AC_SUBST(UNIMCI_CXXFLAGS)
AC_SUBST(UNIMCI_CXXLIBS)
AC_SUBST(UNIMCI_FFLAGS)
AC_SUBST(UNIMCI_FLIBS)
AC_SUBST(UNIMCI_FCFLAGS)
AC_SUBST(UNIMCI_FCLIBS)
AC_SUBST(UNIMCI_LDFLAGS)
])

Просмотреть файл

@ -0,0 +1,79 @@
AC_DEFUN([ACVT_ZLIB],
[
zlib_error="no"
check_zlib="yes"
force_zlib="no"
have_zlib="no"
zlib_dir_withval=
zlib_incdir_withval=
zlib_libdir_withval=
ZLIBDIR=
ZLIBINCDIR=
ZLIBLIBDIR=
ZLIBLIB=
AC_ARG_ENABLE(zlib,
AC_HELP_STRING([--enable-zlib],
[enable ZLIB trace compression support, default: enable if found by configure]),
[AS_IF([test x"$enableval" = "xyes"], [force_zlib="yes"], [check_zlib="no"])])
AC_ARG_WITH(zlib-dir,
AC_HELP_STRING([--with-zlib-dir=ZLIBDIR], [give the path for ZLIB, default: /usr]),
[zlib_dir_withval=$withval; ZLIBDIR="$withval/"])
AC_ARG_WITH(zlib-inc-dir,
AC_HELP_STRING([--with-zlib-inc-dir=ZLIBINCDIR],
[give the path for ZLIB-include files, default: ZLIB/include]),
[zlib_incdir_withval=$withval; ZLIBINCDIR="-I$withval/"],
[AS_IF([test x"$ZLIBDIR" != x], [ZLIBINCDIR="-I$ZLIBDIR"include/])])
AC_ARG_WITH(zlib-lib-dir,
AC_HELP_STRING([--with-zlib-lib-dir=ZLIBLIBDIR],
[give the path for ZLIB-libraries, default: ZLIBDIR/lib]),
[zlib_libdir_withval=$withval; ZLIBLIBDIR="-L$withval/"],
[AS_IF([test x"$ZLIBDIR" != x], [ZLIBLIBDIR="-L$ZLIBDIR"lib/])])
AC_ARG_WITH(zlib-lib,
AC_HELP_STRING([--with-zlib-lib=ZLIBLIB], [use given zlib lib, default: -lz]),
[ZLIBLIB="$withval"])
AS_IF([test x"$check_zlib" = "xyes"],
[
sav_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $ZLIBINCDIR"
AC_CHECK_HEADER([zlib.h], [],
[
AC_MSG_NOTICE([error: no zlib.h found; check path for ZLIB package first...])
zlib_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
AS_IF([test x"$ZLIBLIB" = x -a x"$zlib_error" = "xno"],
[
sav_LIBS=$LIBS
LIBS="$LIBS $ZLIBLIBDIR -lz"
AC_MSG_CHECKING([whether linking with -lz works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); ZLIBLIB=-lz],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
])
AS_IF([test x"$ZLIBLIB" = x -a x"$zlib_error" = "xno"],
[
AC_MSG_NOTICE([error: no libz found; check path for ZLIB package first...])
zlib_error="yes"
])
AS_IF([test x"$ZLIBLIB" != x -a x"$zlib_error" = "xno"],
[have_zlib="yes"])
AS_IF([test x"$force_zlib" = "xyes" -a x"$zlib_error" = "xyes"],
[exit 1])
])
AC_SUBST(ZLIBINCDIR)
AC_SUBST(ZLIBLIBDIR)
AC_SUBST(ZLIBLIB)
])

Просмотреть файл

@ -0,0 +1,141 @@
# This file lists all calls, which should not be generated
# automatically by mk_c_wrapper.sh
MPI_Initialized
MPI_Pcontrol
MPI_Wtick
MPI_Wtime
MPI_Comm_call_errhandler
MPI_Comm_create_errhandler
MPI_Comm_get_errhandler
MPI_Comm_set_errhandler
MPI_File_call_errhandler
MPI_File_create_errhandler
MPI_File_get_errhandler
MPI_File_set_errhandler
MPI_Win_call_errhandler
MPI_Win_create_errhandler
MPI_Win_get_errhandler
MPI_Win_set_errhandler
# implemented MPI functions
MPI_Allgather
MPI_Allgatherv
MPI_Allreduce
MPI_Alltoall
MPI_Alltoallv
MPI_Alltoallw
MPI_Barrier
MPI_Bcast
MPI_Bsend
MPI_Bsend_init
MPI_Cancel
MPI_Cart_create
MPI_Cart_sub
MPI_Comm_create
MPI_Comm_dup
MPI_Comm_free
MPI_Comm_split
MPI_Exscan
MPI_Gather
MPI_Gatherv
MPI_Graph_create
MPI_Ibsend
MPI_Init
MPI_Init_thread
MPI_Intercomm_create
MPI_Intercomm_merge
MPI_Irecv
MPI_Irsend
MPI_Isend
MPI_Issend
MPI_Finalize
MPI_Recv
MPI_Recv_init
MPI_Reduce
MPI_Reduce_scatter
MPI_Request_free
MPI_Rsend
MPI_Rsend_init
MPI_Scan
MPI_Scatter
MPI_Scatterv
MPI_Send
MPI_Send_init
MPI_Sendrecv
MPI_Sendrecv_replace
MPI_Ssend
MPI_Ssend_init
MPI_Start
MPI_Startall
MPI_Test
MPI_Testall
MPI_Testany
MPI_Testsome
MPI_Wait
MPI_Waitall
MPI_Waitany
MPI_Waitsome
MPI_Group_difference
MPI_Group_excl
MPI_Group_free
MPI_Group_incl
MPI_Group_intersection
MPI_Group_range_excl
MPI_Group_range_incl
MPI_Group_union
MPI_Accumulate
MPI_Get
MPI_Put
MPI_Win_complete
MPI_Win_create
MPI_Win_fence
MPI_Win_free
MPI_Win_lock
MPI_Win_post
MPI_Win_start
MPI_Win_test
MPI_Win_unlock
MPI_Win_wait
MPI_File_close
MPI_File_open
MPI_File_delete
MPI_File_sync
MPI_File_preallocate
MPI_File_read
MPI_File_read_all
MPI_File_seek
MPI_File_write
MPI_File_write_all
MPI_File_read_at
MPI_File_read_at_all
MPI_File_write_at
MPI_File_write_at_all
MPI_File_read_ordered
MPI_File_read_shared
MPI_File_seek_shared
MPI_File_write_ordered
MPI_File_write_shared
MPI_File_iread
MPI_File_iwrite
MPI_File_iread_at
MPI_File_iwrite_at
MPI_File_iread_shared
MPI_File_iwrite_shared
MPI_File_read_all_begin
MPI_File_read_all_end
MPI_File_read_at_all_begin
MPI_File_read_at_all_end
MPI_File_read_ordered_begin
MPI_File_read_ordered_end
MPI_File_write_all_begin
MPI_File_write_all_end
MPI_File_write_at_all_begin
MPI_File_write_at_all_end
MPI_File_write_ordered_begin
MPI_File_write_ordered_end

Просмотреть файл

@ -0,0 +1,31 @@
# This file lists all calls, which should not be generated
# automatically by mk_fortran_wrapper.sh
MPI_Group_range_excl
MPI_Group_range_incl
MPI_Init
MPI_Initialized
MPI_Init_thread
MPI_Pcontrol
MPI_Wtick
MPI_Wtime
MPI_Comm_call_errhandler
MPI_Comm_create_errhandler
MPI_Comm_get_errhandler
MPI_Comm_set_errhandler
MPI_File_call_errhandler
MPI_File_create_errhandler
MPI_File_get_errhandler
MPI_File_set_errhandler
MPI_Win_call_errhandler
MPI_Win_create_errhandler
MPI_Win_get_errhandler
MPI_Win_set_errhandler
MPI_Comm_create_keyval
MPI_Type_create_keyval
MPI_Win_create_keyval
MPI_Comm_spawn
MPI_Comm_spawn_multiple

Просмотреть файл

@ -0,0 +1,159 @@
##
# @configure_input@
#
# make wrapper.c
##
export SRCDIR=@top_vt_srcdir@/config/mpigen
have_mpi2=0 #@VT_MPIGEN_HAVE_MPI2@
have_mpi2_thread=@VT_MPIGEN_HAVE_MPI2_THREAD@
have_mpi2_1sided=@VT_MPIGEN_HAVE_MPI2_1SIDED@
have_mpi2_extcoll=@VT_MPIGEN_HAVE_MPI2_EXTCOLL@
have_mpi2_file=@VT_MPIGEN_HAVE_MPI2_IO@
have_mpi2_proc=0 #@VT_MPIGEN_HAVE_MPI2_PROC@
mpi2_src1=""; if [ $have_mpi2 = 1 ] ; then mpi2_src1="mpi2_standard.h"; fi
mpi2_src2=""; if [ $have_mpi2_thread = 1 ] ; then mpi2_src2="mpi2_thread.h"; fi
mpi2_src3=""; if [ $have_mpi2_1sided = 1 ] ; then mpi2_src3="mpi2_1sided.h"; fi
mpi2_src4=""; if [ $have_mpi2_extcoll = 1 ] ; then mpi2_src4="mpi2_extcoll.h"; fi
mpi2_src5=""; if [ $have_mpi2_file = 1 ] ; then mpi2_src5="mpi2_file.h"; fi
mpi2_src6=""; if [ $have_mpi2_proc = 1 ] ; then mpi2_src6="mpi2_proc.h"; fi
src="mpi_standard.h $mpi2_src1 $mpi2_src2 $mpi2_src3 $mpi2_src4 $mpi2_src5 $mpi2_src6"
out=@top_vt_builddir@/vtlib/vt_mpiwrap.gen.c
tmp=tmp$$
trap "rm -f $tmp.*; exit" 0 1 2 3 15
rm -f $tmp.tmp $out
for s in $src; do
if [ ! -f $SRCDIR/$s ] ; then
echo "$0: error: $SRCDIR/$s not found!"
exit 1
fi
grep ' MPI_.*(.*)' $SRCDIR/$s \
| sed >>$tmp.tmp \
-e '/typedef /d' \
-e 's/( *void *)/()/' \
-e 's/ */ /g' \
-e 's/ /,/' \
-e 's/(/,/' \
-e 's/);//' \
-e 's/, /,/g' \
-e 's/,$//'
done
cat <<End-of-File >$tmp.c
/**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file COPYING in the package base directory for details
*
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* ! BUILT BY mk_c_wrapper.sh; DO NOT EDIT THIS FILE !
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**/
End-of-File
cat <<End-of-File >$tmp.awk
{
# C wrapper
#
# \$1 is the return type
# \$2 is the call name
# \$3,\$4,... parameters
call= "grep -i \\"^"\$2"\$\\" \$SRCDIR/c_dont_generate.txt > /dev/null"
generate=system(call)
rettype=\$1
mpicall=\$2
if (!generate) {
printf "/* -- %s -- not generated */\n\n", mpicall
next
}
printf "/* -- %s -- */\n\n", mpicall
printf "%s %s(", rettype, mpicall
if (NF > 2) {
for (i=3; i<=NF; i++) {
split(\$i,typeandpara," ")
type[i-2]=typeandpara[1]
para[i-2]=typeandpara[2]
if (i > 3) printf ", "
if (index(\$i, "*") == 0)
printf "%s %s",type[i-2],para[i-2]
else
printf "%s %s",type[i-2],para[i-2]
}
}
print ")"
print "{"
printf" %s result;\n", rettype
print " uint64_t time;"
print " uint8_t was_recorded;"
print ""
print " if (IS_MPI_TRACE_ON)"
print " {"
print " MPI_TRACE_OFF();"
print ""
print " time = vt_pform_wtime();"
printf" was_recorded = vt_enter(&time, vt_mpi_regid[VT__%s]);\n", toupper(mpicall)
print ""
printf" CALL_PMPI_%d(%s", NF-2, mpicall
if (NF > 2) {
for (i=3; i<=NF; i++) {
printf ", "
#remove arrays declarations from parameter:
gsub("[[].*[]]","",para[i-2])
printf para[i-2]
}
}
print", result, 0, was_recorded, &time);"
print ""
print " time = vt_pform_wtime();"
print " vt_exit(&time);"
print ""
print " MPI_TRACE_ON();"
print " }"
print " else"
print " {"
printf" CALL_PMPI_%d(%s", NF-2, mpicall
if (NF > 2) {
for (i=3; i<=NF; i++) {
printf ", "
#remove arrays declarations from parameter:
gsub("[[].*[]]","",para[i-2])
printf para[i-2]
}
}
print", result, 0, 0, NULL);"
print " }"
print ""
print " return result;"
print "}"
print ""
}
End-of-File
@AWK@ -f $tmp.awk -F, <$tmp.tmp >>$tmp.c
if test $? -ne 0; then exit $?; fi
mv $tmp.c $out
rm $tmp.awk
exit 0

Просмотреть файл

@ -0,0 +1,841 @@
##
# @configure_input@
#
# make fortran_wrapper.c
##
export SRCDIR=@top_vt_srcdir@/config/mpigen
export COMM_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_COMM@
export ERRH_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_ERRH@
export FILE_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_FILE@
export GROUP_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_GROUP@
export INFO_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_INFO@
export OP_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_OP@
export REQUEST_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_REQUEST@
export STATUS_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_STATUS@
export TYPE_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_TYPE@
export WIN_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_WIN@
export MPI2CONST_CONVERT=@VT_MPIGEN_HAVE_FC_CONV_MPI2CONST@
have_mpi2=0 #@VT_MPIGEN_HAVE_MPI2@
have_mpi2_thread=@VT_MPIGEN_HAVE_MPI2_THREAD@
have_mpi2_1sided=@VT_MPIGEN_HAVE_MPI2_1SIDED@
have_mpi2_extcoll=@VT_MPIGEN_HAVE_MPI2_EXTCOLL@
have_mpi2_file=@VT_MPIGEN_HAVE_MPI2_IO@
have_mpi2_proc=0 #@VT_MPIGEN_HAVE_MPI2_PROC@
mpi2_src1=""; if [ $have_mpi2 = 1 ] ; then mpi2_src1="mpi2_standard.h"; fi
mpi2_src2=""; if [ $have_mpi2_thread = 1 ] ; then mpi2_src2="mpi2_thread.h"; fi
mpi2_src3=""; if [ $have_mpi2_1sided = 1 ] ; then mpi2_src3="mpi2_1sided.h"; fi
mpi2_src4=""; if [ $have_mpi2_extcoll = 1 ] ; then mpi2_src4="mpi2_extcoll.h"; fi
mpi2_src5=""; if [ $have_mpi2_file = 1 ] ; then mpi2_src5="mpi2_file.h"; fi
mpi2_src6=""; if [ $have_mpi2_proc = 1 ] ; then mpi2_src6="mpi2_proc.h"; fi
src="mpi_standard.h $mpi2_src1 $mpi2_src2 $mpi2_src3 $mpi2_src4 $mpi2_src5 $mpi2_src6"
out=@top_vt_builddir@/vtlib/vt_fmpiwrap.gen.c
tmp=tmp$$
trap "rm -f $tmp.*; exit" 0 1 2 3 15
rm -f $tmp.tmp $out
for s in $src; do
if [ ! -f $SRCDIR/$s ] ; then
echo "$0: error: $SRCDIR/$s not found!"
exit 1
fi
grep ' MPI_.*(.*)' $SRCDIR/$s \
| sed >>$tmp.tmp \
-e '/typedef /d' \
-e 's/( *void *)/()/' \
-e 's/ */ /g' \
-e 's/ /,/' \
-e 's/(/,/' \
-e 's/);//' \
-e 's/, /,/g' \
-e 's/,$//'
done
cat <<End-of-File >$tmp.c
/**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file COPYING in the package base directory for details
*
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* ! BUILT BY mk_fortran_wrapper.sh; DO NOT EDIT THIS FILE !
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**/
End-of-File
cat <<End-of-File >$tmp.awk
{
# Fortran wrapper
#
# \$1 is the return type
# \$2 is the call name
# \$3,\$4,... parameters
call= "grep -i \\"^"\$2"\$\\" \$SRCDIR/fortran_dont_generate.txt > /dev/null"
generate=system(call)
mpicall=\$2
if (!generate) {
printf "/* -- %s -- not generated */\n\n", mpicall
next
}
stringcnt=0
printf "/* -- %s -- */\n\n", mpicall
printf "VT_DECLDEF(void vt_%s_f(", tolower(mpicall)
if (NF == 2) {
printf "MPI_Fint* ierr"
} else {
for (i=3; i<=NF; i++) {
# Split up the type and parameter-name -- separated by space and tab
split(\$i,typeandpara," ")
type[i-2]=typeandpara[1]
para[i-2]=typeandpara[2]
if (i > 3) printf ", "
if (type[i-2] == "char*") {
strings[stringcnt++] = para[i-2]
printf "%s %s", type[i-2], para[i-2]
} else if (index(type[i-2], "*") != 0) {
printf "%s %s", converttype(type[i-2]), para[i-2]
} else {
printf "%s* %s", converttype(type[i-2]), para[i-2]
}
}
printf ", MPI_Fint* ierr"
for (i=0; i<stringcnt; i++) {
printf ", int %s_len", strings[i]
}
}
print "))"
print "{"
# do the handle conversion, if possible
# first, declare necessary variables
decl_i=0
for (i=3; i<=NF; i++) {
print_convert_function(type[i-2],para[i-2],1)
if ((!decl_i) && (index(para[i-2],"_CLASS_ARRAY_") != 0)) decl_i=1
}
if (decl_i == 1) print " int i = 0; (void)i;"
print "";
# print special conversion line for MPI_Waitsome, MPI_Testsome
# For these calls it is necessary to allocate an amount of statuses
# equal to the value speciefied in incount and to convert as many
# statuses as defined by the return value outcount. In order to avoid
# special handling the initial value for outcount is set to the value
# of incount.
if ( (index(mpicall,"MPI_Waitsome") != 0) ||
(index(mpicall,"MPI_Testsome") != 0) )
{
print " *outcount = *incount;"
}
# do the handle conversion
for (i=3; i<=NF; i++)
print_convert_function(type[i-2],para[i-2],0)
print ""
printf " *ierr = %s(", mpicall
for (i=3; i<=NF; i++) {
if (i > 3) printf ", "
#remove arrays declarations from parameter:
gsub("[[].*[]]","",para[i-2])
# If the original type already needed a pointer, pass as is,
# otherwise dereference the parameter
printf "%s", get_converted_name(para[i-2],type[i-2])
}
print ");\n"
# finaly do the handle back conversion if possible/necessary
for (i=3; i<=NF; i++)
print_back_convert_function(type[i-2],para[i-2])
# also dont forget to do convert output array indices
for (i=3; i<=NF; i++)
convert_output_array_indices(type[i-2],para[i-2])
printf "} VT_GENERATE_F77_BINDINGS(%s, %s, vt_%s_f,\n", tolower(mpicall), toupper(mpicall), tolower(mpicall)
printf " ("
if (NF == 2) {
print "MPI_Fint* ierr),"
} else {
for (i=3; i<=NF; i++) {
if (i > 3) printf ", "
if (index(type[i-2], "*") != 0)
printf "%s %s", converttype(type[i-2]), para[i-2]
else
printf "%s* %s", converttype(type[i-2]), para[i-2]
}
printf ", MPI_Fint* ierr"
for (i=0; i<stringcnt; i++) {
printf ", int %s_len", strings[i]
}
print "),"
}
printf " ("
if (NF == 2) {
printf "ierr))\n\n"
} else {
for (i=3; i<=NF; i++) {
if (i > 3) printf ", "
#remove arrays declarations from parameter:
gsub("[[].*[]]","",para[i-2])
# If the original type already needed a pointer, pass as is,
# otherwise dereference the parameter
printf "%s", para[i-2]
}
printf ", ierr"
for (i=0; i<stringcnt; i++) {
printf ", %s_len", strings[i]
}
printf "))\n\n"
}
}
# =================================================
# Helper Functions for Conversion mangling
# =================================================
# -------------------------------------------------
# Function converts types. It replaces MPI_X Types
# by MPI_Fint.
# -------------------------------------------------
function converttype(type) {
gsub("MPI_Aint","MPI_Fint",type)
if (ENVIRON["COMM_CONVERT"] == 1)
gsub("MPI_Comm","MPI_Fint",type)
if (ENVIRON["ERRH_CONVERT"] == 1)
gsub("MPI_Errhandler","MPI_Fint",type)
if (ENVIRON["FILE_CONVERT"] == 1)
gsub("MPI_File","MPI_Fint",type)
if (ENVIRON["GROUP_CONVERT"] == 1)
gsub("MPI_Group","MPI_Fint",type)
if (ENVIRON["INFO_CONVERT"] == 1)
gsub("MPI_Info","MPI_Fint",type)
if (ENVIRON["OP_CONVERT"] == 1)
gsub("MPI_Op","MPI_Fint",type)
if (ENVIRON["TYPE_CONVERT"] == 1)
gsub("MPI_Datatype","MPI_Fint",type)
if (ENVIRON["WIN_CONVERT"] == 1)
gsub("MPI_Win","MPI_Fint",type)
if (ENVIRON["REQUEST_CONVERT"] == 1)
gsub("MPI_Request","MPI_Fint",type)
gsub("MPI_Status","MPI_Fint",type)
return type
}
# -------------------------------------------------
# Function creating temporary variables and
# converting Fortran variables to C variables
# -------------------------------------------------
function print_convert_function(type,para,decl) {
# a SINGLE value for input purposes
if ( (index(type,"*") == 0) ||
((index(para, "_CLASS_SINGLE_IN") != 0) ||
(index(para, "_CLASS_SINGLE_IO") != 0)) )
{
#all of these classes need temp parameter and conversion
pointer="*"
if (type == "char*") {
if (decl) printf" char* %sC;\n", para
else printf" vt_string_f2c(%s, %s_len, &%sC);\n", para, para, para
} else if (index(type,"MPI_Aint") > 0) {
if (decl) printf" MPI_Aint %sC;\n",para
else printf" %sC = (MPI_Aint)%s%s;\n",para,pointer,para
} else if ((ENVIRON["COMM_CONVERT"] == 1) && (index(type,"MPI_Comm") > 0)) {
if (decl) printf" MPI_Comm %sC;\n", para
else printf" %sC = MPI_Comm_f2c(%s%s);\n",para,pointer,para
} else if ((ENVIRON["ERRH_CONVERT"] == 1) && (index(type,"MPI_Errhandler") > 0)) {
if (decl) printf" MPI_Errhandler %sC;\n", para
else printf" %sC = MPI_Errhandler_f2c(%s%s);\n",para,pointer,para
} else if ((ENVIRON["FILE_CONVERT"] == 1) && (index(type,"MPI_File") > 0)) {
if (decl) printf" MPI_File %sC;\n", para
else printf" %sC = MPI_File_f2c(%s%s);\n",para,pointer,para
} else if ((ENVIRON["GROUP_CONVERT"] == 1) && (index(type,"MPI_Group") > 0)) {
if (decl) printf" MPI_Group %sC;\n", para
else printf" %sC = MPI_Group_f2c(%s%s);\n",para,pointer,para
} else if ((ENVIRON["INFO_CONVERT"] == 1) && (index(type,"MPI_Info") > 0)) {
if (decl) printf" MPI_Info %sC;\n", para
else printf" %sC = MPI_Info_f2c(%s%s);\n",para,pointer,para
} else if ((ENVIRON["OP_CONVERT"] == 1) && (index(type,"MPI_Op") > 0)) {
if (decl) printf" MPI_Op %sC;\n", para
else printf" %sC = MPI_Op_f2c(%s%s);\n",para,pointer,para
} else if ((ENVIRON["TYPE_CONVERT"] == 1) && (index(type,"MPI_Datatype") > 0)) {
if (decl) printf" MPI_Datatype %sC;\n", para
else printf" %sC = MPI_Type_f2c(%s%s);\n",para,pointer,para
} else if ((ENVIRON["WIN_CONVERT"] == 1) && (index(type,"MPI_Win") > 0)) {
if (decl) printf" MPI_Win %sC;\n", para
else printf" %sC = MPI_Win_f2c(%s%s);\n",para,pointer,para
} else if ((ENVIRON["REQUEST_CONVERT"] == 1) && (index(type,"MPI_Request") > 0)) {
if (decl) printf" MPI_Request %sC;\n", para
else printf" %sC = MPI_Request_f2c(%s%s);\n",para,pointer,para
} else if (index(type,"MPI_Status") > 0) {
if (decl) {
printf" MPI_Status* %sC;\n", para
} else {
printf" if ( %s == VT_MPI_F_STATUS_IGNORE )\n",para
printf" %sC = MPI_STATUS_IGNORE;\n",para
printf" else if ( %s == VT_MPI_F_STATUSES_IGNORE )\n",para
printf" %sC = MPI_STATUSES_IGNORE;\n",para
printf" else\n {\n"
if (ENVIRON["STATUS_CONVERT"] == 1) {
printf" %sC = (MPI_Status*)malloc(sizeof(MPI_Status));\n",para
printf" MPI_Status_f2c(%s, %sC);\n",para,para
} else {
printf" %sC = (MPI_Status*)%s;\n",para,para
}
printf" }\n"
}
}
# a SINGLE value for output purposes
} else if ( index(para, "_CLASS_SINGLE_OUT") != 0) {
#Here we just need to create an temp parameter
if (type == "char*") {
if (decl) printf " char %sC[1024];\n", para
} else if (index(type,"MPI_Aint") > 0) {
if (decl) printf" MPI_Aint %sC;\n",para
} else if ((ENVIRON["COMM_CONVERT"] == 1) && (index(type,"MPI_Comm") > 0)) {
if (decl) printf" MPI_Comm %sC;\n",para
else printf" %sC = MPI_COMM_NULL;\n",para
} else if ((ENVIRON["ERRH_CONVERT"] == 1) && (index(type,"MPI_Errhandler") > 0)) {
if (decl) printf" MPI_Errhandler %sC;\n",para
else printf" %sC = MPI_ERRHANDLER_NULL;\n",para
} else if ((ENVIRON["FILE_CONVERT"] == 1) && (index(type,"MPI_File") > 0)) {
if (decl) printf" MPI_File %sC;\n",para
else printf" %sC = MPI_FILE_NULL;\n",para
} else if ((ENVIRON["GROUP_CONVERT"] == 1) && (index(type,"MPI_Group") > 0)) {
if (decl) printf" MPI_Group %sC;\n",para
else printf" %sC = MPI_GROUP_NULL;\n",para
} else if ((ENVIRON["INFO_CONVERT"] == 1) && (index(type,"MPI_Info") > 0)) {
if (decl) printf" MPI_Info %sC;\n",para
else printf" %sC = MPI_INFO_NULL;\n",para
} else if ((ENVIRON["OP_CONVERT"] == 1) && (index(type,"MPI_Op") > 0)) {
if (decl) printf" MPI_Op %sC;\n",para
else printf" %sC = MPI_OP_NULL;\n",para
} else if ((ENVIRON["TYPE_CONVERT"] == 1) && (index(type,"MPI_Datatype") > 0)) {
if (decl) printf" MPI_Datatype %sC;\n",para
else printf" %sC = MPI_DATATYPE_NULL;\n",para
} else if ((ENVIRON["WIN_CONVERT"] == 1) && (index(type,"MPI_Win") > 0)) {
if (decl) printf" MPI_Win %sC;\n",para
else printf" %sC = MPI_WIN_NULL;\n",para
} else if ((ENVIRON["REQUEST_CONVERT"] == 1) && (index(type,"MPI_Request") > 0)) {
if (decl) printf" MPI_Request %sC;\n",para
else printf" %sC = MPI_REQUEST_NULL;\n",para
} else if (index(type,"MPI_Status") > 0) {
if (decl) {
printf" MPI_Status* %sC;\n",para
} else {
printf" if ( %s == VT_MPI_F_STATUS_IGNORE )\n",para
printf" %sC = MPI_STATUS_IGNORE;\n",para
printf" else if ( %s == VT_MPI_F_STATUSES_IGNORE )\n",para
printf" %sC = MPI_STATUSES_IGNORE;\n",para
printf" else\n"
if (ENVIRON["STATUS_CONVERT"] == 1) {
printf" %sC = (MPI_Status*)malloc(sizeof(MPI_Status));\n",para
} else {
printf" %sC = (MPI_Status*)%s;\n",para,para
}
}
}
# an ARRAY for input and/or output purposes
} else if ( (index(para, "_CLASS_ARRAY_") != 0) ) {
#We need for all array cases a temporary array
#extract the name of the length parameter
splitstring="_CLASS_ARRAY_IN_"
if (index(para, "_CLASS_ARRAY_IO_") != 0)
splitstring="_CLASS_ARRAY_IO_"
if (index(para, "_CLASS_ARRAY_OUT_") != 0)
splitstring="_CLASS_ARRAY_OUT_"
split(para,lentemp,splitstring)
len_parameter = lentemp[2]
#now we have to handle all the imaginable handles
if (index(type,"MPI_Aint") > 0) {
if (decl) {
printf" MPI_Aint* %sC;\n",para
} else {
printf" %sC = (MPI_Aint*)malloc(sizeof(MPI_Aint)*(*%s));\n",para,len_parameter
}
} else if ((ENVIRON["COMM_CONVERT"] == 1) && (index(type,"MPI_Comm") > 0)) {
if (decl) {
printf" MPI_Comm* %sC;\n",para
} else {
printf" %sC = (MPI_Comm*)malloc(sizeof(MPI_Comm)*(*%s));\n",para,len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_COMM_NULL;\n",para
}
} else if ((ENVIRON["ERRH_CONVERT"] == 1) && (index(type,"MPI_Errhandler") > 0)) {
if (decl) {
printf" MPI_Errhandler* %sC;\n",para
} else {
printf" %sC = (MPI_Errhandler*)malloc(sizeof(MPI_Errhandler)*(*%s));\n",para,len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_ERRHANDLER_NULL;\n",para
}
} else if ((ENVIRON["FILE_CONVERT"] == 1) && (index(type,"MPI_File") > 0)) {
if (decl) {
printf" MPI_File* %sC;\n",para
} else {
printf" %sC = (MPI_File*)malloc(sizeof(MPI_File)*(*%s));\n",para,len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_FILE_NULL;\n",para
}
} else if ((ENVIRON["GROUP_CONVERT"] == 1) && (index(type,"MPI_Group") > 0)) {
if (decl) {
printf" MPI_Group* %sC;\n",para
} else {
printf" %sC = (MPI_Group*)malloc(sizeof(MPI_Group)*(*%s));\n",para,len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_GROUP_NULL;\n",para
}
} else if ((ENVIRON["INFO_CONVERT"] == 1) && (index(type,"MPI_Info") > 0)) {
if (decl) {
printf" MPI_Info* %sC;\n",para
} else {
printf" %sC = (MPI_Info*)malloc(sizeof(MPI_Info)*(*%s));\n",para,len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_INFO_NULL;\n",para
}
} else if ((ENVIRON["OP_CONVERT"] == 1) && (index(type,"MPI_Op") > 0)) {
if (decl) {
printf" MPI_Op* %sC;\n",para
} else {
printf" %sC = (MPI_Op*)malloc(sizeof(MPI_Op)*(*%s));\n",para,len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_OP_NULL;\n",para
}
} else if ((ENVIRON["TYPE_CONVERT"] == 1) && (index(type,"MPI_Datatype") > 0)) {
if (decl) {
printf" MPI_Datatype* %sC;\n",para
} else {
printf" %sC = (MPI_Datatype*)malloc(sizeof(MPI_Datatype)*(*%s));\n",para,len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_DATATYPE_NULL;\n",para
}
} else if ((ENVIRON["WIN_CONVERT"] == 1) && (index(type,"MPI_Win") > 0)) {
if (decl) {
printf" MPI_Win* %sC;\n",para
} else {
printf" %sC = (MPI_Win*)malloc(sizeof(MPI_Win)*(*%s));\n",para,len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_WIN_NULL;\n",para
}
} else if ((ENVIRON["REQUEST_CONVERT"] == 1) && (index(type,"MPI_Request") > 0)) {
if (decl) {
printf" MPI_Request* %sC;\n",para
} else {
printf" %sC = (MPI_Request*)malloc(sizeof(MPI_Request)*(*%s));\n",para,len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_REQUEST_NULL;\n",para
}
} else if (index(type,"MPI_Status") > 0) {
if (decl) {
printf" MPI_Status* %sC;\n",para
} else {
printf" if ( %s == VT_MPI_F_STATUSES_IGNORE )\n",para
printf" %sC = MPI_STATUSES_IGNORE;\n",para
printf" else if ( %s == VT_MPI_F_STATUS_IGNORE )\n",para
printf" %sC = MPI_STATUS_IGNORE;\n",para
printf" else\n"
if (ENVIRON["STATUS_CONVERT"] == 1) {
printf" %sC = (MPI_Status*)malloc(sizeof(MPI_Status)*(*%s));\n",para,len_parameter
} else {
printf" %sC = (MPI_Status*)%s;\n",para,para
}
}
}
}
# an ARRAY for input purposes
if ( (index(para, "_CLASS_ARRAY_IN_") != 0) ||
(index(para, "_CLASS_ARRAY_IO_") != 0) )
{
#both of these classes need temp array parameter and conversion
#extract the name of the length parameter
splitstring="_CLASS_ARRAY_IN_"
if (index(para, "_CLASS_ARRAY_IO_") != 0)
splitstring="_CLASS_ARRAY_IO_"
split(para,lentemp,splitstring)
len_parameter = lentemp[2]
#now we have to handle all the imaginable handles
if (index(type,"MPI_Aint") > 0) {
if (!decl) {
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = (MPI_Aint)%s[i];\n",para,para
}
} else if ((ENVIRON["COMM_CONVERT"] == 1) && (index(type,"MPI_Comm") > 0)) {
if (!decl) {
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_Comm_f2c(%s[i]);\n",para,para
}
} else if ((ENVIRON["ERRH_CONVERT"] == 1) && (index(type,"MPI_Errhandler") > 0)) {
if (!decl) {
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_Errhandler_f2c(%s[i]);\n",para,para
}
} else if ((ENVIRON["FILE_CONVERT"] == 1) && (index(type,"MPI_File") > 0)) {
if (!decl) {
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_File_f2c(%s[i]);\n",para,para
}
} else if ((ENVIRON["GROUP_CONVERT"] == 1) && (index(type,"MPI_Group") > 0)) {
if (!decl) {
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i]=MPI_Group_f2c(%s[i]);\n",para,para
}
} else if ((ENVIRON["INFO_CONVERT"] == 1) && (index(type,"MPI_Info") > 0)) {
if (!decl) {
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_Info_f2c(%s[i]);\n",para,para
}
} else if ((ENVIRON["OP_CONVERT"] == 1) && (index(type,"MPI_Op") > 0)) {
if (!decl) {
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_Op_f2c(%s[i]);\n",para,para
}
} else if ((ENVIRON["TYPE_CONVERT"] == 1) && (index(type,"MPI_Datatype") > 0)) {
if (!decl) {
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_Type_f2c(%s[i]);\n",para,para
}
} else if ((ENVIRON["WIN_CONVERT"] == 1) && (index(type,"MPI_Win") > 0)) {
if (!decl) {
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_Win_f2c(%s[i]);\n",para,para
}
} else if ((ENVIRON["REQUEST_CONVERT"] == 1) && (index(type,"MPI_Request") > 0)) {
if (!decl) {
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %sC[i] = MPI_Request_f2c(%s[i]);\n",para,para
}
} else if ((ENVIRON["STATUS_CONVERT"] == 1) && (index(type,"MPI_Status") > 0)) {
if (!decl) {
printf" if ( (%s != VT_MPI_F_STATUSES_IGNORE) && (%s != VT_MPI_F_STATUS_IGNORE) )\n {\n",para,para
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" MPI_Status_f2c(&%s[i], &%sC[i*VT_MPI_STATUS_SIZE]);\n",para,para
printf" }\n"
}
}
# a BUFFER for purposes
} else if ( (index(para, "_CLASS_BUFFER") != 0) ) {
if (!decl) {
if ((ENVIRON["MPI2CONST_CONVERT"] == 1) && (index(para, "_IN_PLACE") > 0)) {
printf" %s = VT_MPI_IN_PLACE_F2C(%s);\n",para,para
}
printf" %s = VT_MPI_BOTTOM_F2C(%s);\n",para,para
}
}
}
# -------------------------------------------------
# Function deleting dynamic temporary variables and
# back converting C variables to Fortran variables
# -------------------------------------------------
function print_back_convert_function(type,para) {
# SINGLE ARGUMENT BACK CONVERSION
if ( ((index(para, "_CLASS_SINGLE_OUT") != 0) ||
(index(para, "_CLASS_SINGLE_IO") != 0 )) )
{
#this class needs back conversion of a single argument
if (type == "char*")
printf" vt_string_c2f(%sC, %s, %s_len);\n", para, para, para
if (index(type,"MPI_Aint") > 0)
printf" *%s = (MPI_Fint)%sC;\n",para,para
if ((ENVIRON["COMM_CONVERT"] == 1) && (index(type,"MPI_Comm") > 0))
printf" *%s = MPI_Comm_c2f(%sC);\n",para,para
if ((ENVIRON["ERRH_CONVERT"] == 1) && (index(type,"MPI_Errhandler") > 0))
printf" *%s = MPI_Errhandler_c2f(%sC);\n",para,para
if ((ENVIRON["FILE_CONVERT"] == 1) && (index(type,"MPI_File") > 0))
printf" *%s = MPI_File_c2f(%sC);\n",para,para
if ((ENVIRON["GROUP_CONVERT"] == 1) && (index(type,"MPI_Group") > 0))
printf" *%s = MPI_Group_c2f(%sC);\n",para,para
if ((ENVIRON["INFO_CONVERT"] == 1) && (index(type,"MPI_Info") > 0))
printf" *%s = MPI_Info_c2f(%sC);\n",para,para
if ((ENVIRON["OP_CONVERT"] == 1) && (index(type,"MPI_Op") > 0))
printf" *%s = MPI_Op_c2f(%sC);\n",para,para
if ((ENVIRON["TYPE_CONVERT"] == 1) && (index(type,"MPI_Datatype") > 0))
printf" *%s = MPI_Type_c2f(%sC);\n",para,para
if ((ENVIRON["WIN_CONVERT"] == 1) && (index(type,"MPI_Win") > 0))
printf" *%s = MPI_Win_c2f(%sC);\n",para,para
if ((ENVIRON["REQUEST_CONVERT"] == 1) && (index(type,"MPI_Request") > 0))
printf" *%s = MPI_Request_c2f(%sC);\n",para,para
if ((ENVIRON["STATUS_CONVERT"] == 1) && (index(type,"MPI_Status") > 0)) {
printf" if ( (%s != VT_MPI_F_STATUS_IGNORE) && (%s != VT_MPI_F_STATUSES_IGNORE) )\n",para,para
printf" MPI_Status_c2f(%sC, %s);\n",para,para
}
}
#ARRAY BACK CONVERSION
if ( ((index(para, "_CLASS_ARRAY_OUT_") != 0) ||
(index(para, "_CLASS_ARRAY_IO_") != 0)) )
{
#both of these classes need array back conversion
#extract the name of the length parameter
splitstring="_CLASS_ARRAY_OUT_"
if (index(para, "_CLASS_ARRAY_IO_") != 0)
splitstring="_CLASS_ARRAY_IO_"
split(para,lentemp,splitstring)
len_parameter = lentemp[2]
#now we have to handle all the imaginable handles
if (index(type,"MPI_Aint") > 0) {
printf" if ( *%s != MPI_UNDEFINED )\n {\n",len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %s[i] = (MPI_Fint)%sC[i];\n",para,para
printf" }\n"
}
if ((ENVIRON["COMM_CONVERT"] == 1) && (index(type,"MPI_Comm") > 0)) {
printf" if ( *%s != MPI_UNDEFINED )\n {\n",len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %s[i] = MPI_Comm_c2f(%sC[i]);\n",para,para
printf" }\n"
}
if ((ENVIRON["ERRH_CONVERT"] == 1) && (index(type,"MPI_Errhandler") > 0)) {
printf" if ( *%s != MPI_UNDEFINED )\n {\n",len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %s[i] = MPI_Errhandler_c2f(%sC[i]);\n",para,para
printf" }\n"
}
if ((ENVIRON["FILE_CONVERT"] == 1) && (index(type,"MPI_File") > 0)) {
printf" if ( *%s != MPI_UNDEFINED )\n {\n",len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %s[i] = MPI_File_c2f(%sC[i]);\n",para,para
printf" }\n"
}
if ((ENVIRON["GROUP_CONVERT"] == 1) && (index(type,"MPI_Group") > 0)) {
printf" if ( *%s != MPI_UNDEFINED )\n {\n",len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %s[i] = MPI_Group_c2f(%sC[i]);\n",para,para
printf" }\n"
}
if ((ENVIRON["INFO_CONVERT"] == 1) && (index(type,"MPI_Info") > 0)) {
printf" if ( *%s != MPI_UNDEFINED )\n {\n",len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %s[i] = MPI_Info_c2f(%sC[i]);\n",para,para
printf" }\n"
}
if ((ENVIRON["OP_CONVERT"] == 1) && (index(type,"MPI_Op") > 0)) {
printf" if ( *%s != MPI_UNDEFINED )\n {\n",len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %s[i] = MPI_Op_c2f(%sC[i]);\n",para,para
printf" }\n"
}
if ((ENVIRON["TYPE_CONVERT"] == 1) && (index(type,"MPI_Datatype") > 0)) {
printf" if ( *%s != MPI_UNDEFINED )\n {\n",len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %s[i] = MPI_Type_c2f(%sC[i]);\n",para,para
printf" }\n"
}
if ((ENVIRON["WIN_CONVERT"] == 1) && (index(type,"MPI_Win") > 0)) {
printf" if ( *%s != MPI_UNDEFINED )\n {\n",len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %s[i] = MPI_Win_c2f(%sC[i]);\n",para,para
printf" }\n"
}
if ((ENVIRON["REQUEST_CONVERT"] == 1) && (index(type,"MPI_Request") > 0)) {
printf" if ( *%s != MPI_UNDEFINED )\n {\n",len_parameter
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" %s[i] = MPI_Request_c2f(%sC[i]);\n",para,para
printf" }\n"
}
if ((ENVIRON["STATUS_CONVERT"] == 1) && (index(type,"MPI_Status") > 0)) {
printf" if ( (*%s != MPI_UNDEFINED) && (%s != VT_MPI_F_STATUSES_IGNORE) && (%s != VT_MPI_F_STATUS_IGNORE) )\n {\n",len_parameter,para,para
printf" for (i = 0; i < *%s; i++) \n",len_parameter
printf" MPI_Status_c2f(&%sC[i], &%s[i*VT_MPI_STATUS_SIZE]);\n",para,para
printf" }\n"
}
}
#free the array memory for all but MPI_Status
if ( (index(para,"_CLASS_ARRAY_") != 0) &&
(index(type,"MPI_Status") == 0) )
{
if ( (index(type,"MPI_Aint") != 0) ||
((index(type,"MPI_Comm") != 0) && (ENVIRON["COMM_CONVERT"] == 1)) ||
((index(type,"MPI_Errhandler") != 0) && (ENVIRON["ERRHANDLER_CONVERT"] == 1)) ||
((index(type,"MPI_File") != 0) && (ENVIRON["FILE_CONVERT"] == 1)) ||
((index(type,"MPI_Group") != 0) && (ENVIRON["GROUP_CONVERT"] == 1)) ||
((index(type,"MPI_Info") != 0) && (ENVIRON["INFO_CONVERT"] == 1)) ||
((index(type,"MPI_Op") != 0) && (ENVIRON["OP_CONVERT"] == 1)) ||
((index(type,"MPI_Datatype") != 0) && (ENVIRON["TYPE_CONVERT"] == 1)) ||
((index(type,"MPI_Win") != 0) && (ENVIRON["WIN_CONVERT"] == 1)) )
{
printf " free(%sC);\n",para
}
}
#free the array memory for statuses
if ( (index(para,"_CLASS_ARRAY_") != 0) &&
(index(type,"MPI_Status") != 0) &&
(ENVIRON["STATUS_CONVERT"] == 1) )
{
printf " if ( (%s != VT_MPI_F_STATUS_IGNORE) && (%s != VT_MPI_F_STATUSES_IGNORE) )\n",para,para
printf " free(%sC);\n",para
}
#free Status memory (for single status values)
if ( (index(para,"_CLASS_SINGLE_") != 0) &&
(index(type,"MPI_Status") != 0) &&
(ENVIRON["STATUS_CONVERT"] == 1) )
{
printf " if ( (%s != VT_MPI_F_STATUS_IGNORE) && (%s != VT_MPI_F_STATUSES_IGNORE) )\n",para,para
printf " free(%sC);\n",para
}
#free string memory
if ( (index(para,"_CLASS_SINGLE_IN") != 0) &&
(type == "char*") )
{
printf " free(%sC);\n",para
}
} #function back_convert
# -------------------------------------------------
# Function printing an variable name depending upon
# its type and temporary representation.
# -------------------------------------------------
function get_converted_name(para,type) {
#string
if (type == "char*") return para "C"
pointer=""
if (index(type, "*") == 0)
pointer="*"
#Find out wheter we have to pass address operator "&"
address=""
if ((index(para,"_CLASS_SINGLE_") != 0) && (index(type,"MPI_Status") == 0) )
address="&"
#handle conversion
if ((index(type,"MPI_Aint") > 0) ||
((ENVIRON["COMM_CONVERT"] == 1)&&(index(type,"MPI_Comm") > 0)) ||
((ENVIRON["ERRH_CONVERT"] == 1)&&(index(type,"MPI_Errhandler") > 0)) ||
((ENVIRON["FILE_CONVERT"] == 1)&&(index(type,"MPI_File") > 0)) ||
((ENVIRON["GROUP_CONVERT"] == 1)&&(index(type,"MPI_Group") > 0)) ||
((ENVIRON["INFO_CONVERT"] == 1)&&(index(type,"MPI_Info") > 0)) ||
((ENVIRON["OP_CONVERT"] == 1)&&(index(type,"MPI_Op") > 0)) ||
((ENVIRON["TYPE_CONVERT"] == 1)&&(index(type,"MPI_Datatype") > 0)) ||
((ENVIRON["WIN_CONVERT"] == 1)&&(index(type,"MPI_Win") > 0)) ||
((ENVIRON["REQUEST_CONVERT"] == 1)&&(index(type,"MPI_Request") > 0)) ||
(index(type,"MPI_Status") > 0) )
return address para "C"
#it is not a handle type so normal handling
return pointer para
}
# -------------------------------------------------
# Function that converts array indizes passed between
# C and Fortran, only used for array inidces generated
# in C and passed back to Fortran.
# -------------------------------------------------
function convert_output_array_indices(type,para) {
#We have three different cases:
# * _CLASS_ARRAYINDEX_OUT_SINGLE_NOCONDITION
# * _CLASS_ARRAYINDEX_OUT_SINGLE_CONDITION_conditionargument
# * _CLASS_ARRAYINDEX_OUT_ARRAY_sizeargument
#is it the "_CLASS_ARRAYINDEX_OUT_SINGLE_NOCONDITION" case ?
if (index(para,"_CLASS_ARRAYINDEX_OUT_SINGLE_NOCONDITION") != 0) {
printf " if ( (*%s != MPI_UNDEFINED) && (*%s >= 0))\n", para, para
printf " (*%s)++;\n", para, para
}
#is it the "_CLASS_ARRAYINDEX_OUT_SINGLE_CONDITION_<ARG>" case ?
if (index(para,"_CLASS_ARRAYINDEX_OUT_SINGLE_CONDITION_") != 0) {
#extract the name of the "conditionargument" parameter
splitstring="_CLASS_ARRAYINDEX_OUT_SINGLE_CONDITION_"
split(para,condtemp,splitstring)
cond = condtemp[2]
printf " if ( (*%s) && (*%s != MPI_UNDEFINED) && (*%s >= 0))\n", cond, para, para
printf " (*%s)++;\n", para, para
}
#is it the "_CLASS_ARRAYINDEX_OUT_ARRAY_<ARG>" case ?
if (index(para,"_CLASS_ARRAYINDEX_OUT_ARRAY_") != 0) {
#extract the name of the "conditionargument" parameter
splitstring="_CLASS_ARRAYINDEX_OUT_ARRAY_"
split(para,counttemp,splitstring)
count = counttemp[2]
printf " if ( *%s != MPI_UNDEFINED )\n {\n", count
printf " int j;\n"
printf " for (j = 0; j < *%s; j++)\n {\n", count
printf " if ( (%s[j] != MPI_UNDEFINED) && (%s[j] >= 0))\n", para, para
printf " %s[j]++;\n }\n }\n", para, para
}
}
End-of-File
@AWK@ -f $tmp.awk -F, <$tmp.tmp >>$tmp.c
if test $? -ne 0; then exit $?; fi
mv $tmp.c $out
rm $tmp.awk
exit 0

Просмотреть файл

@ -0,0 +1,153 @@
##
# @configure_input@
#
# make vt_mpireg.[c|h]
##
export SRCDIR=@top_vt_srcdir@/config/mpigen
have_mpi2=0 #@VT_MPIGEN_HAVE_MPI2@
have_mpi2_thread=@VT_MPIGEN_HAVE_MPI2_THREAD@
have_mpi2_1sided=@VT_MPIGEN_HAVE_MPI2_1SIDED@
have_mpi2_extcoll=@VT_MPIGEN_HAVE_MPI2_EXTCOLL@
have_mpi2_file=@VT_MPIGEN_HAVE_MPI2_IO@
have_mpi2_proc=0 #@VT_MPIGEN_HAVE_MPI2_PROC@
mpi2_src1=""; if [ $have_mpi2 = 1 ] ; then mpi2_src1="mpi2_standard.h"; fi
mpi2_src2=""; if [ $have_mpi2_thread = 1 ] ; then mpi2_src2="mpi2_thread.h"; fi
mpi2_src3=""; if [ $have_mpi2_1sided = 1 ] ; then mpi2_src3="mpi2_1sided.h"; fi
mpi2_src4=""; if [ $have_mpi2_extcoll = 1 ] ; then mpi2_src4="mpi2_extcoll.h"; fi
mpi2_src5=""; if [ $have_mpi2_file = 1 ] ; then mpi2_src5="mpi2_file.h"; fi
mpi2_src6=""; if [ $have_mpi2_proc = 1 ] ; then mpi2_src6="mpi2_proc.h"; fi
src="mpi_standard.h $mpi2_src1 $mpi2_src2 $mpi2_src3 $mpi2_src4 $mpi2_src5 $mpi2_src6"
outprefix=@top_vt_builddir@/vtlib/vt_mpireg.gen
tmp=tmp$$
trap "rm -f $tmp.*; exit" 0 1 2 3 15
rm -f $tmp.tmp $outprefix.c $outprefix.h
for s in $src; do
if [ ! -f $SRCDIR/$s ] ; then
echo "$0: error: $SRCDIR/$s not found!"
exit 1
fi
grep ' MPI_.*(.*)' $SRCDIR/$s \
| sed >>$tmp.tmp \
-e '/typedef /d' \
-e 's/( *void *)/()/' \
-e 's/ */ /g' \
-e 's/ /,/' \
-e 's/(/,/' \
-e 's/);//' \
-e 's/, /,/g' \
-e 's/,$//'
done
cat <<End-of-File >$tmp.h
/**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file COPYING in the package base directory for details
*
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* ! BUILT BY mk_registry.sh; DO NOT EDIT THIS FILE !
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**/
End-of-File
export IDX=0
cat <<End-of-File >$tmp.awk
{
# MPI function registry
#
# \$1 is the return type
# \$2 is the call name
# \$3,\$4,... parameters
mpicall=\$2
idx=ENVIRON["IDX"]++
printf "#define VT__%s %i\n", toupper(mpicall), idx++
}
End-of-File
@AWK@ -f $tmp.awk -F, <$tmp.tmp >>$tmp.h
if test $? -ne 0; then exit $?; fi
num=`grep VT__ $tmp.h | wc -l`
cat <<End-of-File >>$tmp.h
#define VT__MPI_REGID_NUM $num
End-of-File
mv $tmp.h $outprefix.h
rm $tmp.awk
cat <<End-of-File >$tmp.c
/**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2009, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file COPYING in the package base directory for details
*
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* ! BUILT BY mk_registry.sh; DO NOT EDIT THIS FILE !
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**/
End-of-File
cat <<End-of-File >$tmp.awk
{
# MPI function registry
#
# \$1 is the return type
# \$2 is the call name
# \$3, \$4,... parameters
mpicall=\$2
if ( index(mpicall,"MPI_Init") > 0 )
next;
split(\$NF,lastparam, " ")
if ( lastparam[3] == "/*COLL_BARRIER*/" )
type="VT_MPI_COLL_BARRIER"
else if ( lastparam[3] == "/*COLL_ONE2ALL*/" )
type="VT_MPI_COLL_ONE2ALL"
else if ( lastparam[3] == "/*COLL_ALL2ONE*/" )
type="VT_MPI_COLL_ALL2ONE"
else if ( lastparam[3] == "/*COLL_ALL2ALL*/" )
type="VT_MPI_COLL_ALL2ALL"
else if ( lastparam[3] == "/*COLL_OTHER*/" )
type="VT_MPI_COLL_OTHER"
else
type="VT_MPI_FUNCTION"
printf" vt_mpi_regid[VT__%s] =\n", toupper(mpicall)
printf" vt_def_region(\\"%s\\", mpi_fid, VT_NO_LNO, VT_NO_LNO, NULL, %s);\n",
mpicall, type
}
End-of-File
@AWK@ -f $tmp.awk -F, <$tmp.tmp >>$tmp.c
if test $? -ne 0; then exit $?; fi
mv $tmp.c $outprefix.c
rm $tmp.awk
exit 0

Просмотреть файл

@ -0,0 +1,50 @@
/**
* MPI-calls of MPI-2-standard (One-Sided Communications)
*
* @see MPI-2 standard
*
* @author Bettina Krammer, Katrin Bidmon, Matthias Mueller, Tobias Hilbrich
* Matthias Jurenz
*
* For Fortran we need additional information for the arguments.
* That is necessary for the handle conversion for MPI-Implementations like
* OpenMPI.
* We need for all MPI-Handles of pointer type information how the argument
* is used. That means we have to know whether it is:
* * an out single value
* * an in-out single value
* * an array for input purpoeses
* * an out array for output purposes
* * an in-out array
* For the arrays we additionally need to know their size !
* We have to denote all this in the argument name, so we will append at the
* end of these argument names:
* * _CLASS_SINGLE_IN for an in single value
* (this is often used for requests)
* * _CLASS_SINGLE_OUT for an out single value
* * _CLASS_SINGLE_IO for an in-out single value
* * _CLASS_BUFFER a buffer that can be MPI_BOTTOM
* * _CLASS_BUFFER_IN_PLACE a buffer that can be MPI_BOTTOM
* and/or MPI_IN_PLACE
* * _CLASS_ARRAY_IN_sizeargument an array for input purpoeses
* * _CLASS_ARRAY_OUT_sizeargument an out array for output purposes
* * _CLASS_ARRAY_IO_sizeargument an in-out array
* Where "sizeargument" is the fixed numeric size or the argument speci-
* fing the array size.
* Otherwise we would have to create the wrapper manually.
*
**/
VT_MPI_INT MPI_Accumulate(void* origin_addr_CLASS_BUFFER, VT_MPI_INT origin_count, MPI_Datatype origin_datatype, VT_MPI_INT target_rank, MPI_Aint target_disp, VT_MPI_INT target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win);
VT_MPI_INT MPI_Get(void* origin_addr_CLASS_BUFFER, VT_MPI_INT origin_count, MPI_Datatype origin_datatype, VT_MPI_INT target_rank, MPI_Aint target_disp, VT_MPI_INT target_count, MPI_Datatype target_datatype, MPI_Win win);
VT_MPI_INT MPI_Put(void* origin_addr_CLASS_BUFFER, VT_MPI_INT origin_count, MPI_Datatype origin_datatype, VT_MPI_INT target_rank, MPI_Aint target_disp, VT_MPI_INT target_count, MPI_Datatype target_datatype, MPI_Win win);
VT_MPI_INT MPI_Win_complete(MPI_Win win);
VT_MPI_INT MPI_Win_create(void* base, MPI_Aint size, VT_MPI_INT disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win* win_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Win_fence(VT_MPI_INT assert, MPI_Win win);
VT_MPI_INT MPI_Win_free(MPI_Win* win_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Win_lock(VT_MPI_INT lock_type, VT_MPI_INT rank, VT_MPI_INT assert, MPI_Win win);
VT_MPI_INT MPI_Win_post(MPI_Group group, VT_MPI_INT assert, MPI_Win win);
VT_MPI_INT MPI_Win_start(MPI_Group group, VT_MPI_INT assert, MPI_Win win);
VT_MPI_INT MPI_Win_test(MPI_Win win, VT_MPI_INT* flag);
VT_MPI_INT MPI_Win_unlock(VT_MPI_INT rank, MPI_Win win);
VT_MPI_INT MPI_Win_wait(MPI_Win win);

Просмотреть файл

@ -0,0 +1,39 @@
/**
* MPI-calls of MPI-2-standard (Extended Collective Operations)
*
* @see MPI-2 standard
*
* @author Bettina Krammer, Katrin Bidmon, Matthias Mueller, Tobias Hilbrich
* Matthias Jurenz
*
* For Fortran we need additional information for the arguments.
* That is necessary for the handle conversion for MPI-Implementations like
* OpenMPI.
* We need for all MPI-Handles of pointer type information how the argument
* is used. That means we have to know whether it is:
* * an out single value
* * an in-out single value
* * an array for input purpoeses
* * an out array for output purposes
* * an in-out array
* For the arrays we additionally need to know their size !
* We have to denote all this in the argument name, so we will append at the
* end of these argument names:
* * _CLASS_SINGLE_IN for an in single value
* (this is often used for requests)
* * _CLASS_SINGLE_OUT for an out single value
* * _CLASS_SINGLE_IO for an in-out single value
* * _CLASS_BUFFER a buffer that can be MPI_BOTTOM
* * _CLASS_BUFFER_IN_PLACE a buffer that can be MPI_BOTTOM
* and/or MPI_IN_PLACE
* * _CLASS_ARRAY_IN_sizeargument an array for input purpoeses
* * _CLASS_ARRAY_OUT_sizeargument an out array for output purposes
* * _CLASS_ARRAY_IO_sizeargument an in-out array
* Where "sizeargument" is the fixed numeric size or the argument speci-
* fing the array size.
* Otherwise we would have to create the wrapper manually.
*
**/
VT_MPI_INT MPI_Alltoallw(void* sendbuf_CLASS_BUFFER, VT_MPI_INT* sendcounts, VT_MPI_INT* sdispls, MPI_Datatype* sendtypes_CLASS_ARRAY_IN_sendcounts, void* recvbuf_CLASS_BUFFER, VT_MPI_INT* recvcounts, VT_MPI_INT* rdispls, MPI_Datatype* recvtypes_CLASS_ARRAY_IN_recvcounts, MPI_Comm comm); /*COLL_ALL2ALL*/
VT_MPI_INT MPI_Exscan(void* sendbuf_CLASS_BUFFER, void* recvbuf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); /*COLL_OTHER*/

Просмотреть файл

@ -0,0 +1,92 @@
/**
* MPI-calls of MPI-2-standard (I/O)
*
* @see MPI-2 standard
*
* @author Bettina Krammer, Katrin Bidmon, Matthias Mueller, Tobias Hilbrich
* Matthias Jurenz
*
* For Fortran we need additional information for the arguments.
* That is necessary for the handle conversion for MPI-Implementations like
* OpenMPI.
* We need for all MPI-Handles of pointer type information how the argument
* is used. That means we have to know whether it is:
* * an out single value
* * an in-out single value
* * an array for input purpoeses
* * an out array for output purposes
* * an in-out array
* For the arrays we additionally need to know their size !
* We have to denote all this in the argument name, so we will append at the
* end of these argument names:
* * _CLASS_SINGLE_IN for an in single value
* (this is often used for requests)
* * _CLASS_SINGLE_OUT for an out single value
* * _CLASS_SINGLE_IO for an in-out single value
* * _CLASS_BUFFER a buffer that can be MPI_BOTTOM
* * _CLASS_BUFFER_IN_PLACE a buffer that can be MPI_BOTTOM
* and/or MPI_IN_PLACE
* * _CLASS_ARRAY_IN_sizeargument an array for input purpoeses
* * _CLASS_ARRAY_OUT_sizeargument an out array for output purposes
* * _CLASS_ARRAY_IO_sizeargument an in-out array
* Where "sizeargument" is the fixed numeric size or the argument speci-
* fing the array size.
* Otherwise we would have to create the wrapper manually.
*
**/
VT_MPI_INT MPI_File_call_errhandler(MPI_File fh, VT_MPI_INT errorcode);
VT_MPI_INT MPI_File_create_errhandler(MPI_File_errhandler_fn* function_CLASS_SINGLE_IN, MPI_Errhandler* errhandler_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_get_errhandler(MPI_File file, MPI_Errhandler* errhandler_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler);
VT_MPI_INT MPI_File_open(MPI_Comm comm, char* filename_CLASS_SINGLE_IN, VT_MPI_INT amode, MPI_Info info, MPI_File* fh_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_close(MPI_File* fh_CLASS_SINGLE_IO);
VT_MPI_INT MPI_File_delete(char* filename_CLASS_SINGLE_IN, MPI_Info info);
VT_MPI_INT MPI_File_set_size(MPI_File fh, MPI_Offset size);
VT_MPI_INT MPI_File_preallocate(MPI_File fh, MPI_Offset size);
VT_MPI_INT MPI_File_get_size(MPI_File fh, MPI_Offset* size_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_get_group(MPI_File fh, MPI_Group* group_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_get_amode(MPI_File fh, VT_MPI_INT* amode);
VT_MPI_INT MPI_File_set_info(MPI_File fh, MPI_Info info);
VT_MPI_INT MPI_File_get_info(MPI_File fh, MPI_Info* info_used_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, char* datarep_CLASS_SINGLE_IN, MPI_Info info);
VT_MPI_INT MPI_File_get_view(MPI_File fh, MPI_Offset* disp_CLASS_SINGLE_OUT, MPI_Datatype* etype_CLASS_SINGLE_OUT, MPI_Datatype* filetype_CLASS_SINGLE_OUT, char* datarep_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_read_at(MPI_File fh, MPI_Offset offset, void* buf, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_write_at(MPI_File fh, MPI_Offset offset, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_read(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_read_all(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_write(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_write_all(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_iread(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_iwrite(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_seek(MPI_File fh, MPI_Offset offset, VT_MPI_INT whence);
VT_MPI_INT MPI_File_get_position(MPI_File fh, MPI_Offset* offset_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset* disp_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_read_shared(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_write_shared(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_iread_shared(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_iwrite_shared(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_read_ordered(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_write_ordered(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, VT_MPI_INT whence);
VT_MPI_INT MPI_File_get_position_shared(MPI_File fh, MPI_Offset* offset_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_read_at_all_begin(MPI_File fh, MPI_Offset offset, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype);
VT_MPI_INT MPI_File_read_at_all_end(MPI_File fh, void* buf, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_write_at_all_begin(MPI_File fh, MPI_Offset offset, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype);
VT_MPI_INT MPI_File_write_at_all_end(MPI_File fh, void* buf, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_read_all_begin(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype);
VT_MPI_INT MPI_File_read_all_end(MPI_File fh, void* buf, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_write_all_begin(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype);
VT_MPI_INT MPI_File_write_all_end(MPI_File fh, void* buf, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_read_ordered_begin(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype);
VT_MPI_INT MPI_File_read_ordered_end(MPI_File fh, void* buf, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_write_ordered_begin(MPI_File fh, void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype);
VT_MPI_INT MPI_File_write_ordered_end(MPI_File fh, void* buf, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, MPI_Aint* extent_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_File_set_atomicity(MPI_File fh, VT_MPI_INT flag);
VT_MPI_INT MPI_File_get_atomicity(MPI_File fh, VT_MPI_INT* flag);
VT_MPI_INT MPI_File_sync(MPI_File fh);

Просмотреть файл

@ -0,0 +1,49 @@
/**
* MPI-calls of MPI-2-standard (Process Creation and Management)
*
* @see MPI-2 standard
*
* @author Bettina Krammer, Katrin Bidmon, Matthias Mueller, Tobias Hilbrich
* Matthias Jurenz
*
* For Fortran we need additional information for the arguments.
* That is necessary for the handle conversion for MPI-Implementations like
* OpenMPI.
* We need for all MPI-Handles of pointer type information how the argument
* is used. That means we have to know whether it is:
* * an out single value
* * an in-out single value
* * an array for input purpoeses
* * an out array for output purposes
* * an in-out array
* For the arrays we additionally need to know their size !
* We have to denote all this in the argument name, so we will append at the
* end of these argument names:
* * _CLASS_SINGLE_IN for an in single value
* (this is often used for requests)
* * _CLASS_SINGLE_OUT for an out single value
* * _CLASS_SINGLE_IO for an in-out single value
* * _CLASS_BUFFER a buffer that can be MPI_BOTTOM
* * _CLASS_BUFFER_IN_PLACE a buffer that can be MPI_BOTTOM
* and/or MPI_IN_PLACE
* * _CLASS_ARRAY_IN_sizeargument an array for input purpoeses
* * _CLASS_ARRAY_OUT_sizeargument an out array for output purposes
* * _CLASS_ARRAY_IO_sizeargument an in-out array
* Where "sizeargument" is the fixed numeric size or the argument speci-
* fing the array size.
* Otherwise we would have to create the wrapper manually.
*
**/
VT_MPI_INT MPI_Close_port(char* port_name_CLASS_SINGLE_IN);
VT_MPI_INT MPI_Comm_accept(char* port_name_CLASS_SINGLE_IN, MPI_Info info, VT_MPI_INT root, MPI_Comm comm, MPI_Comm* newcomm_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_connect(char* port_name_CLASS_SINGLE_IN, MPI_Info info, VT_MPI_INT root, MPI_Comm comm, MPI_Comm* newcomm_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_disconnect(MPI_Comm* comm_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Comm_get_parent(MPI_Comm* parent_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_join(VT_MPI_INT fd, MPI_Comm* intercomm_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_spawn(char* command_CLASS_SINGLE_IN, char** argv, VT_MPI_INT maxprocs, MPI_Info info, VT_MPI_INT root, MPI_Comm comm, MPI_Comm* intercomm_CLASS_SINGLE_OUT, VT_MPI_INT* array_of_errcodes);
VT_MPI_INT MPI_Comm_spawn_multiple(VT_MPI_INT count, char** array_of_commands, char*** array_of_argv, VT_MPI_INT* array_of_maxprocs, MPI_Info* array_of_info_CLASS_ARRAY_IN_count, VT_MPI_INT root, MPI_Comm comm, MPI_Comm* intercomm_CLASS_SINGLE_OUT, VT_MPI_INT* array_of_errcodes);
VT_MPI_INT MPI_Lookup_name(char* service_name_CLASS_SINGLE_IN, MPI_Info info, char* port_name_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Open_port(MPI_Info info, char* port_name_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Publish_name(char* service_name_CLASS_SINGLE_IN, MPI_Info info, char* port_name_CLASS_SINGLE_IN);
VT_MPI_INT MPI_Unpublish_name(char* service_name_CLASS_SINGLE_IN, MPI_Info info, char* port_name_CLASS_SINGLE_IN);

Просмотреть файл

@ -0,0 +1,105 @@
/**
* MPI-calls of MPI-2-standard (Miscellany and External Interfaces)
*
* @see MPI-2 standard
*
* @author Bettina Krammer, Katrin Bidmon, Matthias Mueller, Tobias Hilbrich
* Matthias Jurenz
*
* For Fortran we need additional information for the arguments.
* That is necessary for the handle conversion for MPI-Implementations like
* OpenMPI.
* We need for all MPI-Handles of pointer type information how the argument
* is used. That means we have to know whether it is:
* * an out single value
* * an in-out single value
* * an array for input purpoeses
* * an out array for output purposes
* * an in-out array
* For the arrays we additionally need to know their size !
* We have to denote all this in the argument name, so we will append at the
* end of these argument names:
* * _CLASS_SINGLE_IN for an in single value
* (this is often used for requests)
* * _CLASS_SINGLE_OUT for an out single value
* * _CLASS_SINGLE_IO for an in-out single value
* * _CLASS_BUFFER a buffer that can be MPI_BOTTOM
* * _CLASS_BUFFER_IN_PLACE a buffer that can be MPI_BOTTOM
* and/or MPI_IN_PLACE
* * _CLASS_ARRAY_IN_sizeargument an array for input purpoeses
* * _CLASS_ARRAY_OUT_sizeargument an out array for output purposes
* * _CLASS_ARRAY_IO_sizeargument an in-out array
* Where "sizeargument" is the fixed numeric size or the argument speci-
* fing the array size.
* Otherwise we would have to create the wrapper manually.
*
**/
/* Miscellany */
VT_MPI_INT MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void* baseptr);
VT_MPI_INT MPI_Comm_create_errhandler(MPI_Comm_errhandler_fn* function, MPI_Errhandler* errhandler_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler* errhandler_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler);
VT_MPI_INT MPI_Finalized(VT_MPI_INT* flag);
VT_MPI_INT MPI_Free_mem(void* base);
VT_MPI_INT MPI_Get_address(void* location, MPI_Aint* address_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Info_create(MPI_Info* info_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Info_delete(MPI_Info info, char* key_CLASS_SINGLE_IN);
VT_MPI_INT MPI_Info_dup(MPI_Info info, MPI_Info* newinfo_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Info_free(MPI_Info* info_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Info_get(MPI_Info info, char* key_CLASS_SINGLE_IN, VT_MPI_INT valuelen, char* value_CLASS_SINGLE_OUT, VT_MPI_INT* flag);
VT_MPI_INT MPI_Info_get_nkeys(MPI_Info info, VT_MPI_INT* nkeys);
VT_MPI_INT MPI_Info_get_nthkey(MPI_Info info, VT_MPI_INT n, char* key_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Info_get_valuelen(MPI_Info info, char* key_CLASS_SINGLE_IN, VT_MPI_INT* valuelen, VT_MPI_INT* flag);
VT_MPI_INT MPI_Info_set(MPI_Info info, char* key_CLASS_SINGLE_IN, char* value_CLASS_SINGLE_IN);
VT_MPI_INT MPI_Pack_external(char* datarep_CLASS_SINGLE_IN, void* inbuf, VT_MPI_INT incount, MPI_Datatype datatype, void* outbuf, MPI_Aint outsize, MPI_Aint* position_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Pack_external_size(char* datarep_CLASS_SINGLE_IN, VT_MPI_INT incount, MPI_Datatype datatype, MPI_Aint* size_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Request_get_status(MPI_Request request, VT_MPI_INT* flag, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_create_darray(VT_MPI_INT size, VT_MPI_INT rank, VT_MPI_INT ndims, VT_MPI_INT* array_of_gsizes, VT_MPI_INT* array_of_distribs, VT_MPI_INT* array_of_dargs, VT_MPI_INT* array_of_psizes, VT_MPI_INT order, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_create_hindexed(VT_MPI_INT count, VT_MPI_INT* array_of_blocklengths, MPI_Aint* array_of_displacements_CLASS_ARRAY_IN_count, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_create_hvector(VT_MPI_INT count, VT_MPI_INT blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_create_indexed_block(VT_MPI_INT count, VT_MPI_INT blocklength, VT_MPI_INT* array_of_displacements, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_create_struct(VT_MPI_INT count, VT_MPI_INT* array_of_blocklengths, MPI_Aint* array_of_displacements_CLASS_ARRAY_IN_count, MPI_Datatype* array_of_types_CLASS_ARRAY_IN_count, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_create_subarray(VT_MPI_INT ndims, VT_MPI_INT* array_of_sizes, VT_MPI_INT* array_of_subsizes, VT_MPI_INT* array_of_starts, VT_MPI_INT order, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint* lb_CLASS_SINGLE_OUT, MPI_Aint* extent_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint* true_lb_CLASS_SINGLE_OUT, MPI_Aint* true_extent_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Unpack_external(char* datarep_CLASS_SINGLE_IN, void* inbuf, MPI_Aint insize, MPI_Aint* position_CLASS_SINGLE_IO, void* outbuf, VT_MPI_INT outcount, MPI_Datatype datatype);
VT_MPI_INT MPI_Win_create_errhandler(MPI_Win_errhandler_fn* function, MPI_Errhandler* errhandler_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler* errhandler_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler);
/* External Interfaces */
VT_MPI_INT MPI_Add_error_class(VT_MPI_INT* errorclass);
VT_MPI_INT MPI_Add_error_code(VT_MPI_INT errorclass, VT_MPI_INT* errorcode);
VT_MPI_INT MPI_Add_error_string(VT_MPI_INT errorcode, char* string_CLASS_SINGLE_IN);
VT_MPI_INT MPI_Comm_call_errhandler(MPI_Comm comm, VT_MPI_INT errorcode);
VT_MPI_INT MPI_Comm_create_keyval(MPI_Comm_copy_attr_function* comm_copy_attr_fn, MPI_Comm_delete_attr_function* comm_delete_attr_fn, VT_MPI_INT* comm_keyval, void* extra_state);
VT_MPI_INT MPI_Comm_delete_attr(MPI_Comm comm, VT_MPI_INT comm_keyval);
VT_MPI_INT MPI_Comm_free_keyval(VT_MPI_INT* comm_keyval);
VT_MPI_INT MPI_Comm_get_attr(MPI_Comm comm, VT_MPI_INT comm_keyval, void* attribute_val, VT_MPI_INT* flag);
VT_MPI_INT MPI_Comm_get_name(MPI_Comm comm, char* comm_name_CLASS_SINGLE_OUT, VT_MPI_INT* resultlen);
VT_MPI_INT MPI_Comm_set_attr(MPI_Comm comm, VT_MPI_INT comm_keyval, void* attribute_val);
VT_MPI_INT MPI_Comm_set_name(MPI_Comm comm, char* comm_name_CLASS_SINGLE_IN);
VT_MPI_INT MPI_Grequest_complete(MPI_Request request);
VT_MPI_INT MPI_Grequest_start(MPI_Grequest_query_function* query_fn, MPI_Grequest_free_function* free_fn, MPI_Grequest_cancel_function* cancel_fn, void* extra_state, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Status_set_cancelled(MPI_Status* status_CLASS_SINGLE_IO, VT_MPI_INT flag);
VT_MPI_INT MPI_Status_set_elements(MPI_Status* status_CLASS_SINGLE_IO, MPI_Datatype datatype, VT_MPI_INT count);
VT_MPI_INT MPI_Type_create_keyval(MPI_Type_copy_attr_function* type_copy_attr_fn, MPI_Type_delete_attr_function* type_delete_attr_fn, VT_MPI_INT* type_keyval, void* extra_state);
VT_MPI_INT MPI_Type_delete_attr(MPI_Datatype type, VT_MPI_INT type_keyval);
VT_MPI_INT MPI_Type_dup(MPI_Datatype type, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_free_keyval(VT_MPI_INT* type_keyval);
VT_MPI_INT MPI_Type_get_attr(MPI_Datatype type, VT_MPI_INT type_keyval, void* attribute_val, VT_MPI_INT* flag);
VT_MPI_INT MPI_Type_get_contents(MPI_Datatype datatype, VT_MPI_INT max_integers, VT_MPI_INT max_addresses, VT_MPI_INT max_datatypes, VT_MPI_INT* array_of_integers, MPI_Aint* array_of_addresses_CLASS_ARRAY_OUT_max_addresses, MPI_Datatype* array_of_datatypes_CLASS_ARRAY_OUT_max_datatypes);
VT_MPI_INT MPI_Type_get_envelope(MPI_Datatype datatype, VT_MPI_INT* num_integers, VT_MPI_INT* num_addresses, VT_MPI_INT* num_datatypes, VT_MPI_INT* combiner);
VT_MPI_INT MPI_Type_get_name(MPI_Datatype type, char* type_name_CLASS_SINGLE_OUT, VT_MPI_INT* resultlen);
VT_MPI_INT MPI_Type_set_attr(MPI_Datatype type, VT_MPI_INT type_keyval, void* attribute_val);
VT_MPI_INT MPI_Type_set_name(MPI_Datatype type, char* type_name_CLASS_SINGLE_IN);
VT_MPI_INT MPI_Win_call_errhandler(MPI_Win win, VT_MPI_INT errorcode);
VT_MPI_INT MPI_Win_create_keyval(MPI_Win_copy_attr_function* win_copy_attr_fn, MPI_Win_delete_attr_function* win_delete_attr_fn, VT_MPI_INT* win_keyval, void* extra_state);
VT_MPI_INT MPI_Win_delete_attr(MPI_Win win, VT_MPI_INT win_keyval);
VT_MPI_INT MPI_Win_free_keyval(VT_MPI_INT* win_keyval);
VT_MPI_INT MPI_Win_get_attr(MPI_Win win, VT_MPI_INT win_keyval, void* attribute_val, VT_MPI_INT* flag);
VT_MPI_INT MPI_Win_get_name(MPI_Win win, char* win_name_CLASS_SINGLE_OUT, VT_MPI_INT* resultlen);
VT_MPI_INT MPI_Win_set_attr(MPI_Win win, VT_MPI_INT win_keyval, void* attribute_val);
VT_MPI_INT MPI_Win_set_name(MPI_Win win, char* win_name_CLASS_SINGLE_IN);

Просмотреть файл

@ -0,0 +1,40 @@
/**
* MPI-calls of MPI-2-standard (Miscellany and External Interfaces)
*
* @see MPI-2 standard
*
* @author Bettina Krammer, Katrin Bidmon, Matthias Mueller, Tobias Hilbrich
* Matthias Jurenz
*
* For Fortran we need additional information for the arguments.
* That is necessary for the handle conversion for MPI-Implementations like
* OpenMPI.
* We need for all MPI-Handles of pointer type information how the argument
* is used. That means we have to know whether it is:
* * an out single value
* * an in-out single value
* * an array for input purpoeses
* * an out array for output purposes
* * an in-out array
* For the arrays we additionally need to know their size !
* We have to denote all this in the argument name, so we will append at the
* end of these argument names:
* * _CLASS_SINGLE_IN for an in single value
* (this is often used for requests)
* * _CLASS_SINGLE_OUT for an out single value
* * _CLASS_SINGLE_IO for an in-out single value
* * _CLASS_BUFFER a buffer that can be MPI_BOTTOM
* * _CLASS_BUFFER_IN_PLACE a buffer that can be MPI_BOTTOM
* and/or MPI_IN_PLACE
* * _CLASS_ARRAY_IN_sizeargument an array for input purpoeses
* * _CLASS_ARRAY_OUT_sizeargument an out array for output purposes
* * _CLASS_ARRAY_IO_sizeargument an in-out array
* Where "sizeargument" is the fixed numeric size or the argument speci-
* fing the array size.
* Otherwise we would have to create the wrapper manually.
*
**/
VT_MPI_INT MPI_Init_thread(VT_MPI_INT* argc, char*** argv, VT_MPI_INT required, VT_MPI_INT* provided);
VT_MPI_INT MPI_Is_thread_main(VT_MPI_INT* flag);
VT_MPI_INT MPI_Query_thread(VT_MPI_INT* provided);

Просмотреть файл

@ -0,0 +1,166 @@
/**
* MPI-calls of MPI-1.2-standard (Complete C Language Binding)
*
* @see MPI-1.2 standard
*
* @author Bettina Krammer, Katrin Bidmon, Matthias Mueller, Tobias Hilbrich
* Matthias Jurenz
*
* For Fortran we need additional information for the arguments.
* That is necessary for the handle conversion for MPI-Implementations like
* OpenMPI.
* We need for all MPI-Handles of pointer type information how the argument
* is used. That means we have to know whether it is:
* * an out single value
* * an in-out single value
* * an array for input purpoeses
* * an out array for output purposes
* * an in-out array
* For the arrays we additionally need to know their size !
* We have to denote all this in the argument name, so we will append at the
* end of these argument names:
* * _CLASS_SINGLE_IN for an in single value
* (this is often used for requests)
* * _CLASS_SINGLE_OUT for an out single value
* * _CLASS_SINGLE_IO for an in-out single value
* * _CLASS_BUFFER a buffer that can be MPI_BOTTOM
* * _CLASS_BUFFER_IN_PLACE a buffer that can be MPI_BOTTOM
* and/or MPI_IN_PLACE
* * _CLASS_ARRAY_IN_sizeargument an array for input purpoeses
* * _CLASS_ARRAY_OUT_sizeargument an out array for output purposes
* * _CLASS_ARRAY_IO_sizeargument an in-out array
* Where "sizeargument" is the fixed numeric size or the argument speci-
* fing the array size.
* Otherwise we would have to create the wrapper manually.
*
**/
VT_MPI_INT MPI_Abort(MPI_Comm comm, VT_MPI_INT errorcode);
VT_MPI_INT MPI_Address(void* location, MPI_Aint* address_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Allgather(void* sendbuf_CLASS_BUFFER_IN_PLACE, VT_MPI_INT sendcount, MPI_Datatype sendtype, void* recvbuf_CLASS_BUFFER, VT_MPI_INT recvcount, MPI_Datatype recvtype, MPI_Comm comm); /*COLL_ALL2ALL*/
VT_MPI_INT MPI_Allgatherv(void* sendbuf_CLASS_BUFFER_IN_PLACE, VT_MPI_INT sendcount, MPI_Datatype sendtype, void* recvbuf_CLASS_BUFFER, VT_MPI_INT* recvcounts, VT_MPI_INT* displs, MPI_Datatype recvtype, MPI_Comm comm); /*COLL_ALL2ALL*/
VT_MPI_INT MPI_Allreduce(void* sendbuf_CLASS_BUFFER_IN_PLACE, void* recvbuf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); /*COLL_ALL2ALL*/
VT_MPI_INT MPI_Alltoall(void* sendbuf_CLASS_BUFFER_IN_PLACE, VT_MPI_INT sendcount, MPI_Datatype sendtype, void* recvbuf_CLASS_BUFFER, VT_MPI_INT recvcount, MPI_Datatype recvtype, MPI_Comm comm); /*COLL_ALL2ALL*/
VT_MPI_INT MPI_Alltoallv(void* sendbuf_CLASS_BUFFER_IN_PLACE, VT_MPI_INT* sendcounts, VT_MPI_INT* sdispls, MPI_Datatype sendtype, void* recvbuf_CLASS_BUFFER, VT_MPI_INT* recvcounts, VT_MPI_INT* rdispls, MPI_Datatype recvtype, MPI_Comm comm); /*COLL_ALL2ALL*/
VT_MPI_INT MPI_Attr_delete(MPI_Comm comm, VT_MPI_INT keyval);
VT_MPI_INT MPI_Attr_get(MPI_Comm comm, VT_MPI_INT keyval, void* attribute_val, VT_MPI_INT* flag);
VT_MPI_INT MPI_Attr_put(MPI_Comm comm, VT_MPI_INT keyval, void* attribute_val);
VT_MPI_INT MPI_Barrier(MPI_Comm comm); /*COLL_BARRIER*/
VT_MPI_INT MPI_Bcast(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT root, MPI_Comm comm); /*COLL_ONE2ALL*/
VT_MPI_INT MPI_Bsend(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm);
VT_MPI_INT MPI_Bsend_init(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Buffer_attach(void* buf, VT_MPI_INT size);
VT_MPI_INT MPI_Buffer_detach(void* buf, VT_MPI_INT* size);
VT_MPI_INT MPI_Cancel(MPI_Request* request_CLASS_SINGLE_IN);
VT_MPI_INT MPI_Cart_coords(MPI_Comm comm, VT_MPI_INT rank, VT_MPI_INT maxdims, VT_MPI_INT* coords);
VT_MPI_INT MPI_Cart_create(MPI_Comm comm_old, VT_MPI_INT ndims, VT_MPI_INT* dims, VT_MPI_INT* periods, VT_MPI_INT reorder, MPI_Comm* comm_cart_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Cart_get(MPI_Comm comm, VT_MPI_INT maxdims, VT_MPI_INT* dims, VT_MPI_INT* periods, VT_MPI_INT* coords);
VT_MPI_INT MPI_Cart_map(MPI_Comm comm, VT_MPI_INT ndims, VT_MPI_INT* dims, VT_MPI_INT* periods, VT_MPI_INT* newrank);
VT_MPI_INT MPI_Cart_rank(MPI_Comm comm, VT_MPI_INT* coords, VT_MPI_INT* rank);
VT_MPI_INT MPI_Cart_shift(MPI_Comm comm, VT_MPI_INT direction, VT_MPI_INT disp, VT_MPI_INT* rank_source, VT_MPI_INT* rank_dest);
VT_MPI_INT MPI_Cart_sub(MPI_Comm comm, VT_MPI_INT* remain_dims, MPI_Comm* newcomm_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Cartdim_get(MPI_Comm comm, VT_MPI_INT* ndims);
VT_MPI_INT MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, VT_MPI_INT* _result);
VT_MPI_INT MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm* newcomm_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_dup(MPI_Comm comm, MPI_Comm* newcomm_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_free(MPI_Comm* comm_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Comm_group(MPI_Comm comm, MPI_Group* group_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_rank(MPI_Comm comm, VT_MPI_INT* rank);
VT_MPI_INT MPI_Comm_remote_group(MPI_Comm comm, MPI_Group* group_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_remote_size(MPI_Comm comm, VT_MPI_INT* size);
VT_MPI_INT MPI_Comm_size(MPI_Comm comm, VT_MPI_INT* size);
VT_MPI_INT MPI_Comm_split(MPI_Comm comm, VT_MPI_INT color, VT_MPI_INT key, MPI_Comm* newcomm_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Comm_test_inter(MPI_Comm comm, VT_MPI_INT* flag);
VT_MPI_INT MPI_Dims_create(VT_MPI_INT nnodes, VT_MPI_INT ndims, VT_MPI_INT* dims);
VT_MPI_INT MPI_Errhandler_create(MPI_Handler_function* function, MPI_Errhandler* errhandler_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Errhandler_free(MPI_Errhandler* errhandler_CLASS_SINGLE_IN);
VT_MPI_INT MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler* errhandler_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler);
VT_MPI_INT MPI_Error_class(VT_MPI_INT errorcode, VT_MPI_INT* errorclass);
VT_MPI_INT MPI_Error_string(VT_MPI_INT errorcode, char* string_CLASS_SINGLE_OUT, VT_MPI_INT* resultlen);
VT_MPI_INT MPI_Finalize(void);
VT_MPI_INT MPI_Gather(void* sendbuf_CLASS_BUFFER_IN_PLACE, VT_MPI_INT sendcount, MPI_Datatype sendtype, void* recvbuf_CLASS_BUFFER, VT_MPI_INT recvcount, MPI_Datatype recvtype, VT_MPI_INT root, MPI_Comm comm); /*COLL_ALL2ONE*/
VT_MPI_INT MPI_Gatherv(void* sendbuf_CLASS_BUFFER_IN_PLACE, VT_MPI_INT sendcount, MPI_Datatype sendtype, void* recvbuf_CLASS_BUFFER, VT_MPI_INT* recvcounts, VT_MPI_INT* displs, MPI_Datatype recvtype, VT_MPI_INT root, MPI_Comm comm); /*COLL_ALL2ONE*/
VT_MPI_INT MPI_Get_count(MPI_Status* status_CLASS_SINGLE_IN, MPI_Datatype datatype, VT_MPI_INT* count);
VT_MPI_INT MPI_Get_elements(MPI_Status* status_CLASS_SINGLE_IN, MPI_Datatype datatype, VT_MPI_INT* count);
VT_MPI_INT MPI_Get_processor_name(char* name_CLASS_SINGLE_OUT, VT_MPI_INT* resultlen);
VT_MPI_INT MPI_Get_version(VT_MPI_INT* version, VT_MPI_INT* subversion);
VT_MPI_INT MPI_Graph_create(MPI_Comm comm_old, VT_MPI_INT nnodes, VT_MPI_INT* index, VT_MPI_INT* edges, VT_MPI_INT reorder, MPI_Comm* comm_graph_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Graph_get(MPI_Comm comm, VT_MPI_INT maxindex, VT_MPI_INT maxedges, VT_MPI_INT* index, VT_MPI_INT* edges);
VT_MPI_INT MPI_Graph_map(MPI_Comm comm, VT_MPI_INT nnodes, VT_MPI_INT* index, VT_MPI_INT* edges, VT_MPI_INT* newrank);
VT_MPI_INT MPI_Graph_neighbors(MPI_Comm comm, VT_MPI_INT rank, VT_MPI_INT maxneighbors, VT_MPI_INT* neighbors);
VT_MPI_INT MPI_Graph_neighbors_count(MPI_Comm comm, VT_MPI_INT rank, VT_MPI_INT* nneighbors);
VT_MPI_INT MPI_Graphdims_get(MPI_Comm comm, VT_MPI_INT* nnodes, VT_MPI_INT* nedges);
VT_MPI_INT MPI_Group_compare(MPI_Group group1,MPI_Group group2, VT_MPI_INT* _result);
VT_MPI_INT MPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group* newgroup_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Group_excl(MPI_Group group, VT_MPI_INT n, VT_MPI_INT* ranks, MPI_Group* newgroup_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Group_free(MPI_Group* group_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Group_incl(MPI_Group group, VT_MPI_INT n, VT_MPI_INT* ranks, MPI_Group* newgroup_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group* newgroup_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Group_range_excl(MPI_Group group, VT_MPI_INT n, VT_MPI_INT ranges[][3], MPI_Group* newgroup_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Group_range_incl(MPI_Group group, VT_MPI_INT n, VT_MPI_INT ranges[][3], MPI_Group* newgroup_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Group_rank(MPI_Group group, VT_MPI_INT* rank);
VT_MPI_INT MPI_Group_size(MPI_Group group, VT_MPI_INT* size);
VT_MPI_INT MPI_Group_translate_ranks(MPI_Group group1, VT_MPI_INT n, VT_MPI_INT* ranks1, MPI_Group group2, VT_MPI_INT* ranks2);
VT_MPI_INT MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group* newgroup_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Ibsend(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Init(VT_MPI_INT* argc, char*** argv);
VT_MPI_INT MPI_Initialized(VT_MPI_INT* flag);
VT_MPI_INT MPI_Intercomm_create(MPI_Comm local_comm, VT_MPI_INT local_leader, MPI_Comm peer_comm, VT_MPI_INT remote_leader, VT_MPI_INT tag, MPI_Comm* newintercomm_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Intercomm_merge(MPI_Comm intercomm, VT_MPI_INT high, MPI_Comm* newintracomm_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Iprobe(VT_MPI_INT source, VT_MPI_INT tag, MPI_Comm comm, VT_MPI_INT* flag, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Irecv(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT source, VT_MPI_INT tag, MPI_Comm comm, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Irsend(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Isend(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Issend(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Keyval_create(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_fn, VT_MPI_INT* keyval, void* extra_state);
VT_MPI_INT MPI_Keyval_free(VT_MPI_INT* keyval);
VT_MPI_INT MPI_Op_create(MPI_User_function* function, VT_MPI_INT commute, MPI_Op* op_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Op_free( MPI_Op* op_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Pack(void* inbuf_CLASS_BUFFER, VT_MPI_INT incount, MPI_Datatype datatype, void* outbuf, VT_MPI_INT outsize, VT_MPI_INT* position, MPI_Comm comm);
VT_MPI_INT MPI_Pack_size(VT_MPI_INT incount, MPI_Datatype datatype, MPI_Comm comm, VT_MPI_INT* size);
VT_MPI_INT MPI_Pcontrol(VT_MPI_INT level, ...);
VT_MPI_INT MPI_Probe(VT_MPI_INT source, VT_MPI_INT tag, MPI_Comm comm, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Recv(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT source, VT_MPI_INT tag, MPI_Comm comm, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Recv_init(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT source, VT_MPI_INT tag, MPI_Comm comm, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Reduce(void* sendbuf_CLASS_BUFFER_IN_PLACE, void* recvbuf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Op op, VT_MPI_INT root, MPI_Comm comm); /*COLL_ALL2ONE*/
VT_MPI_INT MPI_Reduce_scatter(void* sendbuf_CLASS_BUFFER_IN_PLACE, void* recvbuf_CLASS_BUFFER, VT_MPI_INT* recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); /*COLL_ALL2ALL*/
VT_MPI_INT MPI_Request_free(MPI_Request* request_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Rsend(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm);
VT_MPI_INT MPI_Rsend_init(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Scan(void* sendbuf_CLASS_BUFFER_IN_PLACE, void* recvbuf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); /*COLL_OTHER*/
VT_MPI_INT MPI_Scatter(void* sendbuf_CLASS_BUFFER_IN_PLACE, VT_MPI_INT sendcount, MPI_Datatype sendtype, void* recvbuf_CLASS_BUFFER, VT_MPI_INT recvcount, MPI_Datatype recvtype, VT_MPI_INT root, MPI_Comm comm); /*COLL_ONE2ALL*/
VT_MPI_INT MPI_Scatterv(void* sendbuf_CLASS_BUFFER_IN_PLACE, VT_MPI_INT* sendcounts, VT_MPI_INT* displs, MPI_Datatype sendtype, void* recvbuf_CLASS_BUFFER, VT_MPI_INT recvcount, MPI_Datatype recvtype, VT_MPI_INT root, MPI_Comm comm); /*COLL_ONE2ALL*/
VT_MPI_INT MPI_Send(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm);
VT_MPI_INT MPI_Send_init(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Sendrecv(void* sendbuf_CLASS_BUFFER, VT_MPI_INT sendcount, MPI_Datatype sendtype, VT_MPI_INT dest, VT_MPI_INT sendtag, void* recvbuf_CLASS_BUFFER, VT_MPI_INT recvcount, MPI_Datatype recvtype, VT_MPI_INT source, VT_MPI_INT recvtag, MPI_Comm comm, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Sendrecv_replace(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT sendtag, VT_MPI_INT source, VT_MPI_INT recvtag, MPI_Comm comm, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Ssend(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm);
VT_MPI_INT MPI_Ssend_init(void* buf_CLASS_BUFFER, VT_MPI_INT count, MPI_Datatype datatype, VT_MPI_INT dest, VT_MPI_INT tag, MPI_Comm comm, MPI_Request* request_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Start(MPI_Request* request_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Startall(VT_MPI_INT count, MPI_Request* array_of_requests_CLASS_ARRAY_IO_count);
VT_MPI_INT MPI_Test(MPI_Request* request_CLASS_SINGLE_IO, VT_MPI_INT* flag, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Test_cancelled(MPI_Status* status_CLASS_SINGLE_IN, VT_MPI_INT* flag);
VT_MPI_INT MPI_Testall(VT_MPI_INT count, MPI_Request* array_of_requests_CLASS_ARRAY_IO_count, VT_MPI_INT* flag, MPI_Status* array_of_statuses_CLASS_ARRAY_OUT_count);
VT_MPI_INT MPI_Testany(VT_MPI_INT count, MPI_Request* array_of_requests_CLASS_ARRAY_IO_count, VT_MPI_INT* index_CLASS_ARRAYINDEX_OUT_SINGLE_CONDITION_flag, VT_MPI_INT* flag, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Testsome(VT_MPI_INT incount, MPI_Request* array_of_requests_CLASS_ARRAY_IO_incount, VT_MPI_INT* outcount, VT_MPI_INT* array_of_indices_CLASS_ARRAYINDEX_OUT_ARRAY_outcount, MPI_Status* array_of_statuses_CLASS_ARRAY_OUT_outcount);
VT_MPI_INT MPI_Topo_test(MPI_Comm comm, VT_MPI_INT* status);
VT_MPI_INT MPI_Type_commit(MPI_Datatype* datatype_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Type_contiguous(VT_MPI_INT count, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_extent(MPI_Datatype datatype, MPI_Aint* extent_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_free(MPI_Datatype* datatype_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Type_hindexed(VT_MPI_INT count, VT_MPI_INT* array_of_blocklengths, MPI_Aint* array_of_displacements_CLASS_ARRAY_IN_count, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_hvector(VT_MPI_INT count, VT_MPI_INT blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_indexed(VT_MPI_INT count, VT_MPI_INT* array_of_blocklengths, VT_MPI_INT* array_of_displacements, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_lb(MPI_Datatype datatype, MPI_Aint* displacement_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_size(MPI_Datatype datatype, VT_MPI_INT* size);
VT_MPI_INT MPI_Type_struct(VT_MPI_INT count, VT_MPI_INT* array_of_blocklengths, MPI_Aint* array_of_displacements_CLASS_ARRAY_IN_count, MPI_Datatype* array_of_types_CLASS_ARRAY_IN_count, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_ub(MPI_Datatype datatype, MPI_Aint* displacement_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_vector(VT_MPI_INT count, VT_MPI_INT blocklength, VT_MPI_INT stride, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Unpack(void* inbuf, VT_MPI_INT insize, VT_MPI_INT* position, void* outbuf_CLASS_BUFFER, VT_MPI_INT outcount, MPI_Datatype datatype, MPI_Comm comm);
VT_MPI_INT MPI_Wait(MPI_Request* request_CLASS_SINGLE_IO, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Waitall(VT_MPI_INT count, MPI_Request* array_of_requests_CLASS_ARRAY_IO_count, MPI_Status* array_of_statuses_CLASS_ARRAY_OUT_count);
VT_MPI_INT MPI_Waitany(VT_MPI_INT count, MPI_Request* array_of_requests_CLASS_ARRAY_IO_count, VT_MPI_INT* index_CLASS_ARRAYINDEX_OUT_SINGLE_NOCONDITION, MPI_Status* status_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Waitsome(VT_MPI_INT incount, MPI_Request* array_of_requests_CLASS_ARRAY_IO_incount, VT_MPI_INT* outcount, VT_MPI_INT* array_of_indices_CLASS_ARRAYINDEX_OUT_ARRAY_outcount, MPI_Status* array_of_statuses_CLASS_ARRAY_OUT_outcount);
double MPI_Wtick(void);
double MPI_Wtime(void);

Просмотреть файл

@ -1,5 +1,5 @@
#ifndef _CONFIG_H
#error "config_bottom.h should only be included from config.h"
# error "config_bottom.h should only be included from config.h"
#endif /* _CONFIG_H */
#include "util/util.h"
@ -38,10 +38,22 @@
# define vt_fnmatch(_pattern, _string, __flags) strcmp(_string, _pattern)
#endif /* HAVE_FNMATCH_H */
#include <limits.h>
#if defined(HAVE_SYS_PARAM_H) && HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#if defined(MIN)
# define VT_MIN MIN
#else
# define VT_MIN(a,b) (((a)<(b))?(a):(b))
#endif
#if defined(MAX)
# define VT_MAX MAX
#else
# define VT_MAX(a,b) (((a)>(b))?(a):(b))
#endif
#include <limits.h>
#if defined(PATH_MAX)
# define VT_PATH_MAX (PATH_MAX + 1)
#elif defined(_POSIX_PATH_MAX)

Просмотреть файл

@ -2,17 +2,25 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60)
AC_INIT(VampirTrace, 5.4.11, vampirsupport@zih.tu-dresden.de)
AM_INIT_AUTOMAKE(VampirTrace, 5.4.11)
AC_INIT([VampirTrace], [m4_normalize(esyscmd([cat VERSION]))], [vampirsupport@zih.tu-dresden.de], [VampirTrace])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config/m4)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
# Open MPI: If Automake supports silent rules, enable them.
# If Automake supports silent rules, enable them.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
ACVT_CONF_INIT
ACVT_CONF_TITLE([Initialization])
# Check for platform
ACVT_PLATFORM
# Get configuration options
ACVT_CONF_OPTIONS
# Setup the top and bottom of the config.h file
AH_TOP([
#ifndef _CONFIG_H
@ -29,7 +37,15 @@ cd "$srcdir"
top_vt_srcdir="`pwd`"
cd "$top_vt_builddir"
AC_MSG_NOTICE([builddir: $top_vt_builddir])
eval "echo $top_vt_builddir | grep \" \"" >/dev/null 2>&1
AS_IF([test "$?" = "0"],
[AC_MSG_ERROR([VampirTrace does not allow whitespace in the build directory path!])])
AC_SUBST(top_vt_builddir)
AC_MSG_NOTICE([srcdir: $top_vt_srcdir])
eval "echo $top_vt_srcdir | grep \" \"" >/dev/null 2>&1
AS_IF([test "$?" = "0"],
[AC_MSG_ERROR([VampirTrace does not allow whitespace in the source directory path!])])
AC_SUBST(top_vt_srcdir)
AS_IF([test "$top_vt_builddir" != "$top_vt_srcdir"],
[
AC_MSG_NOTICE([detected VPATH build])
@ -39,8 +55,25 @@ AS_IF([test "$top_vt_builddir" != "$top_vt_srcdir"],
CXXCPPFLAGS='-I$(top_srcdir)'" $CXXCPPFLAGS"
])
# Check for type of host system
AC_CANONICAL_HOST
# Check whether we are inside Open MPI package
# TODO: This option should be hidden in the help text
AC_ARG_WITH(openmpi-inside,
AC_HELP_STRING([--with-openmpi-inside], [configure inside Open MPI]),
[
inside_openmpi="yes"
enable_config_titles="no"
enable_config_summary="no"
# TODO: Avoid building of shared libraries, due to currently unsupported
# OMPI's symbol visibility stuff
enable_static="yes"
enable_shared="no"
])
# Check for file system case sensitivity
ACVT_CSFS
AM_CONDITIONAL(AMHAVECSFS, test x"$have_csfs" = "xyes")
# Correct install paths
AS_IF([test x"$prefix" = "xNONE"], [prefix="$ac_default_prefix"])
@ -63,12 +96,18 @@ AC_PROG_CPP
AC_PROG_CXXCPP
AC_PROG_F77
AC_PROG_FC
AM_PROG_AS
AS_IF([test x"$F77" != x],
[AC_DEFINE([HAVE_F77], [1], [Define to 1 if VT is configured with Fortran 77 support.])])
AM_CONDITIONAL(AMHAVEF77, test x"$F77" != x)
AM_CONDITIONAL(AMHAVEFC, test x"$FC" != x)
AS_IF([test x"$FC" != x],
[AC_DEFINE([HAVE_F90], [1], [Define to 1 if VT is configured with Fortran 90 support.])])
AM_CONDITIONAL(AMHAVEF90, test x"$FC" != x)
# Check cross-build related stuff
ACVT_CROSS
AM_CONDITIONAL(AMHAVECROSSPREFIX, test x"$CROSS_PREFIX" != x)
# Do we want to build and install binaries
AC_ARG_ENABLE(binaries,
@ -77,11 +116,15 @@ AC_ARG_ENABLE(binaries,
[enable_binaries="$enableval"], [enable_binaries="yes"])
AM_CONDITIONAL(AMBUILDBINARIES, test x"$enable_binaries" = "xyes")
# Declare additional variables
AC_ARG_VAR(AR, [archiver command])
AC_ARG_VAR(NM, [command to list symbols from object files])
# Check for programs
AC_ARG_VAR(AR, [archiver command]) #AC_PROG_AR ?
#AC_PROG_AR
AC_CHECK_PROGS(AR, ar, AR=ar)
AC_PROG_RANLIB
AM_PROG_AS
AC_PROG_LN_S
AC_PROG_AWK
ACVT_CONF_TITLE([Header files, types, and functions])
@ -108,28 +151,35 @@ AC_CHECK_DECL([__va_copy],
[], [#include <stdarg.h>])
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strdup])
# Check for libtool
ACVT_CONF_TITLE([Libtool])
AS_IF([test "$PLATFORM" = "bgl" -o "$PLATFORM" = "bgp"],
[
AS_IF([test x"$enable_shared" = "xyes"],
[AC_MSG_WARN([VampirTrace does not support shared libraries on IBM BlueGene; build static libraries])])
enable_shared="no"; enable_static="yes"
])
AC_PROG_LIBTOOL
# Check for OTF
ACVT_CONF_TITLE([Open Trace Format (OTF) library and tools])
ACVT_CONF_TITLE([Open Trace Format (OTF)])
ACVT_OTF
AS_IF([test x"$use_extern_otf" = "xyes" -a x"$otf_error" = "xyes"], [exit 1])
AM_CONDITIONAL(AMEXTERNOTF, test x"$use_extern_otf" = "xyes")
# Check for platform
ACVT_CONF_TITLE([Platform specific setup])
ACVT_PLATFORM
# Check for compiler instrumentation
ACVT_CONF_TITLE([Compiler instrumentation])
ACVT_COMPINST
AS_IF([test x"$force_compinst" = "xyes" -a x"$compinst_error" = "xyes"], [exit 1])
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_compinst" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
AM_CONDITIONAL(AMBUILDCOMPINST_GNU, test x"$build_compinst_gnu" = "xyes")
AM_CONDITIONAL(AMBUILDCOMPINST_INTEL, test x"$build_compinst_intel" = "xyes")
AM_CONDITIONAL(AMBUILDCOMPINST_PGI, test x"$build_compinst_pgi" = "xyes")
AM_CONDITIONAL(AMBUILDCOMPINST_PHAT, test x"$build_compinst_phat" = "xyes")
AM_CONDITIONAL(AMBUILDCOMPINST_XL, test x"$build_compinst_xl" = "xyes")
AM_CONDITIONAL(AMBUILDCOMPINST_FTRACE, test x"$build_compinst_ftrace" = "xyes")
AM_CONDITIONAL(AMHAVECOMPINST, test x"$compinst_type" != x)
AM_CONDITIONAL(AMBUILDCOMPINST_GNU, test x"$compinst_type" = "xgnu" -o x"$compinst_type" = "xpgi9")
AM_CONDITIONAL(AMBUILDCOMPINST_PGI, test x"$compinst_type" = "xpgi")
AM_CONDITIONAL(AMBUILDCOMPINST_PHAT, test x"$compinst_type" = "xsun")
AM_CONDITIONAL(AMBUILDCOMPINST_XL, test x"$compinst_type" = "xxl")
AM_CONDITIONAL(AMBUILDCOMPINST_FTRACE, test x"$compinst_type" = "xnec")
AM_CONDITIONAL(AMBUILDCOMPINST_OPENUH, test x"$compinst_type" = "xopenuh")
AM_CONDITIONAL(AMHAVEBFD, test x"$have_bfd" = "xyes")
# Check for binary instrumentation by Dyninst
@ -140,113 +190,125 @@ AS_IF([test x"$force_dynattlib" = "xyes" -a x"$dynattlib_error" = "xyes"], [exit
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_dyninst" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
AM_CONDITIONAL(AMHAVEDYNINST, test x"$have_dyninst" = "xyes")
AM_CONDITIONAL(AMBUILDDYNATTLIB, test x"$have_dyninst" = "xyes" -a x"$LDSHFLAG" != "x")
AM_CONDITIONAL(AMHAVELIBERTY, test x"$have_liberty" = "xyes")
AM_CONDITIONAL(AMBUILDDYNATTLIB, test x"$build_dynattlib" = "xyes")
# Check for MPI and OpenMP
check_omp="yes"; build_omp="yes"; force_omp="no"
check_mpi="yes"; build_mpi="yes"; force_mpi="no"
build_hyb="yes"
AC_ARG_ENABLE(mpi,
AC_HELP_STRING([--enable-mpi], [enable MPI support, default: enable if MPI-installation found by configure]),
[
AS_IF([test x"$enableval" = "xyes"],
[force_mpi="yes"], [check_mpi="no"; build_mpi="no"])
], [])
AC_ARG_ENABLE(omp,
AC_HELP_STRING([--enable-omp], [enable OpenMP support, default: enable if given compiler supports OpenMP]),
[
AS_IF([test x"$enableval" = "xyes"],
[force_omp="yes"], [check_omp="no"; build_omp="no"])
], [])
AC_ARG_ENABLE(hyb,
AC_HELP_STRING([--enable-hyb], [enable Hybrid (MPI/OpenMP) support, default: enable if MPI-installation found and given compiler supports OpenMP]),
[
AS_IF([test x"$enableval" = "xyes"],
[check_omp="yes"; force_omp="yes"
check_mpi="yes"; force_mpi="yes"],
[build_hyb="no"])
], [check_omp="yes"; check_mpi="yes"])
# Check for MPI support
ACVT_CONF_TITLE([Message Passing Interface (MPI)])
AS_IF([test x"$check_mpi" = "xyes"],
[
ACVT_MPI
AS_IF([test x"$mpi_error" = "xyes"],
[
AS_IF([test x"$force_mpi" = "xyes"], [exit 1])
build_mpi="no"; build_hyb="no"
])
],
[
AS_IF([test x"$enable_config_titles" = "xyes"],
[AC_MSG_NOTICE([disabled via command line switch])])
])
ACVT_MPI
AS_IF([test x"$force_mpi" = "xyes" -a x"$mpi_error" = "xyes"], [exit 1])
AS_IF([test x"$force_fmpiwraplib" = "xyes" -a x"$fmpiwraplib_error" = "xyes"], [exit 1])
AS_IF([test x"$MPICC" = x], [MPICC=$CC])
ACVT_CONF_TITLE([OpenMP parallelizer])
AS_IF([test x"$check_omp" = "xyes"],
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_mpi" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
AM_CONDITIONAL(AMHAVEMPI, test x"$have_mpi" = "xyes")
AM_CONDITIONAL(AMHAVEMPI2CONST, test x"$have_mpi2_const" = "xyes")
AM_CONDITIONAL(AMHAVEMPI2IO, test x"$have_mpi2_io" = "xyes")
AM_CONDITIONAL(AMHAVEFMPI, test x"$have_fmpi" = "xyes")
AM_CONDITIONAL(AMBUILDMPI, test x"$have_mpi" = "xyes")
AM_CONDITIONAL(AMBUILDFMPIWRAPLIB, test x"$build_fmpiwraplib" = "xyes")
AS_IF([test x"$have_mpi" = "xyes"],
[
ACVT_OMP
AS_IF([test x"$omp_error" = "xyes"],
[
AS_IF([test x"$force_omp" = "xyes"], [exit 1])
build_omp="no"; build_hyb="no"
])
],
[
AS_IF([test x"$enable_config_titles" = "xyes"],
# Check for enhanced time synchronization support
ACVT_CONF_SUBTITLE([Enhanced time synchronization])
ACVT_ETIMESYNC
AS_IF([test x"$force_etimesync" = "xyes" -a x"$etimesync_error" = "xyes"], [exit 1])
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_etimesync" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
# Check for UniMCI support
ACVT_CONF_SUBTITLE([Universal MPI Correctness Interface (UniMCI)])
ACVT_UNIMCI
AS_IF([test x"$force_unimci" = "xyes" -a x"$unimci_error" = "xyes"], [exit 1])
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_unimci" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
])
AM_CONDITIONAL(AMBUILDETIMESYNC, test x"$have_etimesync" = "xyes")
AM_CONDITIONAL(AMHAVEMATH, test x"$have_math" = "xyes")
AM_CONDITIONAL(AMHAVEUNIMCI, test x"$have_unimci" = "xyes")
AM_CONDITIONAL(AMBUILDMPI, test x"$build_mpi" = "xyes")
# Check for Threads support
ACVT_CONF_TITLE([Multithreading])
ACVT_THREADS
AS_IF([test x"$force_threads" = "xyes" -a x"$threads_error" = "xyes"], [exit 1])
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_threads" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
AM_CONDITIONAL(AMHAVETHREADS, test x"$have_threads" = "xyes")
AM_CONDITIONAL(AMHAVEPTHREAD, test x"$have_pthread" = "xyes")
AM_CONDITIONAL(AMHAVEOMP, test x"$have_omp" = "xyes")
AM_CONDITIONAL(AMBUILDOMP, test x"$build_omp" = "xyes")
AM_CONDITIONAL(AMBUILDHYB, test x"$build_hyb" = "xyes")
AM_CONDITIONAL(AMBUILDMT, test x"$have_threads" = "xyes")
AM_CONDITIONAL(AMBUILDOPARI, test x"$build_opari" = "xyes")
AM_CONDITIONAL(AMTHRDPTHREAD, test x"$have_pthread" = "xyes")
AM_CONDITIONAL(AMTHRDOMP, test x"$have_pthread" != "xyes" -a x"$have_omp" = "xyes")
ACVT_CONF_TITLE([Additional tracing support])
# Check for Hybrid (MPI/Threads) support
AS_IF([test x"$have_mpi" = "xyes" -a x"$have_threads" = "xyes"],
[
build_hybrid="yes"
AC_DEFINE([HAVE_HYBRID], [1], [Define to 1 if VT is configured with Hybrid (MPI/Threads) support.])
])
AM_CONDITIONAL(AMBUILDHYBRID, test x"$build_hybrid" = "xyes")
# Check for JAVA support
ACVT_CONF_TITLE([Java])
ACVT_JAVA
AS_IF([test x"$force_java" = "xyes" -a x"$java_error" = "xyes"], [exit 1])
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_java" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
AM_CONDITIONAL(AMBUILDJAVA, test x"$have_java" = "xyes")
# Check for timer
ACVT_CONF_TITLE([Timer])
ACVT_TIMER
# Check for hardware performace counter support
ACVT_CONF_TITLE([Hardware performance counter])
ACVT_METRICS
AS_IF([test x"$force_metrics" = "xyes" -a x"$metrics_error" = "xyes"], [exit 1])
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_metrics" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
AM_CONDITIONAL(AMHAVEMETRICS, test x"$have_metrics" = "xyes")
AM_CONDITIONAL(AMHAVEPAPI, test x"$have_papi" = "xyes")
AM_CONDITIONAL(AMHAVECPC, test x"$have_cpc" = "xyes")
AM_CONDITIONAL(AMHAVENECSXCNTR, test x"$have_necsxcntr" = "xyes")
# Check for resource usage tracing support
ACVT_CONF_TITLE([Resource usage tracing])
ACVT_RUSAGE
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_rusage" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
AS_IF([test x"$force_rusage" = "xyes" -a x"$rusage_error" = "xyes"], [exit 1])
AM_CONDITIONAL(AMHAVERUSAGE, test x"$have_rusage" = "xyes")
# Check for memory tracing support
ACVT_CONF_SUBTITLE([GLIBC's memory allocation tracing])
ACVT_CONF_TITLE([GLIBC's memory allocation tracing])
ACVT_MEMHOOKS
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_memhooks" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
AS_IF([test x"$force_memhooks" = "xyes" -a x"$memhooks_error" = "xyes"], [exit 1])
AM_CONDITIONAL(AMHAVEMEMHOOKS, test x"$have_memhooks" = "xyes")
# Check for I/O tracing support
ACVT_CONF_SUBTITLE([LIBC's I/O tracing])
AS_IF([test x"$PLATFORM" = "xmacos"],
[
AC_MSG_NOTICE([not supported on MacOS])
have_iowrap="no"
],
[
ACVT_IOWRAP
AS_IF([test x"$force_iowrap" = "xyes" -a x"$iowrap_error" = "xyes"], [exit 1])
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_iowrap" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
])
AM_CONDITIONAL(AMBUILDIOWRAP, test x"$have_iowrap" = "xyes")
# Check for CPU ID tracing support
ACVT_CONF_TITLE([GLIBC's CPU ID tracing])
ACVT_GETCPU
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_getcpu" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
AS_IF([test x"$force_getcpu" = "xyes" -a x"$getcpu_error" = "xyes"], [exit 1])
AM_CONDITIONAL(AMHAVEGETCPU, test x"$have_getcpu" = "xyes")
# Check for PAPI hardware counter support
ACVT_CONF_SUBTITLE([PAPI hardware counter])
AS_IF([test x"$PLATFORM" = "xnecsx"],
[
AC_MSG_NOTICE([not supported on NEC SX])
have_papi="no"
],
[
ACVT_PAPI
AS_IF([test x"$force_papi" = "xyes" -a x"$papi_error" = "xyes"], [exit 1])
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_papi" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
])
AM_CONDITIONAL(AMHAVEPAPI, test x"$have_papi" = "xyes")
# Check for library tracing support
ACVT_CONF_TITLE([Library tracing])
ACVT_LIBWRAP
AS_IF([test x"$force_libwrap" = "xyes" -a x"$libwrap_error" = "xyes"], [exit 1])
AS_IF([test x"$enable_config_titles" = "xyes" -a x"$check_libwrap" = "xno"],
[AC_MSG_NOTICE([disabled via command line switch])])
AM_CONDITIONAL(AMBUILDLIBWRAP, test x"$have_libwrap" = "xyes")
AM_CONDITIONAL(AMBUILDLIBWRAPGEN, test x"$build_libwrapgen" = "xyes")
AM_CONDITIONAL(AMHAVEDL, test x"$have_dl" = "xyes")
AM_CONDITIONAL(AMBUILDLIBCWRAP, test x"$have_libcwrap" = "xyes")
AM_CONDITIONAL(AMHAVEFORK, test x"$have_libcwrap" = "xyes" -a x"$have_fork" = "xyes")
AM_CONDITIONAL(AMBUILDIOWRAP, test x"$have_iowrap" = "xyes")
# Check path for node-local temporary directory
ACVT_LTMPDIR
@ -260,25 +322,57 @@ AC_CONFIG_FILES([Makefile
extlib/Makefile
vtlib/Makefile
tools/Makefile
tools/compwrap/Makefile
tools/compwrap/vtcc-wrapper-data.txt
tools/compwrap/vtcxx-wrapper-data.txt
tools/compwrap/vtf77-wrapper-data.txt
tools/compwrap/vtf90-wrapper-data.txt
tools/opari/Makefile
tools/opari/tool/Makefile
tools/opari/doc/Makefile
tools/vtcpcavail/Makefile
tools/vtdyn/Makefile
tools/vtdyn/dynattlib/Makefile
tools/vtfilter/Makefile
tools/vtjava/Makefile
tools/vtjava/vtjava
tools/vtlibwrapgen/Makefile
tools/vtlibwrapgen/vt_libwrapgen_defs.h
tools/vtunify/Makefile
tools/vtunify/mpi/Makefile
tools/vtwrapper/Makefile
tools/vtwrapper/vtcc-wrapper-data.txt
tools/vtwrapper/vtc++-wrapper-data.txt
tools/vtwrapper/vtf77-wrapper-data.txt
tools/vtwrapper/vtf90-wrapper-data.txt
doc/Makefile
etc/Makefile
])
# Add MPI wrapper generator scripts to output files
AS_IF([test x"$have_mpi" = "xyes"],
[
AC_CONFIG_FILES([config/mpigen/mk_registry.sh])
AC_CONFIG_FILES([config/mpigen/mk_c_wrapper.sh])
AS_IF([test x"$build_fmpiwraplib" = "xyes"],
[AC_CONFIG_FILES([config/mpigen/mk_fortran_wrapper.sh])])
])
# Create output files
ACVT_CONF_TITLE([Final output])
AC_OUTPUT
# Generate MPI wrappers
AS_IF([test x"$have_mpi" = "xyes"],
[
AC_MSG_NOTICE([executing MPI wrapper generator])
$SHELL $top_vt_builddir/config/mpigen/mk_registry.sh
AS_IF([test $? != 0], [exit 1])
$SHELL $top_vt_builddir/config/mpigen/mk_c_wrapper.sh
AS_IF([test $? != 0], [exit 1])
AS_IF([test x"$build_fmpiwraplib" = "xyes"],
[
$SHELL $top_vt_builddir/config/mpigen/mk_fortran_wrapper.sh
AS_IF([test $? != 0], [exit 1])
])
])
# Show configure summary
ACVT_CONF_SUMMARY

Просмотреть файл

@ -5,17 +5,13 @@ vtdata_DATA = \
vtdoc_DATA = \
$(top_srcdir)/ChangeLog \
\
LICENSE \
$(top_srcdir)/LICENSE \
UserManual.html \
UserManual.pdf
vtdatadir = $(datadir)
vtdocdir = $(docdir)
LICENSE: $(top_srcdir)/COPYING
cp $(top_srcdir)/COPYING LICENSE
EXTRA_DIST = \
$(vtdata_DATA) \
$(vtdoc_DATA)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Двоичные данные
ompi/contrib/vt/vt/doc/UserManual.pdf

Двоичный файл не отображается.

8
ompi/contrib/vt/vt/etc/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,8 @@
vtsysconf_DATA = \
vt-java-default-filter.spec
vtsysconfdir = $(sysconfdir)
EXTRA_DIST = \
$(vtsysconf_DATA)

Просмотреть файл

@ -0,0 +1,2 @@
thread exclude Signal Dispatcher;DestroyJavaVM
method exclude java.*;javax.*;sun.*

Просмотреть файл

@ -2,7 +2,8 @@ include Makefile.config
TARGETS = $(HELLO_TGT1) $(HELLO_TGT2) $(HELLO_TGT3) \
$(PI_TGT1) $(PI_TGT2) $(PI_TGT3) \
$(RING_TGT1) $(RING_TGT2) $(RING_TGT3)
$(RING_TGT1) $(RING_TGT2) $(RING_TGT3) \
$(MDLBROT_TGT1) $(MDLBROT_TGT2) $(MDLBROT_TGT3) $(MDLBROT_TGT4) $(MDLBROT_TGT5)
.PHONY: all
all: $(TARGETS)
@ -41,6 +42,26 @@ ring-dyn: ring.c
$(MPICC) -vt:inst dyninst $(MPICFLAGS) $^ -o $@ $(MPILIB)
### mdlbrot-man ###
mdlbrot-man: mdlbrot.c
$(MPICC) -vt:inst manual $(MPICFLAGS) $(SDLINCDIR) -DMANUAL $^ -o $@ -DVTRACE $(MPILIB) $(SDLLIB)
### mdlbrot-comp ###
mdlbrot-comp: mdlbrot.c
$(MPICC) $(MPICFLAGS) $(SDLINCDIR) $^ -o $@ $(MPILIB) $(SDLLIB)
### mdlbrot-dyn ###
mdlbrot-dyn: mdlbrot.c
$(MPICC) -vt:inst dyninst $(MPICFLAGS) $(SDLINCDIR) $^ -o $@ $(MPILIB) $(SDLLIB)
### libSDLwrap.<a|so> ###
libSDLwrap.a: SDLwrap.c
vtlibwrapgen --build -o libSDLwrap --static $^
libSDLwrap.so: SDLwrap.c
vtlibwrapgen --build -o libSDLwrap --shared $^
SDLwrap.c:
vtlibwrapgen -g SDL -o $@ $(SDLHEADERS)
.PHONY: clean
clean:
-rm -f $(TARGETS) *~ *.o
-rm -f $(TARGETS) SDLwrap.c *~ *.o
-rm -f *.uctl *.filt *.otf *.z

Просмотреть файл

@ -11,16 +11,27 @@ MPILIB =
# HELLO (Hello World (MPI))
HELLO_TGT1 = hello-man
HELLO_TGT2 = hello-comp
#HELLO_TGT2 = hello-comp
#HELLO_TGT3 = hello-dyn
# PI (Approximates the value of pi (MPI))
PI_TGT1 = pi-man
PI_TGT2 = pi-comp
#PI_TGT2 = pi-comp
#PI_TGT3 = pi-dyn
# RING (Send a trivial message around in a ring (MPI))
RING_TGT1 = ring-man
RING_TGT2 = ring-comp
#RING_TGT2 = ring-comp
#RING_TGT3 = ring-dyn
# MANDELBROT (Calculate Mandelbrot set (MPI))
SDLINCDIR =
SDLLIB = -lSDL
MDLBROT_TGT1 = mdlbrot-man
#MDLBROT_TGT2 = mdlbrot-comp
#MDLBROT_TGT3 = mdlbrot-dyn
# uncomment following lines, if you want to instrument the SDL API
#SDLHEADERS = /usr/include/SDL/SDL_*.h
#MDLBROT_TGT4 = libSDLwrap.so
#MDLBROT_TGT5 = libSDLwrap.a

208
ompi/contrib/vt/vt/examples/c/mdlbrot.c Обычный файл
Просмотреть файл

@ -0,0 +1,208 @@
#include <stdio.h>
#include <stdlib.h>
#include <SDL/SDL.h>
#include <mpi.h>
#ifdef MANUAL
#include "vt_user.h"
#endif
#define MAX_X 640
#define MAX_Y 480
static void draw_pixel(SDL_Surface* pic, Uint32 x, Uint32 y, Uint32 color)
{
Uint32* pixel;
#ifdef MANUAL
VT_USER_START("draw_pixel");
#endif
pixel = (Uint32*)pic->pixels + y * MAX_X + x;
*pixel = color;
#ifdef MANUAL
VT_USER_END("draw_pixel");
#endif
}
static void draw(SDL_Surface* pic, Uint32* field)
{
Uint32 i, j;
#ifdef MANUAL
VT_USER_START("draw");
#endif
for(i = 0; i < MAX_X; i++)
{
for(j = 0; j < MAX_Y; j++)
{
draw_pixel(pic, i, j, field[i * MAX_Y + j]);
}
}
#ifdef MANUAL
VT_USER_END("draw");
#endif
}
static Uint32 mandelbrot_point(double cx, double cy, double max_value_sq,
Uint32 max_iter)
{
double value_sq = 0;
double x = 0, xt;
double y = 0, yt;
Uint32 iter = 0;
#ifdef MANUAL
VT_USER_START("mandelbrot_point");
#endif
while((value_sq <= max_value_sq) && (iter < max_iter))
{
xt = (x * x) - (y * y) + cx;
yt = 2 * x * y + cy;
x = xt;
y = yt;
iter++;
value_sq = x * x + y * y;
}
#ifdef MANUAL
VT_USER_END("mandelbrot_point");
#endif
return iter;
}
static void calc_lines(Uint32 start, Uint32 end, Uint32* lines,
double max_values_sq, Uint32 max_iter)
{
Uint32 i, iter_wert, icolor;
double cx, cy;
double pd_x = 3.0 / (double)MAX_X;
double pd_y = 2.0 / (double)MAX_Y;
#ifdef MANUAL
VT_USER_START("calc_lines");
#endif
for(i = start; i < end; i++)
{
cx = -2.0 + (i / MAX_Y) * pd_x;
cy = -1.0 + (i % MAX_Y) * pd_y;
iter_wert = mandelbrot_point(cx, cy, max_values_sq, max_iter);
icolor = (double)iter_wert / (double)max_iter * (1u << 24);
lines[i-start] = icolor;
}
#ifdef MANUAL
VT_USER_END("calc_lines");
#endif
}
int main(int argc, char* argv[])
{
int numprocs, rank, edge, pixel_count, start, end;
double max_values_sq;
Uint32 max_iter;
#ifdef MANUAL
VT_USER_START("main");
#endif
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if(numprocs <= 1)
{
fprintf(stderr, "%s: error: requires at least two MPI processes",
argv[0]);
#ifdef MANUAL
VT_USER_END("main");
#endif
return 1;
}
max_values_sq = 4.0;
max_iter = 5000;
edge = (MAX_X * MAX_Y) / (numprocs - 1);
if(rank > 0)
{
int i = rank - 1;
Uint32* pixels;
start = i * edge;
end = (i == numprocs - 2) ? MAX_X * MAX_Y : (i + 1) * edge;
pixel_count = end - start;
pixels = malloc(pixel_count * sizeof(Uint32));
calc_lines(start, end, pixels, max_values_sq, max_iter);
MPI_Send((void*)pixels, pixel_count, MPI_INT, 0, 0, MPI_COMM_WORLD);
free(pixels);
}
else /* rank == 0 */
{
int i, recv_count = (edge + 1);
Uint32* field = malloc(MAX_X * MAX_Y * sizeof(Uint32));
Uint32* fieldpos;
SDL_Surface* pic;
SDL_Event event;
MPI_Status status;
for(i = 1; i < numprocs; i++)
{
start = (i - 1) * edge;
end = (i == numprocs - 1) ? MAX_X * MAX_Y : i * edge;
pixel_count = end - start;
recv_count = pixel_count;
fieldpos = field+start;
MPI_Recv(fieldpos, recv_count, MPI_INT, i, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
}
SDL_Init(SDL_INIT_EVERYTHING);
pic = SDL_SetVideoMode(MAX_X, MAX_Y, 32, SDL_HWSURFACE | SDL_DOUBLEBUF);
SDL_WM_SetCaption("Mandelbrot", "Mandelbrot");
draw(pic, field);
SDL_Flip(pic);
do
{
SDL_Delay(50);
SDL_PollEvent(&event);
} while( event.type != SDL_QUIT && event.type != SDL_KEYDOWN );
SDL_FreeSurface(pic);
SDL_Quit();
free(field);
}
MPI_Finalize();
#ifdef MANUAL
VT_USER_END("main");
#endif
return 0;
}

Просмотреть файл

@ -1,5 +1,9 @@
Andreas Knuepfer <andreas.knuepfer AT tu-dresden.de>
Ronny Brendel <ronny.brendel AT tu-dresden.de>
Matthias Jurenz <matthias.jurenz AT tu-dresden.de>
Johannes Spazier <johannes.spazier AT tu-dresden.de>
Michael Heyde <michael.heyde AT tu-dresden.de>
Michael Kluge <michael.kluge AT tu-dresden.de>
Holger Mickler <holger.mickler AT tu-dresden.de>
Holger Brunst <holger.brunst AT tu-dresden.de>
Hartmut Mix <hartmut.mix AT tu-dresden.de>

Просмотреть файл

@ -1,4 +1,4 @@
Copyright (c) 2005-2008, ZIH, Technische Universitaet Dresden,
Copyright (c) 2005-2009, ZIH, Technische Universitaet Dresden,
Federal Republic of Germany
All rights reserved.

Просмотреть файл

@ -1,16 +1,70 @@
1.3.12
1.6.4openmpi
- enhanced reading of process group definition records
1.6.3stingray
- fixed errors while reading the long OTF format
- updated python interface
1.6.2stingray
- fixed build errors on SUN Solaris with older GNU compilers
- fixed skewed arguments for OTF_WStream_writeEndFileOperation
- fixed progress calculation of otfprofile
- improved performance of otfprofile - especially handling of huge
tracefiles
1.6.1stingray
- added tool 'otfinfo' which can be used to get basic information of
a trace
- removed python bindings
(a working version of the OTF python bindings are available in the
latest stand-alone release; see http://www.tu-dresden.de/zih/otf/)
- fix invalid pointer dereferences in OTF_stripFilename() and
OTF_File_open_zlevel()
- fixed doxygen documentation: add OTF_Handler.h to package
1.3.11
- build/install tool 'otfdump' by default
- install documentation
1.6stingray
- added tool 'otfshrink' which can be used to reduce a trace to
specified processes
- introduced an error variable (otf_errno, otf_strerr) that indicates
whether an error occurred or not
- fixed build dependencies of otfprofile
- added file operation types OTF_FILEOP_DUP, OTF_FILEOP_SYNC,
OTF_FILEOP_LOCK, and OTF_FILEOP_UNLOCK
- changed datatype for sent/received data volume of collective
operation begin/end records from 'uint32_t' to 'uint64_t'
- replaced usage of PATH_MAX by VT_PATH_MAX to avoid compile errors
1.5.2dolphin
- adapted python bindings to the current API (related to new record
types)
- if possible, otfprofile creates a PS-file
- fixed VPATH issue, when using python bindings
- fixed infinite recursion in python wrappers
pyOTF_COUNTER_VARTYPE_ISSIGNED and pyOTF_COUNTER_VARTYPE_ISUNSIGNED
1.5.1dolphin
- corrected package preparation for libtool
- build shared OTF library by default
- added version information to shared OTF library
1.5
- added file operation begin/end records
- added file operation types OTF_FILEOP_UNLINK, OTF_FILEOP_RENAME,
and OTF_FILEOP_OTHER
- use part of fileop for I/O flags (e.g. async, coll.)
- added collective operation begin/end records
- added remote memory access (RMA) operation records
- added marker records
1.4.1
- bugfix: removed included system headers inside 'extern "C" {}'
- bugfix: added configure check for functions 'fseeko()' and 'ftello()'
(these functions are not available on NEC SX platforms)
- bugfix in otfprofile: fixed infinite loop while drawing the
statistics for "top 50 of counters"
1.4
- added tool 'otfprofile' which can be used to generate CSV/Latex-
summaries about functions and P2P-messages of a trace
- build/install tool 'otfdump' by default
- install documentation
1.3.10
- added configure option '--[enable|disable]-binaries' to control
@ -81,13 +135,16 @@
- fixed warning which appeared when not using zlib
- added python bindings to the otf library
1.2.25
- added doxygen html documentation (docu/doxygen/html/index.html)
1.2.24
- minor change in otf[de|un]compress
- strictly avoid writing of unsorted time stamps. Now, there will be an
error message and the corresponding buffer/stream will be disabled for
further writing. The write routines provide an invlaid return code but
currently there is no way to "repair" the buffer/stream after an unsorted
time stamp has been issued.
currently there is no way to "repair" the buffer/stream after an
unsorted time stamp has been issued.
1.2.23
- removed libtool from autoconf to make configure much faster,
@ -112,14 +169,14 @@
1.2.18
- added fwrite check for writting less bytes than expected
- re-write of otfdump. Now, it uses OTF read lib instead of plain scanf.
It produces nicer output and numbers records in read order.
- re-write of otfdump. Now, it uses OTF read lib instead of plain
scanf. It produces nicer output and numbers records in read order.
1.2.17
- bugfixed parser (wrong treatment of unknown records)
- added FileGroupOperationSummary record
- changed FileOperation-, OpenFileSnapshot- and FileOperationSummary- record
NOTE: these records are still experimental
- changed FileOperation-, OpenFileSnapshot- and FileOperationSummary-
record NOTE: these records are still experimental
- included file operation records into all tools
NOTE: some parameters were added/changed
- the byte-parameter in the FileOperation record does now contain the
@ -197,17 +254,23 @@
1.2
- introduce transparent zlib compression
1.1.7
- really did the bugfix for 1.1.6, was missing for some reasons
1.1.6
- bugfix: correctly handle process groups with more than 1000 entries
1.1.5
- have UnknownRecord report handle incomplete records or additional bytes at
the end of a file.
- have UnknownRecord report handle incomplete records or additional
bytes at the end of a file.
1.1.4
- fixed a bug in OTF_Reader which might have caused the very first
time stamp of a trace to be not properly sorted
- introduced '--snapshots' and '--statistics' switches to do only
snapshots or statistics. for statistics a selective mode is allowed
which regards only some streams. By this means statistics can be created
in parallel by calling otfaux multiple times.
which regards only some streams. By this means statistics can be
created in parallel by calling otfaux multiple times.
1.1.3
- fixed a minor bug in otfaux

29
ompi/contrib/vt/vt/extlib/otf/LICENSE Обычный файл
Просмотреть файл

@ -0,0 +1,29 @@
Copyright (c) 2005-2009, ZIH, Technische Universitaet Dresden,
Federal Republic of Germany
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
- Neither the name of ZIH, TU Dresden nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Просмотреть файл

@ -1,7 +1,24 @@
ACLOCAL_AMFLAGS = -I config/m4
if AMHAVEPYTHONSWIG
OTFLIB_PY = otflib_py
else
OTFLIB_PY =
endif
SUBDIRS = \
otflib \
$(OTFLIB_PY) \
tools \
docu
EXTRA_DIST= \
otf_vc08.sln
otf_vc08.sln \
config/otf_get_version.sh \
tests/hello/Makefile \
tests/hello/hello_otf.c \
tests/otf_python/groups.py \
tests/otf_python/test_read.py \
tests/otf_python/test_read_qt.py \
tests/otf_python/test_write.py \
VERSION

48
ompi/contrib/vt/vt/extlib/otf/VERSION Обычный файл
Просмотреть файл

@ -0,0 +1,48 @@
# This is the VERSION file for OTF, describing the precise version of OTF in
# this distribution. The various components of the version number below are
# combined to form a single version number string.
# major, minor, and sub are generally combined in the form
# <major>.<minor>.<sub>. If sub is zero, then it is omitted.
major=1
minor=6
sub=4
# string is used for alpha, beta, or release tags. If it is non-empty, it will
# be appended to the version number.
#
# history of release tags:
# 0.2.* octopussy
# 0.3.*-1.1.* starfish
# 1.2.* pufferfish
# 1.3.* jellyfish
# 1.4.* shark
# 1.5.* dolphin
# 1.6.* stingray
#
string=openmpi
# library is used for the library versioning. These three numbers will be added
# to the name of the library (e.g. libotf.so.1.2.3).
# The meaning of these numbers is as follows (from left to right):
#
# current The number of the current API exported by the library.
# That must be incremented, if the API has changed.
# revision The implementation number of the most recent API
# exported by the library. A value of '0' means that this
# is the first implementation of the API.
# If any of the source for the library has changed,
# revision must be incremented.
# age The number of previous additional APIs supported by the
# library. If age is '2', the library can be linked into
# executables built with a release of the library that
# exported the current API number (current), or any of
# the preceding two APIs.
# If the new API is backward-compatible with the preceding
# release, age must be incremented. Otherwise, reset age
# to '0'.
library=0:1:0

Просмотреть файл

@ -1,210 +1,10 @@
dnl have the vtf3 dirs specified
AC_DEFUN([CHECK_VTF3],
[
vtf3_error="no"
check_vtf3="yes"
force_vtf3="no"
have_vtf3="no"
AH_TEMPLATE(HAVE_VTF3, [], [defined if vtf3 library is to be used])
AC_ARG_WITH([vtf3],
AC_HELP_STRING([--with-vtf3],
[use vtf3, default: yes if found by configure]),
[if test "$withval" = "yes"; then force_vtf3="yes"; else check_vtf3="no"; fi])
AC_ARG_WITH([vtf3-dir],
AC_HELP_STRING([--with-vtf3-dir],
[give the path for vtf3, default: /usr]),
[vtf3_dir="$withval/"])
AC_ARG_WITH([vtf3-inc-dir],
AC_HELP_STRING([--with-vtf3-inc-dir],
[give the path dir vtf3-include files, default: VTF3DIR/include]),
[vtf3_inc_dir="$withval/"],
[if test x"$vtf3_dir" != x; then vtf3_inc_dir="$vtf3_dir"include/; fi])
AC_ARG_WITH([vtf3-lib-dir],
AC_HELP_STRING([--with-vtf3-lib-dir],
[give the path for VTF3-libraries, default: VTF3DIR/lib]),
[vtf3_lib_dir="$withval/"],
[if test x"$vtf3_dir" != x; then vtf3_lib_dir="$vtf3_dir"lib/; fi])
AC_ARG_WITH([vtf3-lib],
AC_HELP_STRING([--with-vtf3-lib],
[use given vtf3, default: -lvtf3]),
[vtf3_lib="$withval"])
if test "$check_vtf3" = "yes"; then
sav_CPPFLAGS=$CPPFLAGS
if test x"$vtf3_inc_dir" != x; then
CPPFLAGS="$CPPFLAGS -I$vtf3_inc_dir"
fi
AC_CHECK_HEADER([vtf3.h], [],
[
AC_MSG_NOTICE([error: no vtf3.h found; check path for VTF3 package first...])
vtf3_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
if test x"$vtf3_lib" = x -a "$vtf3_error" = "no"; then
sav_LIBS=$LIBS
cl="-lvtf3"
if test x"$vtf3_lib_dir" != x; then
cl="-L$vtf3_lib_dir $cl"
fi
LIBS="$LIBS $cl"
AC_MSG_CHECKING([whether linking with -lvtf3 works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); vtf3_lib=-lvtf3],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
fi
if test x"$vtf3_lib" = x -a "$vtf3_error" = "no"; then
AC_MSG_NOTICE([error: no libvtf3 found; check path for VTF3 package first...])
vtf3_error="yes"
fi
if test $vtf3_error = "no"; then
AC_DEFINE(HAVE_VTF3)
have_vtf3="yes"
fi
fi
VTF3_LIB_DIR=$vtf3_lib_dir
VTF3_LIB_LINE=$vtf3_lib
if test x"$vtf3_lib_dir" != x; then
VTF3_LIB_LINE="-L$vtf3_lib_dir $VTF3_LIB_LINE"
fi
VTF3_INCLUDE_DIR=$vtf3_inc_dir
VTF3_INCLUDE_LINE=
if test x"$vtf3_inc_dir" != x; then
VTF3_INCLUDE_LINE="-I$vtf3_inc_dir"
fi
AC_SUBST(VTF3_LIB_DIR)
AC_SUBST(VTF3_LIB_LINE)
AC_SUBST(VTF3_INCLUDE_DIR)
AC_SUBST(VTF3_INCLUDE_LINE)
])
dnl have the zlib dirs specified
AC_DEFUN([CHECK_ZLIB],
[
zlib_error="no"
check_zlib="yes"
force_zlib="no"
have_zlib="no"
AH_TEMPLATE(HAVE_ZLIB, [], [defined if zlib library is to be used])
AC_ARG_WITH([zlib],
AC_HELP_STRING([--with-zlib],
[use zlib, default: yes if found by configure]),
[if test "$withval" = "yes"; then force_zlib="yes"; else check_zlib="no"; fi])
AC_ARG_WITH([zlib-dir],
AC_HELP_STRING([--with-zlib-dir],
[give the path for zlib, default: /usr]),
[zlib_dir="$withval/"])
AC_ARG_WITH([zlib-inc-dir],
AC_HELP_STRING([--with-zlib-inc-dir],
[give the path dir zlib-include files, default: ZLIBDIR/include]),
[zlib_inc_dir="$withval/"],
[if test x"$zlib_dir" != x; then zlib_inc_dir="$zlib_dir"include/; fi])
AC_ARG_WITH([zlib-lib-dir],
AC_HELP_STRING([--with-zlib-lib-dir],
[give the path for ZLIB-libraries, default: ZLIBDIR/lib]),
[zlib_lib_dir="$withval/"],
[if test x"$zlib_dir" != x; then zlib_lib_dir="$zlib_dir"lib/; fi])
AC_ARG_WITH([zlib-lib],
AC_HELP_STRING([--with-zlib-lib],
[use given zlib, default: -lz]),
[zlib_lib="$withval"])
if test "$check_zlib" = "yes"; then
sav_CPPFLAGS=$CPPFLAGS
if test x"$zlib_inc_dir" != x; then
CPPFLAGS="$CPPFLAGS -I$zlib_inc_dir"
fi
AC_CHECK_HEADER([zlib.h], [],
[
AC_MSG_NOTICE([error: no zlib.h found; check path for ZLIB package first...])
zlib_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
if test x"$zlib_lib" = x -a "$zlib_error" = "no"; then
sav_LIBS=$LIBS
cl="-lz"
if test x"$zlib_lib_dir" != x; then
cl="-L$zlib_lib_dir $cl"
fi
LIBS="$LIBS $cl"
AC_MSG_CHECKING([whether linking with -lz works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); zlib_lib=-lz],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
fi
if test x"$zlib_lib" = x -a "$zlib_error" = "no"; then
AC_MSG_NOTICE([error: no libz found; check path for ZLIB package first...])
zlib_error="yes"
fi
if test $zlib_error = "no"; then
AC_DEFINE(HAVE_ZLIB)
have_zlib="yes"
fi
fi
ZLIB_LIB_DIR=$zlib_lib_dir
ZLIB_LIB_LINE=$zlib_lib
if test x"$zlib_lib_dir" != x; then
ZLIB_LIB_LINE="-L$zlib_lib_dir $ZLIB_LIB_LINE"
fi
ZLIB_INCLUDE_DIR=$zlib_inc_dir
ZLIB_INCLUDE_LINE=
if test x"$zlib_inc_dir" != x; then
ZLIB_INCLUDE_LINE="-I$zlib_inc_dir"
fi
AC_SUBST(ZLIB_LIB_DIR)
AC_SUBST(ZLIB_LIB_LINE)
AC_SUBST(ZLIB_INCLUDE_DIR)
AC_SUBST(ZLIB_INCLUDE_LINE)
])
dnl switch on/off additonal debug output in otf lib
AC_DEFUN([WITH_DEBUG],
[
AH_TEMPLATE(OTF_DEBUG, [], [switch on/off additonal debug checks in otf lib])
AC_ARG_WITH([debug],
AC_HELP_STRING([--with-debug],[additonal debug checks]),
[debug=$withval],
[debug=""])
if test "$debug" = yes; then
AC_DEFINE(OTF_DEBUG)
fi
])
dnl switch on/off additonal debug output in otf lib
AC_DEFUN([WITH_VERBOSE],
[
AH_TEMPLATE(OTF_VERBOSE, [], [switch on/off verbose output in otf lib])
AC_ARG_WITH([verbose],
AC_HELP_STRING([--with-verbose],[additonal verbose output]),
[verbose=$withval],
[verbose=""])
if test "$verbose" = yes; then
AC_DEFINE(OTF_VERBOSE)
fi
])
m4_include(config/m4/acinclude.debug.m4)
m4_include(config/m4/acinclude.math.m4)
m4_include(config/m4/acinclude.omp.m4)
m4_include(config/m4/acinclude.pydev.m4)
m4_include(config/m4/acinclude.swig.m4)
m4_include(config/m4/acinclude.swig_python.m4)
m4_include(config/m4/acinclude.vtf3.m4)
m4_include(config/m4/acinclude.verbose.m4)
m4_include(config/m4/acinclude.zlib.m4)
m4_include(config/m4/acarchive/ax_openmp.m4)

116
ompi/contrib/vt/vt/extlib/otf/config.h.in Обычный файл
Просмотреть файл

@ -0,0 +1,116 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the `asprintf' function. */
#undef HAVE_ASPRINTF
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the `fseeko' function. */
#undef HAVE_FSEEKO
/* Define to 1 if you have the `ftello' function. */
#undef HAVE_FTELLO
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the `__va_copy' function. */
#undef HAVE_UNDERSCORE_VA_COPY
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vasprintf' function. */
#undef HAVE_VASPRINTF
/* Define to 1 if you have the `va_copy' function. */
#undef HAVE_VA_COPY
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
/* */
#undef HAVE_VTF3
/* */
#undef HAVE_ZLIB
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* */
#undef OTF_DEBUG
/* */
#undef OTF_VERBOSE
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t

Просмотреть файл

@ -0,0 +1,71 @@
dnl @synopsis AX_OPENMP([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
dnl @summary determine how to compile programs using OpenMP
dnl
dnl This macro tries to find out how to compile programs that use
dnl OpenMP a standard API and set of compiler directives for parallel
dnl programming (see http://www-unix.mcs/)
dnl
dnl On success, it sets the
dnl OPENMP_CFLAGS/OPENMP_CXXFLAGS/OPENMP_F77FLAGS output variable to
dnl the flag (e.g. -omp) used both to compile *and* link OpenMP
dnl programs in the current language.
dnl
dnl NOTE: You are assumed to not only compile your program with these
dnl flags, but also link it with them as well.
dnl
dnl If you want to compile everything with OpenMP, you should set:
dnl
dnl CFLAGS="$CFLAGS $OPENMP_CFLAGS"
dnl #OR# CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
dnl #OR# FFLAGS="$FFLAGS $OPENMP_FFLAGS"
dnl
dnl (depending on the selected language).
dnl
dnl The user can override the default choice by setting the
dnl corresponding environment variable (e.g. OPENMP_CFLAGS).
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if an OpenMP
dnl flag is found, and ACTION-IF-NOT-FOUND is a list of commands to run
dnl it if it is not found. If ACTION-IF-FOUND is not specified, the
dnl default action will define HAVE_OPENMP.
dnl
dnl @category InstalledPackages
dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
dnl @version 2006-01-24
dnl @license GPLWithACException
AC_DEFUN([AX_OPENMP], [
AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown
# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI),
# -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX),
# -Popenmp (NECSX), none
ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp -Popenmp none"
if test "x$OPENMP_[]_AC_LANG_PREFIX[]FLAGS" != x; then
ax_openmp_flags="$OPENMP_[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flags"
fi
for ax_openmp_flag in $ax_openmp_flags; do
case $ax_openmp_flag in
none) []_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[] ;;
*) []_AC_LANG_PREFIX[]FLAGS="$save[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flag" ;;
esac
AC_TRY_COMPILE([], [
#ifndef _OPENMP
# error "_OPENMP not defined"
#endif
], [ax_cv_[]_AC_LANG_ABBREV[]_openmp=$ax_openmp_flag; break])
done
[]_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[]FLAGS
])
if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" = "xunknown"; then
m4_default([$2],:)
else
if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" != "xnone"; then
OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ax_cv_[]_AC_LANG_ABBREV[]_openmp
fi
m4_default([$1],:)
fi
])dnl AX_OPENMP

Просмотреть файл

@ -0,0 +1,15 @@
dnl switch on/off additonal debug output in otf lib
AC_DEFUN([WITH_DEBUG],
[
AH_TEMPLATE(OTF_DEBUG, [], [switch on/off additonal debug checks in otf lib])
AC_ARG_WITH([debug],
AC_HELP_STRING([--with-debug],[additonal debug checks]),
[debug=$withval],
[debug=""])
if test "$debug" = yes; then
AC_DEFINE(OTF_DEBUG)
fi
])

Просмотреть файл

@ -0,0 +1,21 @@
AC_DEFUN([CHECK_MATH],
[
LIBS="$LIBS -lm"
AC_MSG_CHECKING([whether linking with -lm works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); math_lib=-lm],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
AS_IF([test x"$math_lib" != x],
[
AC_MSG_CHECKING([whether we need to link -lm to get math functions])
AC_TRY_LINK([#include <math.h>],
[
volatile double c, x = 47.11;
c = ceil(x);
],
[AC_MSG_RESULT([no])], [AC_MSG_RESULT([yes]); MATHLIB=$math_lib])
])
AC_SUBST(MATHLIB)
])

Просмотреть файл

@ -0,0 +1,11 @@
AC_DEFUN([CHECK_OMP],
[
have_omp="no"
AC_ARG_VAR(OPENMP_CXXFLAGS, [C++ compiler flags to enable support for OpenMP])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AX_OPENMP([have_omp="yes"])
AC_LANG_RESTORE
])

Просмотреть файл

@ -0,0 +1,152 @@
AC_DEFUN([AC_PYTHON_DEVEL],[
#
# Allow the use of a (user set) custom python version
#
AC_ARG_VAR([PYTHON_VERSION],[The installed Python
version to use, for example '2.3'. This string
will be appended to the Python interpreter
canonical name.])
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
if test -z "$PYTHON"; then
AC_MSG_WARN([Cannot find python$PYTHON_VERSION in your system path])
PYTHON_VERSION=""
else
#
# Check for Python include path
#
AC_MSG_CHECKING([for python include path])
if test -z "$PYTHON_CPPFLAGS"; then
python_path=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc();" 2> /dev/null`
if test -n "${python_path}"; then
python_path="-I$python_path"
fi
PYTHON_CPPFLAGS=$python_path
fi
if test -n "$PYTHON_CPPFLAGS"; then
AC_MSG_RESULT([$PYTHON_CPPFLAGS])
else
AC_MSG_RESULT([no])
fi
AC_SUBST([PYTHON_CPPFLAGS])
#
# Check for Python library path
#
AC_MSG_CHECKING([for python library path])
if test -z "$PYTHON_LDFLAGS"; then
# (makes two attempts to ensure we've got a version number
# from the interpreter)
py_version=`$PYTHON -c "from distutils.sysconfig import *; \
from string import join; \
print join(get_config_vars('VERSION'))" 2> /dev/null`
if test "$py_version" = "[None]" -o -z "$py_version"; then
if test -n "$PYTHON_VERSION"; then
py_version=$PYTHON_VERSION
else
py_version=`$PYTHON -c "import sys; \
print sys.version[[:3]]"`
fi
fi
PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \
from string import join; \
print '-L' + get_python_lib(0,1), \
'-lpython';" 2> /dev/null`$py_version
fi
if test ! "$PYTHON_LDFLAGS" = "$py_version"; then
AC_MSG_RESULT([$PYTHON_LDFLAGS])
else
AC_MSG_RESULT([no])
fi
AC_SUBST([PYTHON_LDFLAGS])
#
# Check for site packages
#
AC_MSG_CHECKING([for python site-packages path])
if test -z "$PYTHON_SITE_PKG"; then
PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
print distutils.sysconfig.get_python_lib(0,0);" 2> /dev/null`
fi
if test -n "$PYTHON_SITE_PKG"; then
AC_MSG_RESULT([$PYTHON_SITE_PKG])
else
AC_MSG_RESULT([no])
fi
AC_SUBST([PYTHON_SITE_PKG])
#
# libraries which must be linked in when embedding
#
AC_MSG_CHECKING(python extra libraries)
if test -z "$PYTHON_EXTRA_LIBS"; then
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print conf('LOCALMODLIBS'), conf('LIBS')" 2> /dev/null`
fi
if test -n "$PYTHON_EXTRA_LIBS"; then
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
else
AC_MSG_RESULT([no])
fi
AC_SUBST(PYTHON_EXTRA_LIBS)
#
# linking flags needed when embedding
#
AC_MSG_CHECKING(python extra linking flags)
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print conf('LINKFORSHARED')" 2> /dev/null`
fi
if test -n "$PYTHON_EXTRA_LDFLAGS"; then
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
else
AC_MSG_RESULT([no])
fi
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
#
# final check to see if everything compiles alright
#
AC_MSG_CHECKING([consistency of all components of python development environment])
AC_LANG_PUSH([C])
# save current global flags
LIBS="$ac_save_LIBS $PYTHON_LDFLAGS"
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
AC_TRY_LINK([
#include <Python.h>
],[
Py_Initialize();
],[pythonexists=yes],[pythonexists=no])
AC_MSG_RESULT([$pythonexists])
if test ! "$pythonexists" = "yes"; then
AC_MSG_ERROR([Cannot find python development environment. You probably have to install the development version of the python package.])
PYTHON_VERSION=""
fi
AC_LANG_POP
# turn back to default flags
CPPFLAGS="$ac_save_CPPFLAGS"
LIBS="$ac_save_LIBS"
#get the paths where to install the package
AC_SUBST([pkgpythondir],
['${prefix}'/lib/python${py_version}/site-packages/otf])
AC_SUBST([pkgpyexecdir],
['${exec_prefix}'/lib/python${py_version}/site-packages/otf])
fi
])

Просмотреть файл

@ -0,0 +1,57 @@
AC_DEFUN([AC_PROG_SWIG],[
AC_PATH_PROG([SWIG],[swig])
if test -z "$SWIG" ; then
AC_MSG_ERROR([Cannot find 'swig' program.])
elif test -n "$1" ; then
AC_MSG_CHECKING([for swig version])
[swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
AC_MSG_RESULT([$swig_version])
if test -n "$swig_version" ; then
# Calculate the required version number components
[required=$1]
[required_major=`echo $required | sed 's/[^0-9].*//'`]
if test -z "$required_major" ; then
[required_major=0]
fi
[required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
[required_minor=`echo $required | sed 's/[^0-9].*//'`]
if test -z "$required_minor" ; then
[required_minor=0]
fi
[required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
[required_patch=`echo $required | sed 's/[^0-9].*//'`]
if test -z "$required_patch" ; then
[required_patch=0]
fi
# Calculate the available version number components
[available=$swig_version]
[available_major=`echo $available | sed 's/[^0-9].*//'`]
if test -z "$available_major" ; then
[available_major=0]
fi
[available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
[available_minor=`echo $available | sed 's/[^0-9].*//'`]
if test -z "$available_minor" ; then
[available_minor=0]
fi
[available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
[available_patch=`echo $available | sed 's/[^0-9].*//'`]
if test -z "$available_patch" ; then
[available_patch=0]
fi
if test $available_major -ne $required_major \
-o $available_minor -ne $required_minor \
-o $available_patch -lt $required_patch ; then
AC_MSG_ERROR([swig version >= $1 is required. You have $swig_version.])
else
swigexists=yes
fi
else
AC_MSG_ERROR([Cannot determine swig version])
fi
fi
])

Просмотреть файл

@ -0,0 +1,51 @@
AC_DEFUN([SWIG_PYTHON],[
#
#enable python bindings
#
AC_ARG_ENABLE([python-bindings],
AC_HELP_STRING([--enable-python-bindings],
[force generation of Python bindings]),
[enable_python_bindings="yes"],
[enable_python_bindings=""])
#
#with python version
#
AC_ARG_WITH([python-version],
AC_HELP_STRING([--with-python-version=VERSION],
[force a custom python version]),
[PYTHON_VERSION=$withval])
#
#only check if the user did --enable-python-bindings
#
if test x"$enable_python_bindings" = xyes; then
#
#test for swig >= 1.3
#
AC_PROG_SWIG(1.3)
#
#test for python-dev
#
AC_PYTHON_DEVEL
test "x$1" != "xno" || swig_shadow=" -noproxy"
#
#set the swig options
#
AC_SUBST([SWIG_PYTHON_OPT],[-python])
#
#set the python compiler flags
#
AC_SUBST([SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS])
fi
])

Просмотреть файл

@ -0,0 +1,15 @@
dnl switch on/off additonal debug output in otf lib
AC_DEFUN([WITH_VERBOSE],
[
AH_TEMPLATE(OTF_VERBOSE, [], [switch on/off verbose output in otf lib])
AC_ARG_WITH([verbose],
AC_HELP_STRING([--with-verbose],[additonal verbose output]),
[verbose=$withval],
[verbose=""])
if test "$verbose" = yes; then
AC_DEFINE(OTF_VERBOSE)
fi
])

Просмотреть файл

@ -0,0 +1,90 @@
dnl have the vtf3 dirs specified
AC_DEFUN([CHECK_VTF3],
[
vtf3_error="no"
check_vtf3="yes"
force_vtf3="no"
have_vtf3="no"
AH_TEMPLATE(HAVE_VTF3, [], [defined if vtf3 library is to be used])
AC_ARG_WITH([vtf3],
AC_HELP_STRING([--with-vtf3],
[use vtf3, default: yes if found by configure]),
[if test "$withval" = "yes"; then force_vtf3="yes"; else check_vtf3="no"; fi])
AC_ARG_WITH([vtf3-dir],
AC_HELP_STRING([--with-vtf3-dir],
[give the path for vtf3, default: /usr]),
[vtf3_dir="$withval/"])
AC_ARG_WITH([vtf3-inc-dir],
AC_HELP_STRING([--with-vtf3-inc-dir],
[give the path dir vtf3-include files, default: VTF3DIR/include]),
[vtf3_inc_dir="$withval/"],
[if test x"$vtf3_dir" != x; then vtf3_inc_dir="$vtf3_dir"include/; fi])
AC_ARG_WITH([vtf3-lib-dir],
AC_HELP_STRING([--with-vtf3-lib-dir],
[give the path for VTF3-libraries, default: VTF3DIR/lib]),
[vtf3_lib_dir="$withval/"],
[if test x"$vtf3_dir" != x; then vtf3_lib_dir="$vtf3_dir"lib/; fi])
AC_ARG_WITH([vtf3-lib],
AC_HELP_STRING([--with-vtf3-lib],
[use given vtf3, default: -lvtf3]),
[vtf3_lib="$withval"])
if test "$check_vtf3" = "yes"; then
sav_CPPFLAGS=$CPPFLAGS
if test x"$vtf3_inc_dir" != x; then
CPPFLAGS="$CPPFLAGS -I$vtf3_inc_dir"
fi
AC_CHECK_HEADER([vtf3.h], [],
[
AC_MSG_NOTICE([error: no vtf3.h found; check path for VTF3 package first...])
vtf3_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
if test x"$vtf3_lib" = x -a "$vtf3_error" = "no"; then
sav_LIBS=$LIBS
cl="-lvtf3"
if test x"$vtf3_lib_dir" != x; then
cl="-L$vtf3_lib_dir $cl"
fi
LIBS="$LIBS $cl"
AC_MSG_CHECKING([whether linking with -lvtf3 works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); vtf3_lib=-lvtf3],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
fi
if test x"$vtf3_lib" = x -a "$vtf3_error" = "no"; then
AC_MSG_NOTICE([error: no libvtf3 found; check path for VTF3 package first...])
vtf3_error="yes"
fi
if test $vtf3_error = "no"; then
AC_DEFINE(HAVE_VTF3)
have_vtf3="yes"
fi
fi
VTF3_LIB_DIR=$vtf3_lib_dir
VTF3_LIB_LINE=$vtf3_lib
if test x"$vtf3_lib_dir" != x; then
VTF3_LIB_LINE="-L$vtf3_lib_dir $VTF3_LIB_LINE"
fi
VTF3_INCLUDE_DIR=$vtf3_inc_dir
VTF3_INCLUDE_LINE=
if test x"$vtf3_inc_dir" != x; then
VTF3_INCLUDE_LINE="-I$vtf3_inc_dir"
fi
AC_SUBST(VTF3_LIB_DIR)
AC_SUBST(VTF3_LIB_LINE)
AC_SUBST(VTF3_INCLUDE_DIR)
AC_SUBST(VTF3_INCLUDE_LINE)
])

Просмотреть файл

@ -0,0 +1,90 @@
dnl have the zlib dirs specified
AC_DEFUN([CHECK_ZLIB],
[
zlib_error="no"
check_zlib="yes"
force_zlib="no"
have_zlib="no"
AH_TEMPLATE(HAVE_ZLIB, [], [defined if zlib library is to be used])
AC_ARG_WITH([zlib],
AC_HELP_STRING([--with-zlib],
[use zlib, default: yes if found by configure]),
[if test "$withval" = "yes"; then force_zlib="yes"; else check_zlib="no"; fi])
AC_ARG_WITH([zlib-dir],
AC_HELP_STRING([--with-zlib-dir],
[give the path for zlib, default: /usr]),
[zlib_dir="$withval/"])
AC_ARG_WITH([zlib-inc-dir],
AC_HELP_STRING([--with-zlib-inc-dir],
[give the path dir zlib-include files, default: ZLIBDIR/include]),
[zlib_inc_dir="$withval/"],
[if test x"$zlib_dir" != x; then zlib_inc_dir="$zlib_dir"include/; fi])
AC_ARG_WITH([zlib-lib-dir],
AC_HELP_STRING([--with-zlib-lib-dir],
[give the path for ZLIB-libraries, default: ZLIBDIR/lib]),
[zlib_lib_dir="$withval/"],
[if test x"$zlib_dir" != x; then zlib_lib_dir="$zlib_dir"lib/; fi])
AC_ARG_WITH([zlib-lib],
AC_HELP_STRING([--with-zlib-lib],
[use given zlib, default: -lz]),
[zlib_lib="$withval"])
if test "$check_zlib" = "yes"; then
sav_CPPFLAGS=$CPPFLAGS
if test x"$zlib_inc_dir" != x; then
CPPFLAGS="$CPPFLAGS -I$zlib_inc_dir"
fi
AC_CHECK_HEADER([zlib.h], [],
[
AC_MSG_NOTICE([error: no zlib.h found; check path for ZLIB package first...])
zlib_error="yes"
])
CPPFLAGS=$sav_CPPFLAGS
if test x"$zlib_lib" = x -a "$zlib_error" = "no"; then
sav_LIBS=$LIBS
cl="-lz"
if test x"$zlib_lib_dir" != x; then
cl="-L$zlib_lib_dir $cl"
fi
LIBS="$LIBS $cl"
AC_MSG_CHECKING([whether linking with -lz works])
AC_TRY_LINK([],[],
[AC_MSG_RESULT([yes]); zlib_lib=-lz],[AC_MSG_RESULT([no])])
LIBS=$sav_LIBS
fi
if test x"$zlib_lib" = x -a "$zlib_error" = "no"; then
AC_MSG_NOTICE([error: no libz found; check path for ZLIB package first...])
zlib_error="yes"
fi
if test $zlib_error = "no"; then
AC_DEFINE(HAVE_ZLIB)
have_zlib="yes"
fi
fi
ZLIB_LIB_DIR=$zlib_lib_dir
ZLIB_LIB_LINE=$zlib_lib
if test x"$zlib_lib_dir" != x; then
ZLIB_LIB_LINE="-L$zlib_lib_dir $ZLIB_LIB_LINE"
fi
ZLIB_INCLUDE_DIR=$zlib_inc_dir
ZLIB_INCLUDE_LINE=
if test x"$zlib_inc_dir" != x; then
ZLIB_INCLUDE_LINE="-I$zlib_inc_dir"
fi
AC_SUBST(ZLIB_LIB_DIR)
AC_SUBST(ZLIB_LIB_LINE)
AC_SUBST(ZLIB_INCLUDE_DIR)
AC_SUBST(ZLIB_INCLUDE_LINE)
])

69
ompi/contrib/vt/vt/extlib/otf/config/otf_get_version.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,69 @@
#!/bin/sh
srcfile=$1
option=$2
if test -z "$srcfile"; then
option="--help"
else
if ! test -f $srcfile; then
echo "$0: $srcfile: No such file or directory"
exit 1
fi
otf_vers=`cat $srcfile`
eval "$otf_vers"
fi
if test -z "$option"; then
option="--full"
fi
case "$option" in
--major)
echo $major
;;
--minor)
echo $minor
;;
--sub)
echo $sub
;;
--string)
echo $string
;;
--full)
out="$major.$minor"
if test x"$sub" != "x0"; then
out="$out.$sub"
fi
if test x"$string" != "x"; then
out="$out$string"
fi
echo "$out"
;;
--library)
echo $library
;;
-h|--help)
cat <<EOF
$0 <srcfile> <option>
<srcfile> - Text version file
<option> - One of:
--full - Full version number
--major - Major version number
--minor - Minor version number
--string - Version string (alpha, beta, etc)
--library - Library version number
--help - This message
EOF
;;
*)
echo "Unrecognized option $option. Run $0 --help for options"
exit 1
;;
esac
exit 0

Просмотреть файл

@ -1,21 +1,26 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(OTF, 1.3.12, andreas.knuepfer@tu-dresden.de )
AC_INIT([OTF],
[m4_normalize(esyscmd([config/otf_get_version.sh VERSION --full]))],
[andreas.knuepfer@tu-dresden.de], [OTF])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config/m4)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(OTF, 1.3.12)
AC_CONFIG_SRCDIR([config.h.in])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
# Open MPI: If Automake supports silent rules, enable them.
# If Automake supports silent rules, enable them.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Get library version
OTF_VERSION_LIBRARY=m4_normalize(esyscmd([config/otf_get_version.sh VERSION --library]))
AC_SUBST([OTF_VERSION_LIBRARY])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
# Own stuff
@ -27,6 +32,10 @@ AC_ARG_ENABLE(binaries,
[enable_binaries="$enableval"], [enable_binaries="yes"])
AM_CONDITIONAL(AMBUILDBINARIES, test x"$enable_binaries" = "xyes")
# Checks for OpenMP.
CHECK_OMP
AM_CONDITIONAL(AMHAVEOMP, test x"$have_omp" = xyes)
# Checks for VTF3.
CHECK_VTF3
if test x"$force_vtf3" = "xyes" -a x"$vtf3_error" = "xyes"; then exit 1; fi
@ -36,7 +45,14 @@ AM_CONDITIONAL(AMHAVEVTF3, test x"$have_vtf3" = xyes)
CHECK_ZLIB
if test x"$force_zlib" = "xyes" -a x"$zlib_error" = "xyes"; then exit 1; fi
AM_CONDITIONAL(AMHAVEZLIB, test x"$have_zlib" = xyes)
AM_CONDITIONAL(AMDEPZLIB, test x"$have_zlib" = xyes -a x"$enable_shared" = xyes)
# Checks for math library.
CHECK_MATH
# Checks for swig and python-dev.
SWIG_PYTHON
AM_CONDITIONAL(AMHAVEPYTHONSWIG, [test "$pythonexists" = yes -a "$swigexists" = yes] )
WITH_DEBUG
WITH_VERBOSE
@ -44,7 +60,7 @@ WITH_VERBOSE
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stddef.h stdlib.h string.h sys/time.h unistd.h])
AC_CHECK_HEADERS([stddef.h stdlib.h string.h sys/param.h sys/time.h unistd.h])
AC_CHECK_HEADER([stdint.h], [have_stdint_h=1], [have_stdint_h=0])
AC_CHECK_HEADER([inttypes.h], [have_inttypes_h=1], [have_inttypes_h=0])
AC_SUBST([have_stdint_h])
@ -81,6 +97,7 @@ AC_SUBST([sizeof_long])
AC_CONFIG_FILES([Makefile
otflib/Makefile
otflib/OTF_inttypes_unix.h
otflib_py/Makefile
tools/Makefile
tools/otfaux/Makefile
tools/otfcompress/Makefile
@ -88,6 +105,8 @@ AC_CONFIG_FILES([Makefile
tools/otfdump/Makefile
tools/otfinfo/Makefile
tools/otfmerge/Makefile
tools/otfprofile/Makefile
tools/otfshrink/Makefile
tools/otf2vtf/Makefile
tools/vtf2otf/Makefile
docu/Makefile

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше