# Copyright (c) 2013, 2014 Dave Love, Liverpool University # MIT licence, per Fedora policy # Fixme: do graphics? # Fixme: separate doc package %global summ Multi-Processing (profiling) Environment for MPI %if 0%{?el6} %ifarch ppc64 %bcond_with mpich %else %bcond_without mpich %endif %else %bcond_without mpich %endif %bcond_with mpich Name: mpe2 Version: 2.4.9b Release: 2%{?dist} Summary: %summ License: MIT URL: http://www.mcs.anl.gov/research/projects/perfvis/ Source0: ftp://ftp.mcs.anl.gov/pub/mpi/mpe/mpe2-%version.tgz # Don't try to check that Java works. Check fails after removing .jars Patch1: mpe2-javacheck.patch Patch2: mpe2-mpiconst.patch BuildRequires: openmpi-devel gcc-gfortran java-devel autoconf ElectricFence %global desc \ The Multi-Processing Environment (MPE) attempts to provide programmers with \ a complete suite of performance analysis tools for their MPI programs based\ on post processing approach. These tools include a set of profiling libraries, \ a set of utility programs, and a set of graphical tools.\ \ The first set of tools to be used with user MPI programs is profiling libraries\ which provide a collection of routines that create log files. These log files\ can be created manually by inserting MPE calls in the MPI program, or \ automatically by linking with the appropriate MPE libraries, or by combining \ the above two methods. Currently, the MPE offers the following 4 profiling \ libraries.\ \ 1) Tracing Library - Traces all MPI calls. Each MPI call is preceded by a \ line that contains the rank in MPI_COMM_WORLD of the calling process, \ and followed by another line indicating that the call has completed.\ Most send and receive routines also indicate the values of count, tag,\ and partner (destination for sends, source for receives). Output is to\ standard output.\ \ 2) Animation Libraries - A simple form of real-time program animation \ that requires X window routines. \ \ 3) Logging Libraries - The most useful and widely used profiling libraries \ in MPE. These libraries form the basis to generate log files from \ user MPI programs. There are several different log file formats\ available in MPE. The default log file format is CLOG2. It is a low\ overhead logging format, a simple collection of single timestamp events.\ The old format ALOG, which is not being developed for years, is not\ distributed here. The powerful visualization format is SLOG-2, stands \ for Scalable LOGfile format version II which is a total redesign of the\ original SLOG format. SLOG-2 allows for much improved scalability for \ visualization purpose. CLOG2 file can be easily converted to \ SLOG-2 file through the new SLOG-2 viewer, Jumpshot-4. The MPI logging\ library is now thread-safe through the use of a global mutex over the\ the MPE logging library which is not yet thread-safe.\ \ 4) Collective and datatype checking library - An argument consistency \ checking library for MPI collective calls. It checks for datatype,\ root, and various argument consistency in MPI collective calls.\ If an error is detected, a backtrace of the callstack (on the supported\ platform) will be printed to locate the offended call.\ \ The set of utility programs in MPE includes log format converter (e.g. \ clogTOslog2), logfile print (e.g. slog2print) and logfile viewer and\ convertor (e.g. jumpshot). These new tools, clog2TOslog2, slog2print and\ jumpshot(Jumpshot-4) replace old tools, clog2slog, slog_print and logviewer\ (i.e. Jumpshot-2 and Jumpshot-3). %description %desc %package openmpi Summary: %summ - openmpi Requires: openmpi%{?isa} %description openmpi %desc This is the openmpi version. %if %{with mpich} %package mpich Summary: %summ - mpich BuildRequires: mpich-devel >= 3.0 Requires: mpich%{?isa} %description mpich %desc This is the mpich version. %endif %package doc Summary: Documentation for %name BuildArch: noarch %description doc Documentation for %name %prep %setup -q -c tar fx %SOURCE0 find -name \*.jar -exec rm {} \; cd mpe2-%version %patch1 -p1 -b .javacheck %patch2 -p0 -b .mpiconst cd src/slog2sdk autoconf cd ../../.. mv %name-%version openmpi # make complains about missing configure.ac if we do ../configure in a # sub-dir cp -a openmpi mpich cp openmpi/src/slog2sdk/COPYRIGHT COPYRIGHT.slog2sdk cp openmpi/src/collchk/COPYRIGHT COPYRIGHT.collchk cp openmpi/src/slog2sdk/FAQ FAQ.slog2sdk cp openmpi/src/collchk/NOTES NOTES.collchk %build export CFLAGS=-fPIC FFLAGS=-fPIC MPI_FFLAGS=-fPIC MPI_CFLAGS=-fPIC %global dobuild \ %configure --with-mpicc=mpicc --with-mpif77=mpif90 F77=gfortran \\\ --libdir=$MPI_LIB --datadir=%_datadir/mpe2 \\\ --includedir=$MPI_INCLUDE --sysconfdir=$MPI_SYSCONFIG \\\ --disable-collchk --enable-g --enable-f77 --enable-wrappers \\\ --enable-slog2=build --disable-graphics \ make %{?_smp_mflags} \ cd lib \ for d in libmpe libmpe_nompi libmpe_nompi_null libtmpe liblmpe libmpe_null libmpe_nompi libmpe_f2cmpi; do \ mkdir $d; cd $d; ar x ../$d.a; \ mpicc -shared -o ../$d.so.0 -Wl,-soname,$d.so.0 *o; \ cd ..; rm -r $d; \ done \ for f in *.so.0; do ln -s $f $(basename $f .0); done %{_openmpi_load} pushd openmpi %dobuild popd %{_openmpi_unload} %if %{with mpich} %{_mpich_load} pushd mpich MPI_SYSCONFIG=%_sysconfdir/mpich-%_arch %dobuild popd %{_mpich_unload} %endif %install rm -rf $RPM_BUILD_ROOT %_openmpi_load mkdir -p $RPM_BUILD_ROOT$MPI_BIN make -C openmpi install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%_javadir mv $RPM_BUILD_ROOT$MPI_LIB/*.jar $RPM_BUILD_ROOT%_javadir cp -p $RPM_BUILD_ROOT%_bindir/mpe[fc]c $RPM_BUILD_ROOT$MPI_BIN install openmpi/lib/lib*.so* $RPM_BUILD_ROOT$MPI_LIB %_openmpi_unload %if %{with mpich} %_mpich_load mkdir -p $RPM_BUILD_ROOT$MPI_BIN make -C mpich install DESTDIR=$RPM_BUILD_ROOT rm $RPM_BUILD_ROOT$MPI_LIB/*.jar cp -p $RPM_BUILD_ROOT%_bindir/mpe[fc]c $RPM_BUILD_ROOT$MPI_BIN install mpich/lib/lib*.so* $RPM_BUILD_ROOT$MPI_LIB %_mpich_unload %endif # remove uninstall and test progs rm -rf $RPM_BUILD_ROOT/usr/sbin $RPM_BUILD_ROOT%_datadir/mpe2/doc rm -rf $RPM_BUILD_ROOT%_docdir rm $RPM_BUILD_ROOT%_bindir/mpe[fc]c mv %buildroot%_datadir/mpe2/examples . find $RPM_BUILD_ROOT%_libdir -name \*.la -exec rm {} \; # fixme: where are these coming from? find $RPM_BUILD_ROOT%_libdir -name jartmp\* -exec rm {} \; sed -i -e 's/GUI_LIBDIR=.*$/GUI_LIBDIR=\$MPI_LIB/' \ -e 's|MAIN_LIB=.*$|MAIN_LIB=%_javadir/jumpshot.jar|' \ $RPM_BUILD_ROOT%_bindir/jumpshot %clean rm -rf $RPM_BUILD_ROOT %{!?_licensedir:%global license %%doc} %files %license openmpi/COPYRIGHT COPYRIGHT.* %_datadir/mpe2 %_javadir/* %_bindir/* %files openmpi %license openmpi/COPYRIGHT COPYRIGHT.* %config(noreplace) %_sysconfdir/openmpi-%_arch/* %exclude %_libdir/openmpi/lib/*.[oa] %_libdir/openmpi/lib/*.so* %_libdir/openmpi/lib/*/*.so* %_libdir/openmpi/bin/* %_includedir/openmpi-%_arch/* %if %{with mpich} %files mpich %license openmpi/COPYRIGHT COPYRIGHT.* %doc mpich/README %config(noreplace) %_sysconfdir/mpich-%_arch/* %exclude %_libdir/mpich/lib/*.[oa] %_libdir/mpich/lib/*.so* %_libdir/mpich/lib/*/*.so* %_libdir/mpich/bin/* %_includedir/mpich-%_arch/* %endif %files doc %doc openmpi/src/slog2sdk/doc/jumpshot-4 openmpi/README %doc openmpi/src/slog2sdk/README.sdk openmpi/src/slog2sdk/TODO %doc NOTES* FAQ* %doc examples %changelog * Sun Apr 24 2016 Dave Love - 2.4.9b-2 - Build all the shared libraries * Mon Dec 14 2015 Dave Love - 2.4.9b-1 - New version - Fix Source0 - Require java - Re-arrange sub-package contents: replace mpe2-common with main package and add -doc * Fri Aug 21 2015 Dave Love - 2.4.7-3 - Fix URL - Mark conffiles - Conditionalize mpich - Rebuild java stuff * Fri Mar 13 2015 Dave Love - 2.4.7-2 - Fix requires * Wed Mar 11 2015 Dave Love - 2.4.7-1 - New version * Sun Nov 23 2014 Dave Love - 1.3.0.svn10917-1 - Re-named new version, supporting MPI-3, unbundled from mpich - Add mpich * Thu Dec 12 2013 Dave Love - 1.3.0-2 - Use $MPI_... * Thu Dec 5 2013 Dave Love - 1.3.0-1 - Initial packaging