diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..482dd61 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/openmpi-3.1.2.tar.bz2 diff --git a/.openmpi.metadata b/.openmpi.metadata new file mode 100644 index 0000000..1c6e004 --- /dev/null +++ b/.openmpi.metadata @@ -0,0 +1 @@ +b93c3b6ece16064e95578ec104f0c695c47a9fc8 SOURCES/openmpi-3.1.2.tar.bz2 diff --git a/SOURCES/fix-optimization-flags.patch b/SOURCES/fix-optimization-flags.patch new file mode 100644 index 0000000..7c081e5 --- /dev/null +++ b/SOURCES/fix-optimization-flags.patch @@ -0,0 +1,187 @@ +Index: openmpi-3.1.2/orte/test/system/Makefile +=================================================================== +--- openmpi-3.1.2.orig/orte/test/system/Makefile ++++ openmpi-3.1.2/orte/test/system/Makefile +@@ -21,4 +21,4 @@ pmixtool: + ortecc -o pmixtool pmixtool.c -lpmix + + threads: +- ortecc -O0 -g -lpthread -lhwloc threads.c -o threads ++ ortecc -O2 -g -lpthread -lhwloc threads.c -o threads +Index: openmpi-3.1.2/orte/tools/orte-dvm/Makefile.in +=================================================================== +--- openmpi-3.1.2.orig/orte/tools/orte-dvm/Makefile.in ++++ openmpi-3.1.2/orte/tools/orte-dvm/Makefile.in +@@ -558,7 +558,7 @@ CCAS = @CCAS@ + CCASDEPMODE = @CCASDEPMODE@ + CCASFLAGS = @CCASFLAGS@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = $(CFLAGS_WITHOUT_OPTFLAGS) $(DEBUGGER_CFLAGS) ++CFLAGS = @CFLAGS@ + CFLAGS_WITHOUT_OPTFLAGS = @CFLAGS_WITHOUT_OPTFLAGS@ + CLEANFILES = @CLEANFILES@ + CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ +Index: openmpi-3.1.2/orte/tools/prun/Makefile.in +=================================================================== +--- openmpi-3.1.2.orig/orte/tools/prun/Makefile.in ++++ openmpi-3.1.2/orte/tools/prun/Makefile.in +@@ -558,7 +558,7 @@ CCAS = @CCAS@ + CCASDEPMODE = @CCASDEPMODE@ + CCASFLAGS = @CCASFLAGS@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = $(CFLAGS_WITHOUT_OPTFLAGS) $(DEBUGGER_CFLAGS) ++CFLAGS = @CFLAGS@ + CFLAGS_WITHOUT_OPTFLAGS = @CFLAGS_WITHOUT_OPTFLAGS@ + CLEANFILES = @CLEANFILES@ + CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ +Index: openmpi-3.1.2/orte/Makefile.in +=================================================================== +--- openmpi-3.1.2.orig/orte/Makefile.in ++++ openmpi-3.1.2/orte/Makefile.in +@@ -2162,7 +2162,7 @@ AM_LFLAGS = -Porte_util_hostfile_ + liborted_mpir_la_SOURCES = \ + orted/orted_submit.c + +-liborted_mpir_la_CFLAGS = $(CFLAGS_WITHOUT_OPTFLAGS) $(DEBUGGER_CFLAGS) ++liborted_mpir_la_CFLAGS = $(CFLAGS) + all: all-recursive + + .SUFFIXES: +Index: openmpi-3.1.2/ompi/debuggers/Makefile.in +=================================================================== +--- openmpi-3.1.2.orig/ompi/debuggers/Makefile.in ++++ openmpi-3.1.2/ompi/debuggers/Makefile.in +@@ -756,7 +756,7 @@ CCDEPMODE = @CCDEPMODE@ + # may already have debugging and/or optimization flags). We use + # post-processed forms of the CFLAGS in the library targets down + # below. +-CFLAGS = $(CFLAGS_WITHOUT_OPTFLAGS) $(DEBUGGER_CFLAGS) ++CFLAGS = @CFLAGS@ + CFLAGS_WITHOUT_OPTFLAGS = @CFLAGS_WITHOUT_OPTFLAGS@ + CLEANFILES = @CLEANFILES@ + CONFIGURE_DEPENDENCIES = @CONFIGURE_DEPENDENCIES@ +@@ -1984,7 +1984,7 @@ common = ompi_common_dll_defs.h ompi_com + + # MPI message queue DLL + libompi_dbg_msgq_la_SOURCES = ompi_msgq_dll.c ompi_msgq_dll_defs.h $(common) +-libompi_dbg_msgq_la_CFLAGS = -g ++libompi_dbg_msgq_la_CFLAGS = -O2 -g + libompi_dbg_msgq_la_LDFLAGS = -module -avoid-version + + # These are checks for the padding on predefined MPI object types. +Index: openmpi-3.1.2/ompi/mpi/fortran/use-mpi-tkr/Makefile.in +=================================================================== +--- openmpi-3.1.2.orig/ompi/mpi/fortran/use-mpi-tkr/Makefile.in ++++ openmpi-3.1.2/ompi/mpi/fortran/use-mpi-tkr/Makefile.in +@@ -1809,7 +1809,7 @@ ompi__v_GEN_0 = @echo " GENERATE" $@; + # current directory) because it is generated. + @OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS_TRUE@AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \ + @OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS_TRUE@ $(OMPI_FC_MODULE_FLAG). -I$(srcdir) -I. \ +-@OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS_TRUE@ -I$(top_builddir)/ompi/mpi/fortran/use-mpi-tkr $(FCFLAGS_f90) ++@OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS_TRUE@ -I$(top_builddir)/ompi/mpi/fortran/use-mpi-tkr $(FCFLAGS) $(FCFLAGS_f90) + + + # Do different things if the top-level configure decided that we're +@@ -1969,13 +1969,13 @@ distclean-compile: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + + .f90.o: +- $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< ++ $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS) $(FCFLAGS_f90) $< + + .f90.obj: +- $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` ++ $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS) $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` + + .f90.lo: +- $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< ++ $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS) $(FCFLAGS_f90) $< + + mostlyclean-libtool: + -rm -f *.lo +Index: openmpi-3.1.2/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.in +=================================================================== +--- openmpi-3.1.2.orig/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.in ++++ openmpi-3.1.2/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.in +@@ -1783,7 +1783,7 @@ ompi__v_GEN_0 = @echo " GENERATE" $@; + # mpi" MPI bindings. + @OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS_TRUE@AM_CPPFLAGS = -DOMPI_PROFILE_LAYER=0 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1 + @OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS_TRUE@AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \ +-@OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS_TRUE@ -I$(top_builddir) -I$(top_srcdir) $(FCFLAGS_f90) ++@OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS_TRUE@ -I$(top_builddir) -I$(top_srcdir) $(FCFLAGS) $(FCFLAGS_f90) + + @OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS_TRUE@lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@_usempi_ignore_tkr.la + @OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS_TRUE@lib@OMPI_LIBMPI_NAME@_usempi_ignore_tkr_la_SOURCES = \ +@@ -1904,13 +1904,13 @@ distclean-compile: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + + .f90.o: +- $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< ++ $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS) $(FCFLAGS_f90) $< + + .f90.obj: +- $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` ++ $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS) $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` + + .f90.lo: +- $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< ++ $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS) $(FCFLAGS_f90) $< + + mostlyclean-libtool: + -rm -f *.lo +Index: openmpi-3.1.2/ompi/mpi/fortran/mpiext/Makefile.in +=================================================================== +--- openmpi-3.1.2.orig/ompi/mpi/fortran/mpiext/Makefile.in ++++ openmpi-3.1.2/ompi/mpi/fortran/mpiext/Makefile.in +@@ -1723,7 +1723,7 @@ ucx_STATIC_LIBS = @ucx_STATIC_LIBS@ + @OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT_TRUE@AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \ + @OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT_TRUE@ $(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/base \ + @OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT_TRUE@ $(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/use-mpi-f08/mod \ +-@OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT_TRUE@ -I$(top_srcdir) $(FCFLAGS_f90) ++@OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT_TRUE@ -I$(top_srcdir) $(FCFLAGS) $(FCFLAGS_f90) + + @OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT_TRUE@flibs = $(am__append_1) \ + @OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT_TRUE@ $(am__append_2) +Index: openmpi-3.1.2/ompi/mpi/fortran/use-mpi-f08/Makefile.in +=================================================================== +--- openmpi-3.1.2.orig/ompi/mpi/fortran/use-mpi-f08/Makefile.in ++++ openmpi-3.1.2/ompi/mpi/fortran/use-mpi-f08/Makefile.in +@@ -2870,7 +2870,7 @@ ompi__v_GEN_0 = @echo " GENERATE" $@; + @OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@ -I$(top_srcdir)/ompi/include \ + @OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@ $(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/$(OMPI_FORTRAN_USEMPI_DIR) \ + @OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@ $(OMPI_FC_MODULE_FLAG)mod \ +-@OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@ -I$(top_srcdir) $(FCFLAGS_f90) ++@OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@ -I$(top_srcdir) $(FCFLAGS) $(FCFLAGS_f90) + + @OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@MOSTLYCLEANFILES = *.mod + @OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@_usempif08.la +@@ -4444,13 +4444,13 @@ distclean-compile: + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + + .f90.o: +- $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< ++ $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS) $(FCFLAGS_f90) $< + + .f90.obj: +- $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` ++ $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS) $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` + + .f90.lo: +- $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< ++ $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS) $(FCFLAGS_f90) $< + + mostlyclean-libtool: + -rm -f *.lo +Index: openmpi-3.1.2/ompi/mpi/fortran/use-mpi-f08/mod/Makefile.in +=================================================================== +--- openmpi-3.1.2.orig/ompi/mpi/fortran/use-mpi-f08/mod/Makefile.in ++++ openmpi-3.1.2/ompi/mpi/fortran/use-mpi-f08/mod/Makefile.in +@@ -1737,7 +1737,7 @@ ompi__v_GEN_0 = @echo " GENERATE" $@; + @OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@ -I$(top_srcdir)/ompi/include \ + @OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@ $(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/$(OMPI_FORTRAN_USEMPI_DIR) \ + @OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@ $(OMPI_FC_MODULE_FLAG). \ +-@OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@ -I$(top_srcdir) $(FCFLAGS_f90) ++@OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@ -I$(top_srcdir) $(FCFLAGS) $(FCFLAGS_f90) + + @OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS_TRUE@MOSTLYCLEANFILES = *.mod + diff --git a/SOURCES/macros.openmpi b/SOURCES/macros.openmpi new file mode 100644 index 0000000..05e613f --- /dev/null +++ b/SOURCES/macros.openmpi @@ -0,0 +1,6 @@ +%_openmpi_load \ + . /etc/profile.d/modules.sh; \ + module load mpi/openmpi-%{_arch}; +%_openmpi_unload \ + . /etc/profile.d/modules.sh; \ + module unload mpi/openmpi-%{_arch}; diff --git a/SOURCES/openmpi-2.1.1-disable-fifo-test.patch b/SOURCES/openmpi-2.1.1-disable-fifo-test.patch new file mode 100644 index 0000000..697111f --- /dev/null +++ b/SOURCES/openmpi-2.1.1-disable-fifo-test.patch @@ -0,0 +1,103 @@ +--- openmpi-2.1.1/test/class/Makefile.am 2017-05-10 08:41:36.000000000 -0700 ++++ openmpi-2.1.1/test/class/Makefile.am.new 2017-08-24 09:07:12.539374461 -0700 +@@ -95,11 +95,14 @@ + $(top_builddir)/test/support/libsupport.a + opal_lifo_DEPENDENCIES = $(opal_lifo_LDADD) + +-opal_fifo_SOURCES = opal_fifo.c +-opal_fifo_LDADD = \ +- $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ +- $(top_builddir)/test/support/libsupport.a +-opal_fifo_DEPENDENCIES = $(opal_fifo_LDADD) ++# Disabled due to: ++# https://github.com/open-mpi/ompi/issues/2526 ++# https://github.com/open-mpi/ompi/issues/2966 ++#opal_fifo_SOURCES = opal_fifo.c ++#opal_fifo_LDADD = \ ++# $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ ++# $(top_builddir)/test/support/libsupport.a ++#opal_fifo_DEPENDENCIES = $(opal_fifo_LDADD) + + clean-local: + rm -f opal_bitmap_test_out.txt opal_hash_table_test_out.txt opal_proc_table_test_out.txt +--- openmpi-2.1.1/test/class/Makefile.in 2017-05-10 09:01:13.000000000 -0700 ++++ openmpi-2.1.1/test/class/Makefile.in.new 2017-08-24 09:07:12.539374461 -0700 +@@ -115,7 +115,7 @@ + opal_hash_table$(EXEEXT) opal_proc_table$(EXEEXT) \ + opal_tree$(EXEEXT) opal_list$(EXEEXT) \ + opal_value_array$(EXEEXT) opal_pointer_array$(EXEEXT) \ +- opal_lifo$(EXEEXT) opal_fifo$(EXEEXT) ++ opal_lifo$(EXEEXT) + subdir = test/class + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/config/c_get_alignment.m4 \ +@@ -411,8 +411,6 @@ + am__v_lt_1 = + am_opal_bitmap_OBJECTS = opal_bitmap.$(OBJEXT) + opal_bitmap_OBJECTS = $(am_opal_bitmap_OBJECTS) +-am_opal_fifo_OBJECTS = opal_fifo.$(OBJEXT) +-opal_fifo_OBJECTS = $(am_opal_fifo_OBJECTS) + am_opal_hash_table_OBJECTS = opal_hash_table.$(OBJEXT) + opal_hash_table_OBJECTS = $(am_opal_hash_table_OBJECTS) + am_opal_lifo_OBJECTS = opal_lifo.$(OBJEXT) +@@ -462,12 +460,12 @@ + am__v_CCLD_0 = @echo " CCLD " $@; + am__v_CCLD_1 = + SOURCES = $(ompi_rb_tree_SOURCES) $(opal_bitmap_SOURCES) \ +- $(opal_fifo_SOURCES) $(opal_hash_table_SOURCES) \ ++ $(opal_hash_table_SOURCES) \ + $(opal_lifo_SOURCES) $(opal_list_SOURCES) \ + $(opal_pointer_array_SOURCES) $(opal_proc_table_SOURCES) \ + $(opal_tree_SOURCES) $(opal_value_array_SOURCES) + DIST_SOURCES = $(ompi_rb_tree_SOURCES) $(opal_bitmap_SOURCES) \ +- $(opal_fifo_SOURCES) $(opal_hash_table_SOURCES) \ ++ $(opal_hash_table_SOURCES) \ + $(opal_lifo_SOURCES) $(opal_list_SOURCES) \ + $(opal_pointer_array_SOURCES) $(opal_proc_table_SOURCES) \ + $(opal_tree_SOURCES) $(opal_value_array_SOURCES) +@@ -1900,12 +1898,6 @@ + $(top_builddir)/test/support/libsupport.a + + opal_lifo_DEPENDENCIES = $(opal_lifo_LDADD) +-opal_fifo_SOURCES = opal_fifo.c +-opal_fifo_LDADD = \ +- $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ +- $(top_builddir)/test/support/libsupport.a +- +-opal_fifo_DEPENDENCIES = $(opal_fifo_LDADD) + all: all-am + + .SUFFIXES: +@@ -1957,10 +1949,6 @@ + @rm -f opal_bitmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(opal_bitmap_OBJECTS) $(opal_bitmap_LDADD) $(LIBS) + +-opal_fifo$(EXEEXT): $(opal_fifo_OBJECTS) $(opal_fifo_DEPENDENCIES) $(EXTRA_opal_fifo_DEPENDENCIES) +- @rm -f opal_fifo$(EXEEXT) +- $(AM_V_CCLD)$(LINK) $(opal_fifo_OBJECTS) $(opal_fifo_LDADD) $(LIBS) +- + opal_hash_table$(EXEEXT): $(opal_hash_table_OBJECTS) $(opal_hash_table_DEPENDENCIES) $(EXTRA_opal_hash_table_DEPENDENCIES) + @rm -f opal_hash_table$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(opal_hash_table_OBJECTS) $(opal_hash_table_LDADD) $(LIBS) +@@ -1997,7 +1985,6 @@ + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ompi_rb_tree.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opal_bitmap.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opal_fifo.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opal_hash_table.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opal_lifo.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opal_list.Po@am__quote@ +@@ -2291,13 +2278,6 @@ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ +- "$$tst" $(AM_TESTS_FD_REDIRECT) +-opal_fifo.log: opal_fifo$(EXEEXT) +- @p='opal_fifo$(EXEEXT)'; \ +- b='opal_fifo'; \ +- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ +- --log-file $$b.log --trs-file $$b.trs \ +- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) + .test.log: + @p='$<'; \ diff --git a/SOURCES/openmpi.module.in b/SOURCES/openmpi.module.in new file mode 100644 index 0000000..6885013 --- /dev/null +++ b/SOURCES/openmpi.module.in @@ -0,0 +1,21 @@ +#%Module 1.0 +# +# OpenMPI module for use with 'environment-modules' package: +# +conflict mpi +prepend-path PATH @LIBDIR@/bin +prepend-path LD_LIBRARY_PATH @LIBDIR@/lib +prepend-path PKG_CONFIG_PATH @LIBDIR@/lib/pkgconfig +prepend-path MANPATH @MANDIR@ +setenv MPI_BIN @LIBDIR@/bin +setenv MPI_SYSCONFIG @ETCDIR@ +setenv MPI_FORTRAN_MOD_DIR @FMODDIR@ +setenv MPI_INCLUDE @INCDIR@ +setenv MPI_LIB @LIBDIR@/lib +setenv MPI_MAN @MANDIR@ +setenv MPI_PYTHON_SITEARCH @PYSITEARCH@ +setenv MPI_PYTHON2_SITEARCH @PYSITEARCH@ +setenv MPI_PYTHON3_SITEARCH @PYSITEARCH@ +setenv MPI_COMPILER @COMPILER@ +setenv MPI_SUFFIX @SUFFIX@ +setenv MPI_HOME @LIBDIR@ diff --git a/SOURCES/openmpi.pth.py3 b/SOURCES/openmpi.pth.py3 new file mode 100644 index 0000000..ced8c64 --- /dev/null +++ b/SOURCES/openmpi.pth.py3 @@ -0,0 +1 @@ +import sys, os; s = os.getenv('MPI_PYTHON3_SITEARCH'); s and (s in sys.path or sys.path.append(s)) diff --git a/SPECS/openmpi.spec b/SPECS/openmpi.spec new file mode 100644 index 0000000..3989c22 --- /dev/null +++ b/SPECS/openmpi.spec @@ -0,0 +1,366 @@ +%global _hardened_build 1 +# We only compile with gcc, but other people may want other compilers. +# Set the compiler here. +%global opt_cc gcc +# Optional CFLAGS to use with the specific compiler...gcc doesn't need any, +# so uncomment and define to use +#global opt_cflags +%global opt_cxx g++ +#global opt_cxxflags +%global opt_f77 gfortran +#global opt_fflags +%global opt_fc gfortran +#global opt_fcflags + + +# Optional name suffix to use...we leave it off when compiling with gcc, but +# for other compiled versions to install side by side, it will need a +# suffix in order to keep the names from conflicting. +#global _cc_name_suffix -gcc + +%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) + +Name: openmpi%{?_cc_name_suffix} +Version: 3.1.2 +Release: 5%{?dist} +Summary: Open Message Passing Interface +Group: Development/Libraries +License: BSD and MIT and Romio +URL: http://www.open-mpi.org/ + +# We can't use %%{name} here because of _cc_name_suffix +Source0: https://www.open-mpi.org/software/ompi/v3.1/downloads/openmpi-%{version}.tar.bz2 +Source1: openmpi.module.in +Source2: openmpi.pth.py3 +Source3: macros.openmpi + +# Only for ppc64le +# https://github.com/open-mpi/ompi/issues/2526 +# https://github.com/open-mpi/ompi/issues/2966 +Patch0: openmpi-2.1.1-disable-fifo-test.patch +Patch1: fix-optimization-flags.patch + +BuildRequires: gcc-gfortran +%ifnarch s390 s390x +BuildRequires: valgrind-devel +%endif +%ifnarch s390 s390x %{arm} +BuildRequires: libibverbs-devel >= 1.1.3, opensm-devel >= 3.3.21 +BuildRequires: librdmacm-devel rdma-core-devel +%endif +# Doesn't compile: +# vt_dyn.cc:958:28: error: 'class BPatch_basicBlockLoop' has no member named 'getLoopHead' +# loop->getLoopHead()->getStartAddress(), loop_stmts ); +#BuildRequires: dyninst-devel +BuildRequires: hwloc-devel +# So configure can find lstopo +BuildRequires: hwloc-gui +BuildRequires: java-devel +%ifnarch s390 s390x +BuildRequires: libfabric-devel +BuildRequires: papi-devel +%endif +BuildRequires: perl-generators +BuildRequires: perl(Getopt::Long) +BuildRequires: pmix-devel +%ifarch x86_64 +BuildRequires: libpsm2-devel +%endif +BuildRequires: torque-devel +BuildRequires: zlib-devel +BuildRequires: rpm-mpi-hooks +BuildRequires: libevent-devel >= 2.0.22 + +Provides: mpi +Requires: environment(modules) +# openmpi currently requires ssh to run +# https://svn.open-mpi.org/trac/ompi/ticket/4228 +Requires: openssh-clients +Requires: libevent >= 2.0.22 + +# Private openmpi libraries +%global __provides_exclude_from %{_libdir}/openmpi/lib/(lib(mca|ompi|open-(pal|rte|trace))|openmpi/).*.so +%global __requires_exclude lib(mca|ompi|open-(pal|rte|trace)|vt).* + +%description +Open MPI is an open source, freely available implementation of both the +MPI-1 and MPI-2 standards, combining technologies and resources from +several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in +order to build the best MPI library available. A completely new MPI-2 +compliant implementation, Open MPI offers advantages for system and +software vendors, application developers, and computer science +researchers. For more information, see http://www.open-mpi.org/ . + +%package devel +Summary: Development files for openmpi +Group: Development/Libraries +Requires: %{name} = %{version}-%{release}, gcc-gfortran +Provides: mpi-devel +Requires: rpm-mpi-hooks + +%description devel +Contains development headers and libraries for openmpi. + +%package java +Summary: Java library +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: java-headless + +%description java +OpenMPI Java library. + +%package java-devel +Summary: Java development files for openmpi +Group: Development/Libraries +Requires: %{name}-java = %{version}-%{release} +Requires: java-devel + +%description java-devel +Contains development wrapper for compiling Java with openmpi. + +# We set this to for convenience, since this is the unique dir we use for this +# particular package, version, compiler +%global namearch openmpi-%{_arch}%{?_cc_name_suffix} + +%package -n python3-openmpi +Summary: OpenMPI support for Python 3 +Group: Development/Libraries +BuildRequires: python3-devel +Requires: %{name} = %{version}-%{release} +Provides: python-openmpi + +%description -n python3-openmpi +OpenMPI support for Python 3. + + +%prep +%setup -q -n openmpi-%{version} +%ifarch ppc64le +%patch0 -p1 +%endif +%patch1 -p1 + +%build +%set_build_flags +./configure --prefix=%{_libdir}/%{name} \ + --mandir=%{_mandir}/%{namearch} \ + --includedir=%{_includedir}/%{namearch} \ + --sysconfdir=%{_sysconfdir}/%{namearch} \ + --disable-silent-rules \ + --enable-builtin-atomics \ + --enable-mpi-thread-multiple \ +%ifnarch %{power64} + --enable-mpi-cxx \ +%endif + --enable-mpi-java \ + --enable-mpi-fortran=all \ + --enable-cxx-exceptions \ + --with-sge \ +%ifnarch s390 s390x + --with-valgrind \ + --enable-memchecker \ +%endif + --with-hwloc=external \ + --with-pmix=external \ + --with-libevent=external \ + CC=%{opt_cc} CXX=%{opt_cxx} FC=%{opt_fc} \ + LDFLAGS="%{build_ldflags}" \ + CFLAGS="%{?opt_cflags}%{!?opt_cflags:$RPM_OPT_FLAGS}" \ + CXXFLAGS="%{?opt_cxxflags}%{!?opt_cxxflags:$RPM_OPT_FLAGS}" \ + FCFLAGS="%{?opt_fcflags}%{!?opt_fcflags:$RPM_OPT_FLAGS}" \ + --with-contrib-vt-flags='CXXFLAGS="-I%{_includedir}/dyninst -L%{_libdir}/dyninst"' + +make %{?_smp_mflags} V=1 + +%install +make install DESTDIR=%{buildroot} +find %{buildroot}%{_libdir}/%{name}/lib -name \*.la | xargs rm +find %{buildroot}%{_mandir}/%{namearch} -type f | xargs gzip -9 +ln -s mpicc.1.gz %{buildroot}%{_mandir}/%{namearch}/man1/mpiCC.1.gz +# Remove dangling symlink +rm %{buildroot}%{_mandir}/%{namearch}/man1/mpiCC.1 +mkdir %{buildroot}%{_mandir}/%{namearch}/man{2,4,5,6,8,9,n} + +# Make the environment-modules file +mkdir -p %{buildroot}%{_sysconfdir}/modulefiles/mpi +# Since we're doing our own substitution here, use our own definitions. +sed 's#@LIBDIR@#%{_libdir}/%{name}#; + s#@ETCDIR@#%{_sysconfdir}/%{namearch}#; + s#@FMODDIR@#%{_fmoddir}/%{name}#; + s#@INCDIR@#%{_includedir}/%{namearch}#; + s#@MANDIR@#%{_mandir}/%{namearch}#; + s#@PYSITEARCH@#%{python3_sitearch}/%{name}#; + s#@COMPILER@#openmpi-%{_arch}%{?_cc_name_suffix}#; + s#@SUFFIX@#%{?_cc_name_suffix}_openmpi#' \ + <%{SOURCE1} \ + >%{buildroot}%{_sysconfdir}/modulefiles/mpi/%{namearch} + +# make the rpm config file +install -Dpm 644 %{SOURCE3} %{buildroot}/%{macrosdir}/macros.%{namearch} + +# Link the fortran module to proper location +mkdir -p %{buildroot}%{_fmoddir}/%{name} +for mod in %{buildroot}%{_libdir}/%{name}/lib/*.mod +do + modname=$(basename $mod) + ln -s ../../../%{name}/lib/${modname} %{buildroot}/%{_fmoddir}/%{name}/ +done + +# Link the pkgconfig files into the main namespace as well +mkdir -p %{buildroot}%{_libdir}/pkgconfig +cd %{buildroot}%{_libdir}/pkgconfig +ln -s ../%{name}/lib/pkgconfig/*.pc . +cd - + +# Remove extraneous wrapper link libraries (bug 814798) +sed -i -e s/-ldl// -e s/-lhwloc// \ + %{buildroot}%{_libdir}/%{name}/share/openmpi/*-wrapper-data.txt + +# install .pth files +mkdir -p %{buildroot}/%{python3_sitearch}/%{name} +install -pDm0644 %{SOURCE2} %{buildroot}/%{python3_sitearch}/openmpi.pth + +%check +make check + +%files +%license LICENSE +%dir %{_libdir}/%{name} +%dir %{_sysconfdir}/%{namearch} +%dir %{_libdir}/%{name}/bin +%dir %{_libdir}/%{name}/lib +%dir %{_libdir}/%{name}/lib/openmpi +%dir %{_mandir}/%{namearch} +%dir %{_mandir}/%{namearch}/man* +%config(noreplace) %{_sysconfdir}/%{namearch}/* +%{_libdir}/%{name}/bin/*.pl +%{_libdir}/%{name}/bin/mpi[er]* +%{_libdir}/%{name}/bin/ompi* +%{_libdir}/%{name}/bin/orte[-dr_]* +%{_libdir}/%{name}/bin/osh* +%{_libdir}/%{name}/bin/shmem* +%{_libdir}/%{name}/bin/prun +%{_libdir}/%{name}/lib/*.so.* +%{_mandir}/%{namearch}/man1/* +%{_mandir}/%{namearch}/man7/* +%{_libdir}/%{name}/lib/openmpi/* +%{_sysconfdir}/modulefiles/mpi/ +%dir %{_libdir}/%{name}/share +%dir %{_libdir}/%{name}/share/openmpi +%{_libdir}/%{name}/share/openmpi/amca-param-sets +%{_libdir}/%{name}/share/openmpi/help*.txt +%ifnarch s390 %{arm} +%{_libdir}/%{name}/share/openmpi/mca-btl-openib-device-params.ini +%endif + +%files devel +%dir %{_includedir}/%{namearch} +%{_libdir}/%{name}/bin/mpi[cCf]* +%{_libdir}/%{name}/bin/opal_* +%{_libdir}/%{name}/bin/orte[cCf]* +%{_libdir}/%{name}/bin/osh[cf]* +%{_libdir}/%{name}/bin/shmem[cf]* +%{_includedir}/%{namearch}/* +%{_fmoddir}/%{name}/ +%{_libdir}/%{name}/lib/*.so +%{_libdir}/%{name}/lib/*.mod +%{_libdir}/%{name}/lib/pkgconfig/ +%{_libdir}/pkgconfig/*.pc +%{_mandir}/%{namearch}/man1/mpi[cCf]* +%{_mandir}/%{namearch}/man1/osh[cCf]* +%{_mandir}/%{namearch}/man1/shmem[cCf]* +%{_mandir}/%{namearch}/man1/opal_* +%{_mandir}/%{namearch}/man3/* +%{_libdir}/%{name}/share/openmpi/openmpi-valgrind.supp +%{_libdir}/%{name}/share/openmpi/*-wrapper-data.txt +%{macrosdir}/macros.%{namearch} + +%files java +%{_libdir}/%{name}/lib/mpi.jar + +%files java-devel +%{_libdir}/%{name}/bin/mpijavac +%{_libdir}/%{name}/bin/mpijavac.pl +# Currently this only contaings openmpi/javadoc +%{_libdir}/%{name}/share/doc/ +%{_mandir}/%{namearch}/man1/mpijavac.1.gz + +%files -n python3-openmpi +%dir %{python3_sitearch}/%{name} +%{python3_sitearch}/openmpi.pth + + +%changelog +* Tue Sep 25 2018 Jarod Wilson - 3.1.2-5 +- Update BR: opensm-devel min version and rebuild against opensm 3.3.21 +- Resolves: rhbz#1630653 + +* Mon Sep 24 2018 Jarod Wilson - 3.1.2-4 +- Further tweaks to compile/linker flag usage +- Related: rhbz#1624157 +- Move modulefiles under /etc like our other suppored mpi providers +- Resolves: rhbz#1632399 + +* Tue Sep 18 2018 Jarod Wilson - 3.1.2-3 +- Undo stripping/ignoring of distro-provided optimization flags +- Related: rhbz#1624157 + +* Wed Sep 12 2018 Jarod Wilson - 3.1.2-2 +- Additional tweaks to module paths, fix openmpi-devel R +- Related: rhbz#1623441 + +* Wed Sep 12 2018 Jarod Wilson - 3.1.2-1 +- Update to upstream 3.1.2 bug fix release +- Fix some paths in module file, strip out python2 bits +- Related: rhbz#1623441 + +* Thu Aug 30 2018 Jarod Wilson - 3.1.1-2 +- Bump and rebuild for autogen rpmbuild library dependency fixes +- Related: rhbz#1623441 + +* Mon Jul 02 2018 Jarod Wilson - 3.1.1-1 +- Update to upstream 3.1.1 bug fix release +- Drop BR: on deprecated infinipath-psm + +* Thu May 31 2018 Jarod Wilson - 3.1.0-1 +- Update to upstream 3.1.0 release +- Use external pmix and libevent + +* Thu May 17 2018 Charalampos Stratakis - 2.1.1-11 +- Do not build the python2 subpackage on EL > 7 + +* Wed May 09 2018 Troy Dawson - 2.1.1-10 +- Build with rdma-core-devel instead of libibcm-devel + +* Fri Feb 09 2018 Igor Gnatenko - 2.1.1-9 +- Escape macros in %%changelog + +* Mon Feb 05 2018 Orion Poplawski - 2.1.1-8 +- Rebuild for rdma-core 16.2 + +* Wed Jan 31 2018 Christoph Junghans - 2.1.1-7 +- Rebuild for gfortran-8 + +* Fri Jan 12 2018 Iryna Shcherbina - 2.1.1-6 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Wed Aug 23 2017 Adam Williamson - 2.1.1-5 +- Disable RDMA support on 32-bit ARM (#1484155) +- Disable hanging opal_fifo test on ppc64le (gh #2526 / #2966) + +* Thu Aug 03 2017 Fedora Release Engineering - 2.1.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 2.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jul 19 2017 Orion Poplawski - 2.1.1-2 +- Provide pkgconfig files in the main namespace as well (1471512) + +* Fri May 12 2017 Orion Poplawski - 2.1.1-1 +- Update to 2.1.1 + +* Thu May 4 2017 Orion Poplawski - 2.1.0-1 +- Update to 2.1.0