Saturday, June 22, 2019

Re: [UPDATE] devel/openmpi 4.0.1

On Thu, Jun 06 2019, Martin Reindl <martin@catai.org> wrote:
> On Sat, Jun 01, 2019 at 08:03:17PM +0100, Stuart Henderson wrote:
>> That needs fixing then..
>> --
>> Sent from a phone, apologies for poor formatting.
>>
>> On 1 June 2019 17:15:19 Jeremie Courreges-Anglas <jca@wxcvbn.org> wrote:
>>
>> > On Sat, Jun 01 2019, Stuart Henderson <stu@spacehopper.org> wrote:
>> > > Please don't do the huge bump for SHARED_LIBS, just a standard major
>> > > bump for the existing libraries and start the new ones at 0.0
>> >
>> > IIRC the problem is that SHARED_LIBS isn't respected.
>> >
>
> Here is a polished version of the diff which should pass strict inspection
> by the ports@ team:
>
> - respects SHARED_LIBS by using base libtool, m4 from devel/libtool and -ltdl
> - c++ interface is deprecated and not enabled in contrast to 1.0.4

Maybe this should use COMPILER_LANGS = c, then. make
port-lib-depends-check complains about 'Extra: estdc++.19' on sparc64.

> - now uses SEPERATE-BUILD
> - passes make test on macppc, arm64 and amd64 and schedules jobs on virtual
> amd64 mini-mpi-cluster
> - now uses egfortran from ports-gcc instead of f77

> - tidy up Makefile a bit so things look more in order for me

Well, that's a bit of churn and it still doesn't match the canonical
order recommended by Makefile.template. SHARED_LIBS and MASTER_SITES
look completely out of place.

Except for this point, this update looks good. make package fails on
sparc64 because lib/openmpi/mca_patcher_overwrite.* are arch-specific.
Here's an updated diff that uses the order of Makefile.template and
@comments out the arch-specific files.

Additional tweaks:
- use https HOMEPAGE/MASTER_SITES
- PERMIT_PACKAGE_CDROM -> PERMIT_PACKAGE
- strip "base-gcc" from COMPILER, it's not needed/useful
- use V=1 in MAKE_FLAGS, looks like --disable-silent-rules isn't passed
down to all configure scripts.

The remaining patch is still a bit broken, comparisons like

"if (fsbuf.f_fstypename == MOUNT_NFS) {"

can't yield true since MOUNT_NFS is string literal "nfs" and
fsbuf.f_fstypename is a char array in a struct. I'm not sure how much
we care, though, at least it builds...

What do you think? Yay, nay? :)

FWIW I'm going to remove devel/lam soonish, so this openmpi update
removes the last consumer of lang/g77.


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/openmpi/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- Makefile 21 Jan 2019 14:24:30 -0000 1.26
+++ Makefile 22 Jun 2019 17:42:32 -0000
@@ -1,52 +1,44 @@
# $OpenBSD: Makefile,v 1.26 2019/01/21 14:24:30 jca Exp $

-BROKEN-hppa = error: Could not determine global symbol label prefix
-BROKEN-powerpc = checking if Fortran 77 compiler works... no
+COMMENT = open source MPI-3.1 implementation

-COMMENT = open source MPI-2 implementation
-
-V= 1.4.1
+V= 4.0.1
DISTNAME = openmpi-$V
-REVISION = 8

-SHARED_LIBS = mca_common_sm 1.0 \
- mpi 0.1 \
- mpi_cxx 0.0 \
- mpi_f77 0.0 \
- open-pal 0.0 \
- open-rte 0.0
+SHARED_LIBS += mca_common_dstore 0.0 # 1.0
+SHARED_LIBS += mca_common_monitoring 0.0 # 60.0
+SHARED_LIBS += mca_common_ompio 0.0 # 60.1
+SHARED_LIBS += mca_common_sm 2.0 # 60.0
+SHARED_LIBS += mpi 1.0 # 60.1
+SHARED_LIBS += mpi_mpifh 0.0 # 60.1
+SHARED_LIBS += mpi_usempi_ignore_tkr 0.0 # 60.0
+SHARED_LIBS += mpi_usempif08 0.0 # 60.0
+SHARED_LIBS += ompitrace 0.0 # 60.0
+SHARED_LIBS += open-pal 1.0 # 60.1
+SHARED_LIBS += open-rte 1.0 # 60.1

CATEGORIES = devel

-HOMEPAGE = http://www.open-mpi.org/
+HOMEPAGE = https://www.open-mpi.org/

-MODULES = fortran
-MODFORTRAN_COMPILER = g77
-BUILD_DEPENDS += ${MODFORTRAN_BUILD_DEPENDS}
+MAINTAINER = Martin Reindl <martin@catai.org>

# BSD
-PERMIT_PACKAGE_CDROM = Yes
-
-WANTLIB += c m pthread ${COMPILER_LIBCXX} util z
+PERMIT_PACKAGE = Yes

-COMPILER = base-clang ports-gcc base-gcc
+WANTLIB += c execinfo m pciaccess pthread util z

MASTER_SITES = ${HOMEPAGE}/software/ompi/v${V:C/^([0-9]+\.[0-9]+).*/\1/}/downloads/

-# XXX: uses a locally modified libtool.
-USE_LIBTOOL = No
+COMPILER = base-clang ports-gcc
+MODULES = fortran
+MODFORTRAN_COMPILER = gfortran
+BUILD_DEPENDS = devel/libtool,-ltdl
+LIB_DEPENDS = devel/libexecinfo

+MAKE_FLAGS = V=1
FAKE_FLAGS = sysconfdir=${PREFIX}/share/examples/openmpi/
CONFIGURE_STYLE = gnu
-CONFIGURE_ENV = F77=${MODFORTRAN_COMPILER}
-
-.include <bsd.port.arch.mk>
-.if ${PROPERTIES:Mclang}
-CONFIGURE_ARGS = --disable-visibility
-.endif
-
-# openmpi's otfinfo conflicts with the one from texlive
-post-install:
- mv ${PREFIX}/bin/otfinfo ${PREFIX}/bin/otfinfompi
+SEPARATE_BUILD = Yes

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/openmpi/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo 18 Jan 2015 03:13:19 -0000 1.3
+++ distinfo 22 Jun 2019 17:42:32 -0000
@@ -1,2 +1,2 @@
-SHA256 (openmpi-1.4.1.tar.gz) = quq9IhjNxPEejgPhVTkQEpzIQw6TN2xANsqW/BoVubU=
-SIZE (openmpi-1.4.1.tar.gz) = 9960381
+SHA256 (openmpi-4.0.1.tar.gz) = 5V4hP+CaIUq58scirP2L97ObvBgA5LekZNON8V5wf1k=
+SIZE (openmpi-4.0.1.tar.gz) = 17513706
Index: patches/patch-ompi_contrib_vt_vt_tools_compwrap_compwrap_cc
===================================================================
RCS file: patches/patch-ompi_contrib_vt_vt_tools_compwrap_compwrap_cc
diff -N patches/patch-ompi_contrib_vt_vt_tools_compwrap_compwrap_cc
--- patches/patch-ompi_contrib_vt_vt_tools_compwrap_compwrap_cc 11 Apr 2018 22:49:40 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,145 +0,0 @@
-$OpenBSD: patch-ompi_contrib_vt_vt_tools_compwrap_compwrap_cc,v 1.1 2018/04/11 22:49:40 sthen Exp $
-
-Index: ompi/contrib/vt/vt/tools/compwrap/compwrap.cc
---- ompi/contrib/vt/vt/tools/compwrap/compwrap.cc.orig
-+++ ompi/contrib/vt/vt/tools/compwrap/compwrap.cc
-@@ -99,7 +99,7 @@ ReadDataFile()
- "compiler_iflags_ftrace", "inst_avail", "inst_default"
- };
-
-- std::string data_file = DATADIR"/" + ExeName + "-wrapper-data.txt";
-+ std::string data_file = DATADIR "/" + ExeName + "-wrapper-data.txt";
- std::ifstream in( data_file.c_str() );
- if( !in )
- {
-@@ -646,11 +646,11 @@ ParseCommandLine( int argc, char ** argv )
- //
- // -vt:<cc|cxx|f77|f90> <cmd>
- //
-- else if( arg.compare("-vt:"WRAP_LANG_SUFFIX) == 0 )
-+ else if( arg.compare("-vt:" WRAP_LANG_SUFFIX) == 0 )
- {
- if( i == argc - 1 )
- {
-- std::cerr << ExeName << ": <cmd> expected -- -vt:"WRAP_LANG_SUFFIX
-+ std::cerr << ExeName << ": <cmd> expected -- -vt:" WRAP_LANG_SUFFIX
- << std::endl;
- return false;
- }
-@@ -824,7 +824,7 @@ Wrapper::showUsageText()
- << " compiler wrapper for VampirTrace."
- << std::endl << std::endl
- << " Syntax: " << ExeName << " "
-- << "[-vt:"WRAP_LANG_SUFFIX" <cmd>] "
-+ << "[-vt:" WRAP_LANG_SUFFIX " <cmd>] "
- << "[-vt:inst <insttype>] [-vt:<seq|mpi|omp|hyb>] "
- << std::endl << " "
- << "[-vt:opari <args>]"
-@@ -840,7 +840,7 @@ Wrapper::showUsageText()
- << std::endl
- << " -vt:help Show this help message."
- << std::endl
-- << " -vt:"WRAP_LANG_SUFFIX" <cmd> ";
-+ << " -vt:" WRAP_LANG_SUFFIX " <cmd> ";
- if( strlen( WRAP_LANG_SUFFIX ) == 2 ) std::cout << " ";
- std::cout << "Set the underlying compiler command.";
- std::cout << std::endl << std::endl;
-@@ -895,7 +895,7 @@ Wrapper::showUsageText()
-
- std::cout << " -vt:opari <args> Set options for OPARI command."
- << std::endl
-- << " (see "DATADIR"/doc/opari/Readme.html for more information)"
-+ << " (see " DATADIR "/doc/opari/Readme.html for more information)"
- << std::endl << std::endl
- << " -vt:<seq|mpi|omp|hyb>"
- << std::endl
-@@ -939,7 +939,7 @@ Wrapper::showUsageText()
- << std::endl << std::endl
- << " See the man page for your underlying compiler for other options that can"
- << std::endl
-- << " be passed through 'vt"WRAP_LANG_SUFFIX"'."
-+ << " be passed through 'vt" WRAP_LANG_SUFFIX "'."
- << std::endl << std::endl
- << " environment variables:"
- << std::endl
-@@ -952,7 +952,7 @@ Wrapper::showUsageText()
- #elif defined(WRAP_LANG_F90)
- << " VT_F90"
-

No comments:

Post a Comment