%bcond_without check %bcond_without mpich %bcond_without openmpi %bcond_with static Name: yaxt Version: 0.9.0 Release: 1%{?dist} Summary: Yet Another eXchange Tool License: BSD URL: https://www.dkrz.de/redmine/projects/%{name} Source0: https://www.dkrz.de/redmine/attachments/download/499/%{name}-%{version}.tar.xz BuildRequires: doxygen BuildRequires: gcc-gfortran BuildRequires: graphviz BuildRequires: perl(Data::Dumper) BuildRequires: perl(File::Temp) BuildRequires: perl(Getopt::Long) BuildRequires: perl(Storable) %if %{with mpich} BuildRequires: mpich-devel %endif %if %{with openmpi} BuildRequires: openmpi-devel %endif %if %{with mpich} %global mpi_list mpich %endif %if %{with openmpi} %global mpi_list %{?mpi_list} openmpi %endif %description YAXT is a C library built on MPI for the redistribution of data between two sets of processes. It is inspired by the Fortran prototype Unitrans by Mathias Pütz in ScalES-project. This package contains documentation for %{name}. %package doc Summary: Documentation files for %{name} BuildArch: noarch %description doc This package contains documentation files for developing applications that use %{name}. %if %{with mpich} %package mpich Summary: MPICH MPI libraries for %{name} BuildRequires: mpich-devel %description mpich This package contains MPICH MPI libraries for %{name}. %package mpich-devel Summary: Development files for %{name}-mpich Requires: %{name}-mpich%{?_isa} = %{version}-%{release} %description mpich-devel The %{name}-mpich-devel package contains libraries and header files for developing applications that use %{name}-mpich. %if %{with static} %package mpich-static Summary: Static libraries for %{name}-mpich Requires: %{name}-mpich-devel%{?_isa} = %{version}-%{release} %description mpich-static The %{name}-mpich-static package contains static libraries for developing applications that use %{name}-mpich. %endif %endif %if %{with openmpi} %package openmpi Summary: OpenMPI MPI libraries for %{name} BuildRequires: openmpi-devel %description openmpi This package contains OpenMPI MPI libraries for %{name}. %package openmpi-devel Summary: Development files for %{name}-openmpi Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %description openmpi-devel The %{name}-openmpi-devel package contains libraries and header files for developing applications that use %{name}-openmpi. %if %{with static} %package openmpi-static Summary: Static libraries for %{name}-openmpi Requires: %{name}-openmpi-devel%{?_isa} = %{version}-%{release} %description openmpi-static The %{name}-openmpi-static package contains static libraries for developing applications that use %{name}-openmpi. %endif %endif %prep %autosetup %build # Common configure options # Dependency tracking necessary for f90 module dependencies %global configure_opts \\\ --enable-dependency-tracking \\\ %{!?with_static:--disable-static} # Documentation doxygen -u doc/Doxyfile.in %make_build -C doc html/index.html # Workaround for building against MPICH with GCC-10 # https://gcc.gnu.org/gcc-10/porting_to.html#argument-mismatch %global build_fflags %{build_fflags} -fallow-argument-mismatch # Specify additional MPI_LAUNCH args for tests MPICH_MPI_LAUNCH_ARGS="-iface lo" OPENMPI_MPI_LAUNCH_ARGS="--oversubscribe" # MPI builds for mpi in %{mpi_list}; do mkdir ${mpi}-%{_vpath_builddir} cd ${mpi}-%{_vpath_builddir} module load mpi/${mpi}-%{_arch} ln -s ../configure . %configure %{configure_opts} \ FCFLAGS="$FCFLAGS -I${MPI_FORTRAN_MOD_DIR}" \ MPI_LAUNCH="/usr/lib64/${mpi}/bin/mpirun $(eval echo -e \"\${${mpi^^}_MPI_LAUNCH_ARGS}\")" \ CC=mpicc \ FC=mpifort \ --libdir=%{_libdir}/${mpi}/lib \ --bindir=%{_libdir}/${mpi}/bin \ --sbindir=%{_libdir}/${mpi}/sbin \ --includedir=%{_includedir}/${mpi}-%{_arch} \ --datarootdir=%{_libdir}/${mpi}/share \ --mandir=%{_libdir}/${mpi}/share/man %make_build module purge cd - done %install for mpi in %{mpi_list}; do module load mpi/${mpi}-%{_arch} %make_install -C ${mpi}-%{_vpath_builddir} rm -f ${RPM_BUILD_ROOT}/%{_libdir}/${mpi}/lib/*.la module purge done %check %if %{with check} for mpi in %{mpi_list}; do module load mpi/${mpi}-%{_arch} %make_build -j1 -C ${mpi}-%{_vpath_builddir} check module purge done %endif %files %doc README %files doc %doc doc/cfortran.* %doc doc/html %doc doc/styleguide.txt %doc examples/*.c %doc examples/*.h %doc examples/*.f90 %if %{with mpich} %files mpich %{_libdir}/mpich/lib/*.so.1* %files mpich-devel %{_includedir}/mpich-%{_arch}/* %{_libdir}/mpich/lib/*.so %{_libdir}/mpich/lib/pkgconfig/%{name}{,_c}.pc %if %{with static} %files mpich-static %{_libdir}/mpich/lib/*.a %endif %endif %if %{with openmpi} %files openmpi %{_libdir}/openmpi/lib/*.so.1* %files openmpi-devel %{_includedir}/openmpi-%{_arch}/* %{_libdir}/openmpi/lib/*.so %{_libdir}/openmpi/lib/pkgconfig/%{name}{,_c}.pc %if %{with static} %files openmpi-static %{_libdir}/openmpi/lib/*.a %endif %endif %changelog * Sat Aug 15 2020 Matthew Krupcale - 0.9.0-1 - Initial package