From bdbe35ed4e16effb653b1b53bf64721e4e68dee6 Mon Sep 17 00:00:00 2001 From: Phil Carns Date: Fri, 6 Feb 2015 17:07:37 -0500 Subject: [PATCH] preliminary mpi profiling configuration files - no documentation or extensive testing yet --- ChangeLog | 2 + darshan-runtime/Makefile.in | 4 ++ darshan-runtime/configure | 5 ++- darshan-runtime/configure.in | 3 ++ .../share/mpi-profile/darshan-cc.conf.in | 18 +++++++++ .../share/mpi-profile/darshan-cxx.conf.in | 18 +++++++++ .../share/mpi-profile/darshan-f.conf.in | 18 +++++++++ .../workstation-profile-conf/env.sh | 38 +++++++++++++++++++ 8 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 darshan-runtime/share/mpi-profile/darshan-cc.conf.in create mode 100644 darshan-runtime/share/mpi-profile/darshan-cxx.conf.in create mode 100644 darshan-runtime/share/mpi-profile/darshan-f.conf.in create mode 100755 darshan-test/regression/workstation-profile-conf/env.sh diff --git a/ChangeLog b/ChangeLog index 2928195..6706143 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,8 @@ darshan-2.3.1-pre2 * update darshan-gen-fortran.pl and darshan-gen-cxx.pl to support new library naming conventions in MPICH 3.1.1 and higher * update documentation to reflect known issues with some versions of MPICH +* added example mpicc profile configuration files, see share/mpi-profile/ + subdirectory within installation directory darshan-2.3.0 ============= diff --git a/darshan-runtime/Makefile.in b/darshan-runtime/Makefile.in index 36b4a52..35e2b8e 100644 --- a/darshan-runtime/Makefile.in +++ b/darshan-runtime/Makefile.in @@ -114,6 +114,10 @@ endif install -m 755 share/craype-1.x/darshan-module $(datarootdir)/craype-1.x/modulefiles/darshan/$(DARSHAN_VERSION) install -d $(datarootdir)/craype-2.x/modulefiles/darshan install -m 755 share/craype-2.x/darshan-module $(datarootdir)/craype-2.x/modulefiles/darshan/$(DARSHAN_VERSION) + install -d $(datarootdir)/mpi-profile + install -m 755 share/mpi-profile/darshan-cc.conf $(datarootdir)/mpi-profile/darshan-cc.conf + install -m 755 share/mpi-profile/darshan-cxx.conf $(datarootdir)/mpi-profile/darshan-cxx.conf + install -m 755 share/mpi-profile/darshan-f.conf $(datarootdir)/mpi-profile/darshan-f.conf install -d $(libdir)/pkgconfig install -m 644 lib/pkgconfig/darshan-runtime.pc $(libdir)/pkgconfig/darshan-runtime.pc diff --git a/darshan-runtime/configure b/darshan-runtime/configure index 26f0244..0598a15 100755 --- a/darshan-runtime/configure +++ b/darshan-runtime/configure @@ -4259,7 +4259,7 @@ DARSHAN_VERSION="2.3.1-pre1" -ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc" +ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -4962,6 +4962,9 @@ do "share/craype-1.x/darshan-module") CONFIG_FILES="$CONFIG_FILES share/craype-1.x/darshan-module" ;; "share/craype-2.x/darshan-module") CONFIG_FILES="$CONFIG_FILES share/craype-2.x/darshan-module" ;; "lib/pkgconfig/darshan-runtime.pc") CONFIG_FILES="$CONFIG_FILES lib/pkgconfig/darshan-runtime.pc" ;; + "share/mpi-profile/darshan-cc.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-cc.conf" ;; + "share/mpi-profile/darshan-cxx.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-cxx.conf" ;; + "share/mpi-profile/darshan-f.conf") CONFIG_FILES="$CONFIG_FILES share/mpi-profile/darshan-f.conf" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/darshan-runtime/configure.in b/darshan-runtime/configure.in index 13041c7..78f8a62 100644 --- a/darshan-runtime/configure.in +++ b/darshan-runtime/configure.in @@ -305,4 +305,7 @@ darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc +share/mpi-profile/darshan-cc.conf +share/mpi-profile/darshan-cxx.conf +share/mpi-profile/darshan-f.conf ) diff --git a/darshan-runtime/share/mpi-profile/darshan-cc.conf.in b/darshan-runtime/share/mpi-profile/darshan-cc.conf.in new file mode 100644 index 0000000..70fe29a --- /dev/null +++ b/darshan-runtime/share/mpi-profile/darshan-cc.conf.in @@ -0,0 +1,18 @@ +#!/bin/bash + +# Example Darshan profiling configuration file for MPICH. + + +DARSHAN_PREFIX=@prefix@ + +# Libraries (and paths) to include before the MPI library +export PROFILE_PRELIB=`$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags` + +# Libraries to include after the MPI library +export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags` + +# C preprocessor arguments for any include files For example, to add +# /usr/local/myprof/include to the include path and the library libmyprof.a in +# /usr/local/myprof/lib to the link step, you could create the file myprof.conf with the +# lines +# PROFILE_INCPATHS diff --git a/darshan-runtime/share/mpi-profile/darshan-cxx.conf.in b/darshan-runtime/share/mpi-profile/darshan-cxx.conf.in new file mode 100644 index 0000000..c1bb183 --- /dev/null +++ b/darshan-runtime/share/mpi-profile/darshan-cxx.conf.in @@ -0,0 +1,18 @@ +#!/bin/bash + +# Example Darshan profiling configuration file for MPICH. + + +DARSHAN_PREFIX=@prefix@ + +# Libraries (and paths) to include before the MPI library +export PROFILE_PRELIB="-lmpichcxx `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`" + +# Libraries to include after the MPI library +export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags` + +# C preprocessor arguments for any include files For example, to add +# /usr/local/myprof/include to the include path and the library libmyprof.a in +# /usr/local/myprof/lib to the link step, you could create the file myprof.conf with the +# lines +# PROFILE_INCPATHS diff --git a/darshan-runtime/share/mpi-profile/darshan-f.conf.in b/darshan-runtime/share/mpi-profile/darshan-f.conf.in new file mode 100644 index 0000000..57dc94d --- /dev/null +++ b/darshan-runtime/share/mpi-profile/darshan-f.conf.in @@ -0,0 +1,18 @@ +#!/bin/bash + +# Example Darshan profiling configuration file for MPICH. + + +DARSHAN_PREFIX=@prefix@ + +# Libraries (and paths) to include before the MPI library +export PROFILE_PRELIB="-lfmpich `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`" + +# Libraries to include after the MPI library +export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags` + +# C preprocessor arguments for any include files For example, to add +# /usr/local/myprof/include to the include path and the library libmyprof.a in +# /usr/local/myprof/lib to the link step, you could create the file myprof.conf with the +# lines +# PROFILE_INCPATHS diff --git a/darshan-test/regression/workstation-profile-conf/env.sh b/darshan-test/regression/workstation-profile-conf/env.sh new file mode 100755 index 0000000..0147783 --- /dev/null +++ b/darshan-test/regression/workstation-profile-conf/env.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# General notes +####################### + +# Script to set up the environment for tests on this platform. Must export +# the following environment variables: +# +# DARSHAN_CC: command to compile C programs +# DARSHAN_CXX: command to compile C++ programs +# DARSHAN_F90: command to compile Fortran90 programs +# DARSHAN_F77: command to compile Fortran77 programs +# DARSHAN_RUNJOB: command to execute a job and wait for its completion + +# This script may load optional modules (as in a Cray PE), set LD_PRELOAD +# variables (as in a dynamically linked environment), or generate mpicc +# wrappers (as in a statically linked environment). + +# Notes specific to this platform (workstation-dynamic)_ +######################## +# This particular env script assumes that mpicc and its variants for other +# languages are already in the path, and that they will produce static +# executables by default. Darshan instrumentation is added by specifying +# a profiling configuration file using environment variables. + +# The runjob command is just mpiexec, no scheduler + +export DARSHAN_CC=mpicc +export DARSHAN_CXX=mpicxx +export DARSHAN_F77=mpif77 +export DARSHAN_F90=mpif90 + +export MPICC_PROFILE=$DARSHAN_PATH/share/mpi-profile/darshan-cc +export MPICXX_PROFILE=$DARSHAN_PATH/share/mpi-profile/darshan-cxx +export MPIF90_PROFILE=$DARSHAN_PATH/share/mpi-profile/darshan-f +export MPIF77_PROFILE=$DARSHAN_PATH/share/mpi-profile/darshan-f + +export DARSHAN_RUNJOB="mpiexec -n $DARSHAN_DEFAULT_NPROCS" -- 2.26.2