# Copyright (c) 2018 Dave Love, University of Manchester # MIT licence, per Fedora policy %global calcommit 2c35e4ab011ebc90775fc332b484378ef44609bc %global shortcal %(c=%{calcommit}; echo ${c:0:7}) Name: simgrid Version: 3.25 Release: 2%{?dist} Summary: Versatile Simulation of Distributed Systems # MIT for calibration License: LGPLv2 and MIT URL: https://simgrid.org Source0: https://framagit.org/simgrid/simgrid/uploads/0365f13697fb26eae8c20fc234c5af0e/SimGrid-3.25.tar.gz # Re-packed without the (large) contents of the data directory Source1: https://framagit.org/simgrid/platform-calibration/-/archive/%shortcal/platform-calibration-%shortcal.tar.bz2 # Remove classpath from jar manifest Patch1: simgrid-classpath.patch %if 0%{?el7} BuildRequires: devtoolset-9-gcc-c++ devtoolset-9-gcc-gfortran boost169-devel %else BuildRequires: gcc-c++ gcc-gfortran boost{?el7:169}-devel %endif BuildRequires: cmake3 %_bindir/python3 BuildRequires: chrpath valgrind doxygen transfig ghostscript papi-devel BuildRequires: libunwind-devel graphviz-devel python-sphinx openblas-devel # These are for model checking. elfutils is for libdw. (Broken, as below.) #BuildRequires: elfutils-devel libevent-devel %description SimGrid is a scientific instrument to study the behavior of large-scale distributed systems such as Grids, Clouds, HPC or P2P systems. It can be used to evaluate heuristics, prototype applications or even assess legacy MPI applications. See the vite package for viewing generated Paje traces. %package devel Summary: Development files for %name Requires: %name%{?_isa} = %version-%release %description devel Development files for %name. %package doc Summary: Documentation for %name Requires: %name%{?_isa} = %version-%release %description doc Documentation for %name. %package java Summary: Java bindings for %name BuildRequires: java-devel jpackage-utils Requires: java jpackage-utils %description java Java bindings for %name. %package calibration-openmpi%{?el7:3} Summary: Simgrid smpi calibration - openmpi%{?el7:3} BuildRequires: openmpi%{?el7:3}-devel libxml2-devel Requires: openmpi%{?el7:3}%{?_isa} %{?el7:Obsoletes: simgrid-calibration-openmpi} %description calibration-openmpi%{?el7:3} Programs and data for %name platform calibration, openmpi%{?el7:3} version. (R is necessary for the analysis but not required by this package.) %prep %setup -q -n SimGrid-%version tar fx %SOURCE1 %patch1 -p1 %build %{?el7:. /opt/rh/devtoolset-9/enable} # Fixme: Debian has: # ifeq ($(DEB_HOST_GNU_CPU),arm) # CFLAGS += -funwind-tables # endif mkdir build model-build pushd platform-calibration*/src/calibration %if 0%{?el7} %_openmpi3_load %else %_openmpi_load %endif %make_build IDIR=$MPI_INCLUDE gcc $(CFLAGS) -O3 -o calibrate_blas calibrate_blas.c utils.c -lopenblas -I %_includedir/openblas cd ../saturation mpicc alltoall_loadtest.c -o alltoall_loadtest popd %if 0 # Fails (in el7) with link error as libunwind-ptrace is only .a # without -fPIC. pushd model-build export LDFLAGS=-Wl,-rpath=%_libdir/simgrid-mc %cmake3 .. -Denable_smpi=on -Denable_smpi_papi=on -Denable_lto=on -Denable_java=on -Denable_model-checking=on -Denable_lib_in_jar=OFF %make_build unset LDFLAGS CFLAGS popd %endif pushd build %cmake3 .. -Denable_smpi=on -Denable_smpi_papi=on -Denable_lto=on -Denable_java=on -Denable_lib_in_jar=OFF -Denable_msg=ON %{?el7:-DBOOST_INCLUDEDIR=%_includedir/boost169} %make_build popd %install %make_install -C build [ %_lib = lib ] || mv %buildroot%_prefix/lib %buildroot%_libdir mkdir -p %buildroot%_javadir mv %buildroot%_prefix/java/simgrid.jar %buildroot%_javadir rmdir %buildroot%_prefix/java %if 0%{?el7} %_openmpi3_load %else %_openmpi_load %endif mkdir -p %buildroot$MPI_BIN %buildroot%_datadir/%name-calibration cp -p platform-calibration*/src/calibration/calibrate %buildroot$MPI_BIN/smpi-calibrate cp -p platform-calibration*/src/calibration/calibrate_blas %buildroot$MPI_BIN/smpi-calibrate_blas cp -p platform-calibration*/src/saturation/alltoall_loadtest %buildroot$MPI_BIN cp -pr platform-calibration*/src/calibration/Analysis.Rmd %buildroot%_datadir/%name-calibration cp -pr platform-calibration*/template %buildroot%_datadir/%name-calibration cp -p platform-calibration*/src/computation-calibration/computation-calibration.org %buildroot%_datadir/%name-calibration cp -p platform-calibration*/src/saturation/LoadAnalyze.Rnw %buildroot%_datadir/%name-calibration chmod 0644 %buildroot%_includedir/smpi/mpi.mod chrpath -d %buildroot%_bindir/graphicator %ldconfig_scriptlets %ldconfig_scriptlets java %files %doc AUTHORS CITATION.bib ChangeLog NEWS README.md %license COPYING LICENSE-LGPL-2.1 %exclude %_libdir/libsimgrid-java.* %_libdir/*.so.* %files devel %doc examples %_includedir/* %_bindir/* %_mandir/man1/* %_libdir/*.so %_libdir/pkgconfig/simgrid.pc %files java %_javadir/simgrid.jar %_libdir/libsimgrid-java.* %files calibration-openmpi%{?el7:3} %doc platform-calibration*/README.md platform-calibration*/Calibration_Labbook.org platform-calibration*/src/calibration/examples %license COPYING LICENSE-LGPL-2.1 %_libdir/openmpi%{?el7:3}/bin/smpi-calibrate %_libdir/openmpi%{?el7:3}/bin/smpi-calibrate_blas %_libdir/openmpi%{?el7:3}/bin/alltoall_loadtest %_libdir/simgrid %_datadir/%name-calibration %files doc %changelog * Wed Sep 23 2020 Dave Love - 3.25-2 - Update calibration - Use openmpi3 on el7 - Add calibrate_blas * Sun Apr 26 2020 Dave Love - 3.25-1 - New version - Update URLs - Remove dos2unix - Use cmake3, adjust compiler flags * Wed Nov 14 2018 - 3.21-1 - Initial packaging