# Copyright (c) 2015 Dave Love, Liverpool University # The licence for this file is as for the package itself. %if 0%{?el6} %ifarch ppc64 %bcond_with mpich %else %bcond_without mpich %endif %else %bcond_without mpich %endif Name: sionlib Version: 1.7.6 Release: 1%{?dist} Summary: Scalable I/O library for parallel access to task-local files License: BSD URL: http://www.fz-juelich.de/ias/jsc/EN/Expertise/Support/Software/SIONlib/_node.html # (Not directly downloadable) from: # https://apps.fz-juelich.de/cgi-bin/jsc/sionlib/getsoftware.cgi #Source0: sionlib-%version.tar.gz Source0: http://apps.fz-juelich.de/jsc/sionlib/download.php?version=%version#/%name-%version.tar.gz # build shared libs Patch1: sionlib-shared.patch BuildRequires: openmpi-devel gcc-c++ %if %{with mpich} BuildRequires: mpich-devel %endif %global desc\ SIONlib is a small library for writing and reading binary data\ to/from from several thousands of processors into one or a small number of\ physical files. The library provides global open and close functions\ for accessing one file for writing and reading in parallel. Only these\ function are collective, writing and reading to/from this file can be\ done asynchronously. sionlib provides a sion file handle and also an\ file pointer (FILE *) which allows to use the standard C file I/O\ operations (POSIX). This file pointer points to a unique position in\ the file.\ \ SIONlib provides a simplified file handling for a parallel program\ that formerly had to read or write binary data in parallel into\ separate files (task-local files). After opening the file with\ sionlib, the I/O can be done with the standard C-I/O functionality\ (fwrite, fread) without changing the existing program. Instead of\ maintaining thousands of separate files for storing the data, there is\ only one large file containing all the data.\ \ SIONlib provides two different interfaces: one for parallel access\ using MPI and one for sequential access which is also used internally\ by the SIONlib utilities. %description %desc %package devel Summary: Development files for %name Requires: %name%{?_isa} = %version-%release %description devel Development files for %name %package openmpi Summary: Scalable I/O library for parallel access to task-local files -openmpi Requires: openmpi%{?_isa} %description openmpi %desc This is the openmpi version. %package openmpi-devel Summary: Development files for %name-openmpi Requires: %name-openmpi%{?_isa} = %version-%release %description openmpi-devel Development files for %name-openmpi %if %{with mpich} %package mpich Summary: Scalable I/O library for parallel access to task-local files -mpich Requires: mpich%{?_isa} %description mpich %desc This is the mpich version. %package mpich-devel Summary: Development files for %name-mpich Requires: %name-mpich%{?_isa} = %version-%release %description mpich-devel Development files for %name-mpich %endif %prep %setup -q -n sionlib %patch1 -p1 -b .shared # The supplied one loses with symlinks ln -sf %_bindir/install config/install-sh %build # Not autoconfiscated %_openmpi_load # Hack around the lack of DESTDIR support without tedious patching; # see also the install section. mkdir -p $RPM_BUILD_ROOT$MPI_HOME ./configure --prefix=$RPM_BUILD_ROOT$MPI_HOME --compiler=gnu --mpi=openmpi %make_build -C build-linux-gomp-openmpi OPTFLAGS="$RPM_OPT_FLAGS -fPIC" %_openmpi_unload %if %{with mpich} %_mpich_load mkdir -p $RPM_BUILD_ROOT$MPI_HOME # mpich2 as opposed to mpich(1) ./configure --prefix=$RPM_BUILD_ROOT$MPI_HOME --compiler=gnu --mpi=mpich2 %make_build -C build-linux-gomp-mpich2 OPTFLAGS="$RPM_OPT_FLAGS -fPIC" MPIF77=mpif77 MPIF90=mpif90 %_mpich_unload %endif mkdir -p $RPM_BUILD_ROOT%_prefix ./configure --prefix=$RPM_BUILD_ROOT%_prefix --compiler=gnu --disable-mpi --disable-openmp %make_build -C build-linux-gomp-nompi OPTFLAGS="$RPM_OPT_FLAGS -fPIC" %install %_openmpi_load make install INCDIR=$RPM_BUILD_ROOT$MPI_INCLUDE PREFIX=$RPM_BUILD_ROOT$MPI_HOME -C build-linux-gomp-openmpi mkdir -p $RPM_BUILD_ROOT$MPI_FORTRAN_MOD_DIR mv $RPM_BUILD_ROOT$MPI_INCLUDE/mod*/*.mod $RPM_BUILD_ROOT$MPI_FORTRAN_MOD_DIR rmdir $RPM_BUILD_ROOT$MPI_INCLUDE/mod* %_openmpi_unload %if %{with mpich} %_mpich_load make install INCDIR=$RPM_BUILD_ROOT$MPI_INCLUDE PREFIX=$RPM_BUILD_ROOT$MPI_HOME -C build-linux-gomp-mpich2 mkdir -p $RPM_BUILD_ROOT$MPI_FORTRAN_MOD_DIR mv $RPM_BUILD_ROOT$MPI_INCLUDE/mod*/*.mod $RPM_BUILD_ROOT$MPI_FORTRAN_MOD_DIR rmdir $RPM_BUILD_ROOT$MPI_INCLUDE/mod* %_mpich_unload %endif make install PREFIX=$RPM_BUILD_ROOT%_prefix LIBDIR=$RPM_BUILD_ROOT%_libdir -C build-linux-gomp-nompi mkdir -p $RPM_BUILD_ROOT%_fmoddir mv $RPM_BUILD_ROOT%_includedir/mod*/*.mod $RPM_BUILD_ROOT%_fmoddir rmdir $RPM_BUILD_ROOT%_includedir/mod* for f in $(find $RPM_BUILD_ROOT -name Makefile.defs) \ $RPM_BUILD_ROOT%_libdir/*/bin/sionconfig \ $RPM_BUILD_ROOT%_bindir/sionconfig; do sed -i -e "s|$RPM_BUILD_ROOT||" $f done for f in $(find build-linux*/build/examples -name Makefile.defs); do sed -i -e "s|$RPM_BUILD_ROOT||" $f done find $RPM_BUILD_ROOT -name examples | xargs rm -rf # not done by make install find $RPM_BUILD_ROOT%_libdir -name \*.so.\* | xargs strip # Necessary for provides generation find $RPM_BUILD_ROOT%_libdir -name *.so.* | xargs chmod +x %check # We probably can't test with MPI-IO. pushd build-linux-gomp-nompi/build/test/serial make test LD_LIBRARY_PATH=%buildroot%_libdir popd %ldconfig_scriptlets %files # COPYRIGHT and LICENSE are the same %license LICENSE README %doc README %exclude %_bindir/sionconfig %_bindir/* %_libdir/*.so.* %files devel %license LICENSE %doc doc/* README build-linux-gomp-nompi/build/examples %_bindir/sionconfig %exclude %_libdir/*.a %_libdir/*.so %_includedir/*.* %_fmoddir/* %files openmpi %doc LICENSE README %exclude %_libdir/openmpi/bin/sionconfig %_libdir/openmpi/lib/*.so.* %_libdir/openmpi/bin/* %files openmpi-devel %doc doc/* LICENSE README build-linux-gomp-openmpi/build/examples %_libdir/openmpi/bin/sionconfig %exclude %_libdir/openmpi/lib/*.a %_libdir/openmpi/lib/*.so %_includedir/openmpi-%_arch/*.* %if %{with mpich} %files mpich %doc LICENSE README %exclude %_libdir/mpich/bin/sionconfig %_libdir/mpich/lib/*.so.* %_libdir/mpich/bin/* %files mpich-devel %doc doc/* LICENSE README build-linux-gomp-mpich2/build/examples %_libdir/mpich/bin/sionconfig %exclude %_libdir/mpich/lib/*.a %_libdir/mpich/lib/*.so %_includedir/mpich-%_arch/*.* %endif %changelog * Tue May 26 2020 Dave Love - 1.7.6-1 - New version * Mon Oct 29 2018 Dave Love - 1.7.2-1 - New version - BR g++ - Provide working MPIF77, MPIF90 definitions for current mpich * Mon May 4 2015 Dave Love - 1.5.4-1 - Initial packaging