All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi
@ 2023-02-07 22:09 Julien Olivain
  2023-02-07 22:09 ` [Buildroot] [PATCH 2/5] package/openmpi: bump to version 4.1.4 Julien Olivain
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Julien Olivain @ 2023-02-07 22:09 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni

The package has been orphan since commit ee58353 (2018-12-22).

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index d7c4d03c4c..156c5dac13 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1689,6 +1689,7 @@ F:	package/gnupg2/
 F:	package/glslsandbox-player/
 F:	package/octave/
 F:	package/ola/
+F:	package/openmpi/
 F:	package/perftest/
 F:	package/ptm2human/
 F:	package/python-distro/
-- 
2.39.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/5] package/openmpi: bump to version 4.1.4
  2023-02-07 22:09 [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Julien Olivain
@ 2023-02-07 22:09 ` Julien Olivain
  2023-02-21 20:06   ` Thomas Petazzoni via buildroot
  2023-02-07 22:09 ` [Buildroot] [PATCH 3/5] package/openmpi: enable mpi compiler wrapper scripts Julien Olivain
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Julien Olivain @ 2023-02-07 22:09 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni

Notable changes in this commit:

- change from v4.0.x to v4.1.x "current" version series,

- move the sha256 hash out of the "Locally computed" section,
  as the value comes from the download page,

- the LICENSE file hash changed, as the file was updated
  (copyright years updated and new contributors added),

- the IME (Infinite Memory Engine), introduced in v4.1.x,
  is disabled to workaround a failure when cross-compiled,

- the package now requires a toolchain with atomic support,
  and needs to link against libatomic when needed.

For change log since v4.0.0, see:
- https://github.com/open-mpi/ompi/blob/v4.1.4/NEWS#L61

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Tested on branch master at commit 4fbd2f6 with commands:

    make check-package
    ...
    0 warnings generated

    ./utils/test-pkg -a -p openmpi
                             arm-aarch64 [ 1/44]: OK
                   bootlin-aarch64-glibc [ 2/44]: OK
               bootlin-arcle-hs38-uclibc [ 3/44]: OK
                    bootlin-armv5-uclibc [ 4/44]: OK
                     bootlin-armv7-glibc [ 5/44]: OK
                   bootlin-armv7m-uclibc [ 6/44]: SKIPPED
                      bootlin-armv7-musl [ 7/44]: OK
                bootlin-m68k-5208-uclibc [ 8/44]: SKIPPED
               bootlin-m68k-68040-uclibc [ 9/44]: OK
             bootlin-microblazeel-uclibc [10/44]: OK
                bootlin-mipsel32r6-glibc [11/44]: OK
                   bootlin-mipsel-uclibc [12/44]: OK
                     bootlin-nios2-glibc [13/44]: OK
                 bootlin-openrisc-uclibc [14/44]: OK
        bootlin-powerpc64le-power8-glibc [15/44]: OK
           bootlin-powerpc-e500mc-uclibc [16/44]: OK
                   bootlin-riscv32-glibc [17/44]: OK
                   bootlin-riscv64-glibc [18/44]: OK
                    bootlin-riscv64-musl [19/44]: OK
                      bootlin-sh4-uclibc [20/44]: OK
                   bootlin-sparc64-glibc [21/44]: OK
                    bootlin-sparc-uclibc [22/44]: SKIPPED
                    bootlin-x86-64-glibc [23/44]: OK
                     bootlin-x86-64-musl [24/44]: OK
                   bootlin-x86-64-uclibc [25/44]: OK
                   bootlin-xtensa-uclibc [26/44]: OK
                            br-arm-basic [27/44]: SKIPPED
                    br-arm-full-nothread [28/44]: SKIPPED
                      br-arm-full-static [29/44]: SKIPPED
                   br-i386-pentium4-full [30/44]: OK
                br-i386-pentium-mmx-musl [31/44]: OK
                      br-mips64-n64-full [32/44]: OK
                 br-mips64r6-el-hf-glibc [33/44]: OK
               br-powerpc-603e-basic-cpp [34/44]: SKIPPED
               br-powerpc64-power7-glibc [35/44]: OK
                       linaro-aarch64-be [36/44]: OK
                          linaro-aarch64 [37/44]: OK
                              linaro-arm [38/44]: OK
                     sourcery-arm-armv4t [39/44]: OK
                            sourcery-arm [40/44]: OK
                     sourcery-arm-thumb2 [41/44]: OK
                         sourcery-mips64 [42/44]: OK
                           sourcery-mips [43/44]: OK
                          sourcery-nios2 [44/44]: OK
    44 builds, 7 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
---
 package/openmpi/Config.in    |  1 +
 package/openmpi/openmpi.hash | 10 +++++-----
 package/openmpi/openmpi.mk   | 17 ++++++++++++++---
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/package/openmpi/Config.in b/package/openmpi/Config.in
index 4413c55f9c..80b01a26e1 100644
--- a/package/openmpi/Config.in
+++ b/package/openmpi/Config.in
@@ -8,6 +8,7 @@ config BR2_PACKAGE_OPENMPI
 	bool "openmpi"
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on !BR2_STATIC_LIBS # dlfcn.h
diff --git a/package/openmpi/openmpi.hash b/package/openmpi/openmpi.hash
index a399adc758..745ed7c580 100644
--- a/package/openmpi/openmpi.hash
+++ b/package/openmpi/openmpi.hash
@@ -1,6 +1,6 @@
-# From: https://www.open-mpi.org/software/ompi/v4.0/
-md5  e3da67df1e968c8798827e0e5fe9a510  openmpi-4.0.0.tar.bz2
-sha1  fee1d0287abfb150bae16957de342752c9bdd4e8  openmpi-4.0.0.tar.bz2
+# From: https://www.open-mpi.org/software/ompi/v4.1/
+md5  f057e12aabaf7dd5a6a658180fca404e  openmpi-4.1.4.tar.bz2
+sha1  357c61a8e06e103d987c0e4a054e8780a034c8b1  openmpi-4.1.4.tar.bz2
+sha256  92912e175fd1234368c8730c03f4996fe5942e7479bb1d10059405e7f2b3930d  openmpi-4.1.4.tar.bz2
 # Locally computed
-sha256  2f0b8a36cfeb7354b45dda3c5425ef8393c9b04115570b615213faaa3f97366b  openmpi-4.0.0.tar.bz2
-sha256  8298a80ed5f09cfd007bae1c0e7d67d1c2810c6389876778dad070c31a691dac  LICENSE
+sha256  2db71de9577ebfe15c186605844c470dcecd3717f4ef0118c9440d801c0f58f8  LICENSE
diff --git a/package/openmpi/openmpi.mk b/package/openmpi/openmpi.mk
index 8bdc3fa188..f14b55ced5 100644
--- a/package/openmpi/openmpi.mk
+++ b/package/openmpi/openmpi.mk
@@ -4,14 +4,21 @@
 #
 ################################################################################
 
-OPENMPI_VERSION_MAJOR = 4.0
-OPENMPI_VERSION = $(OPENMPI_VERSION_MAJOR).0
+OPENMPI_VERSION_MAJOR = 4.1
+OPENMPI_VERSION = $(OPENMPI_VERSION_MAJOR).4
 OPENMPI_SITE = https://www.open-mpi.org/software/ompi/v$(OPENMPI_VERSION_MAJOR)/downloads
 OPENMPI_SOURCE = openmpi-$(OPENMPI_VERSION).tar.bz2
 OPENMPI_LICENSE = BSD-3-Clause
 OPENMPI_LICENSE_FILES = LICENSE
 OPENMPI_INSTALL_STAGING = YES
 
+# The macro searching for IME (Infinite Memory Engine) filesystem
+# brings "-I/usr/local/include" in the CPPFLAGS, even if not
+# found. This makes the configuration fail. See:
+# https://github.com/open-mpi/ompi/blob/v4.1.4/config/ompi_check_ime.m4#L35
+# Disable explicitly to avoid the issue.
+OPENMPI_CONF_OPTS = --without-ime
+
 # Enabling Fortran support requires pre-seeding the configure script
 # with various values that cannot be guessed, so we provide cache
 # files for various architectures.
@@ -43,6 +50,10 @@ ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
 OPENMPI_CFLAGS += -O0
 endif
 
-OPENMPI_CONF_ENV = CFLAGS="$(OPENMPI_CFLAGS)"
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+OPENMPI_LIBS += -latomic
+endif
+
+OPENMPI_CONF_ENV = CFLAGS="$(OPENMPI_CFLAGS)" LIBS="$(OPENMPI_LIBS)"
 
 $(eval $(autotools-package))
-- 
2.39.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 3/5] package/openmpi: enable mpi compiler wrapper scripts
  2023-02-07 22:09 [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Julien Olivain
  2023-02-07 22:09 ` [Buildroot] [PATCH 2/5] package/openmpi: bump to version 4.1.4 Julien Olivain
@ 2023-02-07 22:09 ` Julien Olivain
  2023-02-21  9:10   ` Thomas Petazzoni via buildroot
  2023-08-10 21:16   ` Thomas Petazzoni via buildroot
  2023-02-07 22:09 ` [Buildroot] [PATCH 4/5] package/openmpi-examples: new package Julien Olivain
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 10+ messages in thread
From: Julien Olivain @ 2023-02-07 22:09 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni

openmpi normally includes compiler wrapper binary programs (e.g. mpicc,
mpicxx, etc...). Those programs are inconvenient when cross compiling.
Those target binary wrappers are useless in Buildroot, as the target
root filesystem does not include compilers. For cross compilation,
openmpi also ships Perl scripts providing a subset of those functions.
With those compiler wrappers, openmpi programs can now be cross
compiled properly in Buildroot. This patch enables those wrappers.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/openmpi/openmpi.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/openmpi/openmpi.mk b/package/openmpi/openmpi.mk
index f14b55ced5..e6f5cd0250 100644
--- a/package/openmpi/openmpi.mk
+++ b/package/openmpi/openmpi.mk
@@ -17,7 +17,9 @@ OPENMPI_INSTALL_STAGING = YES
 # found. This makes the configuration fail. See:
 # https://github.com/open-mpi/ompi/blob/v4.1.4/config/ompi_check_ime.m4#L35
 # Disable explicitly to avoid the issue.
-OPENMPI_CONF_OPTS = --without-ime
+OPENMPI_CONF_OPTS = \
+	--enable-script-wrapper-compilers \
+	--without-ime
 
 # Enabling Fortran support requires pre-seeding the configure script
 # with various values that cannot be guessed, so we provide cache
-- 
2.39.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 4/5] package/openmpi-examples: new package
  2023-02-07 22:09 [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Julien Olivain
  2023-02-07 22:09 ` [Buildroot] [PATCH 2/5] package/openmpi: bump to version 4.1.4 Julien Olivain
  2023-02-07 22:09 ` [Buildroot] [PATCH 3/5] package/openmpi: enable mpi compiler wrapper scripts Julien Olivain
@ 2023-02-07 22:09 ` Julien Olivain
  2023-02-21  9:12   ` Thomas Petazzoni via buildroot
  2023-02-07 22:09 ` [Buildroot] [PATCH 5/5] support/testing: add test for openmpi Julien Olivain
  2023-02-21  8:57 ` [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Thomas Petazzoni via buildroot
  4 siblings, 1 reply; 10+ messages in thread
From: Julien Olivain @ 2023-02-07 22:09 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni

This is a "meta" package reusing definitions and files from openmpi.
Openmpi examples are shipped in the main library sources, including
build wrappers. The library and the wrappers need to be built and
installed in staging prior trying to compile an example. This purpose if
this package is to handle cleanly those dependencies.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 package/openmpi-examples/Config.in            |  8 +++++
 .../openmpi-examples/openmpi-examples.hash    |  1 +
 package/openmpi-examples/openmpi-examples.mk  | 29 +++++++++++++++++++
 5 files changed, 40 insertions(+)
 create mode 100644 package/openmpi-examples/Config.in
 create mode 120000 package/openmpi-examples/openmpi-examples.hash
 create mode 100644 package/openmpi-examples/openmpi-examples.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 156c5dac13..3d1c3a2a83 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1690,6 +1690,7 @@ F:	package/glslsandbox-player/
 F:	package/octave/
 F:	package/ola/
 F:	package/openmpi/
+F:	package/openmpi-examples/
 F:	package/perftest/
 F:	package/ptm2human/
 F:	package/python-distro/
diff --git a/package/Config.in b/package/Config.in
index 06d0a05854..e08511fd9a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1961,6 +1961,7 @@ menu "Networking"
 	source "package/open62541/Config.in"
 	source "package/openldap/Config.in"
 	source "package/openmpi/Config.in"
+	source "package/openmpi-examples/Config.in"
 	source "package/openpgm/Config.in"
 	source "package/openzwave/Config.in"
 	source "package/ortp/Config.in"
diff --git a/package/openmpi-examples/Config.in b/package/openmpi-examples/Config.in
new file mode 100644
index 0000000000..caaa02d802
--- /dev/null
+++ b/package/openmpi-examples/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_OPENMPI_EXAMPLES
+	bool "openmpi-examples"
+	select BR2_PACKAGE_OPENMPI
+	help
+	  This package includes the hello_c example from openmpi. It
+	  is mainly used as a simple openmpi program to test the
+	  libraries. It is also a recipe example for cross compiling
+	  an openmpi program with the mpicc wrappers.
diff --git a/package/openmpi-examples/openmpi-examples.hash b/package/openmpi-examples/openmpi-examples.hash
new file mode 120000
index 0000000000..b8afe5e2d9
--- /dev/null
+++ b/package/openmpi-examples/openmpi-examples.hash
@@ -0,0 +1 @@
+../openmpi/openmpi.hash
\ No newline at end of file
diff --git a/package/openmpi-examples/openmpi-examples.mk b/package/openmpi-examples/openmpi-examples.mk
new file mode 100644
index 0000000000..be679333c7
--- /dev/null
+++ b/package/openmpi-examples/openmpi-examples.mk
@@ -0,0 +1,29 @@
+################################################################################
+#
+# openmpi-examples
+#
+################################################################################
+
+OPENMPI_EXAMPLES_VERSION = $(OPENMPI_VERSION)
+OPENMPI_EXAMPLES_SOURCE = $(OPENMPI_SOURCE)
+OPENMPI_EXAMPLES_DL_SUBDIR = openmpi
+OPENMPI_EXAMPLES_SITE = $(OPENMPI_SITE)
+OPENMPI_EXAMPLES_LICENSE = $(OPENMPI_LINCENSE)
+OPENMPI_EXAMPLES_LICENSE_FILES = $(OPENMPI_LICENSE_FILES)
+
+OPENMPI_EXAMPLES_DEPENDENCIES = openmpi
+
+define OPENMPI_EXAMPLES_BUILD_CMDS
+	$(TARGET_MAKE_ENV) PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH) OPAL_DESTDIR=$(STAGING_DIR)/usr \
+	mpicc \
+		$(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
+		-o $(@D)/examples/hello_c \
+		$(@D)/examples/hello_c.c
+endef
+
+define OPENMPI_EXAMPLES_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/examples/hello_c \
+		$(TARGET_DIR)/usr/bin/ompi_hello_c
+endef
+
+$(eval $(generic-package))
-- 
2.39.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 5/5] support/testing: add test for openmpi
  2023-02-07 22:09 [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Julien Olivain
                   ` (2 preceding siblings ...)
  2023-02-07 22:09 ` [Buildroot] [PATCH 4/5] package/openmpi-examples: new package Julien Olivain
@ 2023-02-07 22:09 ` Julien Olivain
  2023-02-21  8:57 ` [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Thomas Petazzoni via buildroot
  4 siblings, 0 replies; 10+ messages in thread
From: Julien Olivain @ 2023-02-07 22:09 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni

This openmpi runtime test attempt to run the "hello_c" example program
on a 8 cpu Aarch64 system. It expects the same amount of "Hello, world"
messages.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Tested on branch master at commit 4fbd2f6 with commands:

    make check-package
    ...
    0 warnings generated

    python3 -m flake8 support/testing/tests/package/test_openmpi.py
    [no-output]

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.package.test_openmpi
    ...
    OK
---
 DEVELOPERS                                    |  1 +
 support/testing/tests/package/test_openmpi.py | 53 +++++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 support/testing/tests/package/test_openmpi.py

diff --git a/DEVELOPERS b/DEVELOPERS
index 3d1c3a2a83..c6587b10e1 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1715,6 +1715,7 @@ F:	support/testing/tests/package/test_ncdu.py
 F:	support/testing/tests/package/test_octave.py
 F:	support/testing/tests/package/test_ola.py
 F:	support/testing/tests/package/test_ola/
+F:	support/testing/tests/package/test_openmpi.py
 F:	support/testing/tests/package/test_perftest.py
 F:	support/testing/tests/package/test_python_distro.py
 F:	support/testing/tests/package/test_python_hkdf.py
diff --git a/support/testing/tests/package/test_openmpi.py b/support/testing/tests/package/test_openmpi.py
new file mode 100644
index 0000000000..86a42a0145
--- /dev/null
+++ b/support/testing/tests/package/test_openmpi.py
@@ -0,0 +1,53 @@
+import os
+
+import infra.basetest
+
+
+class TestOpenMPI(infra.basetest.BRTest):
+    # We use a "virt" Aarch64 machine to have smp and 512M of memory
+    config = \
+        """
+        BR2_aarch64=y
+        BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+        BR2_LINUX_KERNEL=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.92"
+        BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+        BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
+        BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+        BR2_TARGET_ROOTFS_CPIO=y
+        BR2_TARGET_ROOTFS_CPIO_GZIP=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        BR2_PACKAGE_OPENMPI_EXAMPLES=y
+        """
+
+    def test_run(self):
+        num_cpu = 8
+        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio.gz")
+        kern_file = os.path.join(self.builddir, "images", "Image")
+        self.emulator.boot(arch="aarch64",
+                           kernel=kern_file,
+                           kernel_cmdline=["console=ttyAMA0"],
+                           options=["-M", "virt", "-smp", str(num_cpu), "-cpu", "cortex-a57", "-m", "512M", "-initrd", cpio_file])
+        self.emulator.login()
+
+        self.assertRunOk("ompi_info --all")
+
+        # "--allow-run-as-root" option is needed because mpirun
+        # normally refuse to start as root, as a security mechanism.
+        # "--mca plm_rsh_agent /bin/true" is needed because openmpi
+        # silently fails if the "rsh" binary is not present in the
+        # system, even if it's not used. We define it as "/bin/true",
+        # as a workaround.
+        # The hello_c example will spawn one job per cpu. We expect
+        # the same number of "Hello, world," output as the number of
+        # cpus.
+        cmd = "mpirun" \
+            " --allow-run-as-root" \
+            " --mca plm_rsh_agent /bin/true" \
+            " /usr/bin/ompi_hello_c"
+        output, exit_code = self.emulator.run(cmd)
+        self.assertEqual(exit_code, 0)
+        all_output = ''.join(output)
+        self.assertEqual(all_output.count('Hello, world,'), num_cpu)
-- 
2.39.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi
  2023-02-07 22:09 [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Julien Olivain
                   ` (3 preceding siblings ...)
  2023-02-07 22:09 ` [Buildroot] [PATCH 5/5] support/testing: add test for openmpi Julien Olivain
@ 2023-02-21  8:57 ` Thomas Petazzoni via buildroot
  4 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-21  8:57 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

On Tue,  7 Feb 2023 23:09:37 +0100
Julien Olivain <ju.o@free.fr> wrote:

> The package has been orphan since commit ee58353 (2018-12-22).
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
>  DEVELOPERS | 1 +
>  1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 3/5] package/openmpi: enable mpi compiler wrapper scripts
  2023-02-07 22:09 ` [Buildroot] [PATCH 3/5] package/openmpi: enable mpi compiler wrapper scripts Julien Olivain
@ 2023-02-21  9:10   ` Thomas Petazzoni via buildroot
  2023-08-10 21:16   ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 10+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-21  9:10 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

Hello Julien,

On Tue,  7 Feb 2023 23:09:39 +0100
Julien Olivain <ju.o@free.fr> wrote:

> openmpi normally includes compiler wrapper binary programs (e.g. mpicc,
> mpicxx, etc...). Those programs are inconvenient when cross compiling.
> Those target binary wrappers are useless in Buildroot, as the target
> root filesystem does not include compilers. For cross compilation,
> openmpi also ships Perl scripts providing a subset of those functions.
> With those compiler wrappers, openmpi programs can now be cross
> compiled properly in Buildroot. This patch enables those wrappers.
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
>  package/openmpi/openmpi.mk | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/package/openmpi/openmpi.mk b/package/openmpi/openmpi.mk
> index f14b55ced5..e6f5cd0250 100644
> --- a/package/openmpi/openmpi.mk
> +++ b/package/openmpi/openmpi.mk
> @@ -17,7 +17,9 @@ OPENMPI_INSTALL_STAGING = YES
>  # found. This makes the configuration fail. See:
>  # https://github.com/open-mpi/ompi/blob/v4.1.4/config/ompi_check_ime.m4#L35
>  # Disable explicitly to avoid the issue.
> -OPENMPI_CONF_OPTS = --without-ime
> +OPENMPI_CONF_OPTS = \
> +	--enable-script-wrapper-compilers \

So if I look at your PATCH 4/5, this means that "mpicc" is one of those
wrapper script, installed in $(STAGING_DIR), but meant to be executed
on the host?

As you're saying it's written in Perl, did you test it with a minimal
Fedora installation, to see if it has requirements beyond the base Perl
installation? (compared to Debian/Ubuntu, Fedora has a much more
fine-grained packaging of basic Perl modules, this recently lead to a
small amount of additional checks in dependencies.sh, see
https://gitlab.com/buildroot.org/buildroot/-/commits/master/support/dependencies/dependencies.sh).

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 4/5] package/openmpi-examples: new package
  2023-02-07 22:09 ` [Buildroot] [PATCH 4/5] package/openmpi-examples: new package Julien Olivain
@ 2023-02-21  9:12   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-21  9:12 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

Hello Julien,

On Tue,  7 Feb 2023 23:09:40 +0100
Julien Olivain <ju.o@free.fr> wrote:

> diff --git a/package/openmpi-examples/Config.in b/package/openmpi-examples/Config.in
> new file mode 100644
> index 0000000000..caaa02d802
> --- /dev/null
> +++ b/package/openmpi-examples/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_OPENMPI_EXAMPLES
> +	bool "openmpi-examples"
> +	select BR2_PACKAGE_OPENMPI
> +	help
> +	  This package includes the hello_c example from openmpi. It
> +	  is mainly used as a simple openmpi program to test the
> +	  libraries. It is also a recipe example for cross compiling
> +	  an openmpi program with the mpicc wrappers.
> diff --git a/package/openmpi-examples/openmpi-examples.hash b/package/openmpi-examples/openmpi-examples.hash
> new file mode 120000
> index 0000000000..b8afe5e2d9
> --- /dev/null
> +++ b/package/openmpi-examples/openmpi-examples.hash
> @@ -0,0 +1 @@
> +../openmpi/openmpi.hash
> \ No newline at end of file
> diff --git a/package/openmpi-examples/openmpi-examples.mk b/package/openmpi-examples/openmpi-examples.mk
> new file mode 100644
> index 0000000000..be679333c7
> --- /dev/null
> +++ b/package/openmpi-examples/openmpi-examples.mk
> @@ -0,0 +1,29 @@
> +################################################################################
> +#
> +# openmpi-examples
> +#
> +################################################################################
> +
> +OPENMPI_EXAMPLES_VERSION = $(OPENMPI_VERSION)
> +OPENMPI_EXAMPLES_SOURCE = $(OPENMPI_SOURCE)
> +OPENMPI_EXAMPLES_DL_SUBDIR = openmpi
> +OPENMPI_EXAMPLES_SITE = $(OPENMPI_SITE)
> +OPENMPI_EXAMPLES_LICENSE = $(OPENMPI_LINCENSE)
> +OPENMPI_EXAMPLES_LICENSE_FILES = $(OPENMPI_LICENSE_FILES)

Why is this a separate package? If those examples come with openmpi,
then building the examples should be a suboption of the openmpi package.

> +OPENMPI_EXAMPLES_DEPENDENCIES = openmpi
> +
> +define OPENMPI_EXAMPLES_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH) OPAL_DESTDIR=$(STAGING_DIR)/usr \

Adding $(STAGING_DIR)/usr/bin in the PATH is a bad idea, as it contains
a lot of tools/binaries cross-compiled for the target.

> +	mpicc \
> +		$(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
> +		-o $(@D)/examples/hello_c \
> +		$(@D)/examples/hello_c.c

So either, we need to change things so that mpicc is installed to
$(HOST_DIR), or you need to invoke it as $(STAGING_DIR)/usr/bin/mpicc.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 2/5] package/openmpi: bump to version 4.1.4
  2023-02-07 22:09 ` [Buildroot] [PATCH 2/5] package/openmpi: bump to version 4.1.4 Julien Olivain
@ 2023-02-21 20:06   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-21 20:06 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

Hello Julien,

On Tue,  7 Feb 2023 23:09:38 +0100
Julien Olivain <ju.o@free.fr> wrote:

> diff --git a/package/openmpi/Config.in b/package/openmpi/Config.in
> index 4413c55f9c..80b01a26e1 100644
> --- a/package/openmpi/Config.in
> +++ b/package/openmpi/Config.in
> @@ -8,6 +8,7 @@ config BR2_PACKAGE_OPENMPI
>  	bool "openmpi"
>  	depends on BR2_USE_MMU # fork()
>  	depends on BR2_USE_WCHAR
> +	depends on BR2_TOOLCHAIN_HAS_ATOMIC

This should affect the dependencies of the Config.in comment, so I
fixed that up and applied your patch to the next branch.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH 3/5] package/openmpi: enable mpi compiler wrapper scripts
  2023-02-07 22:09 ` [Buildroot] [PATCH 3/5] package/openmpi: enable mpi compiler wrapper scripts Julien Olivain
  2023-02-21  9:10   ` Thomas Petazzoni via buildroot
@ 2023-08-10 21:16   ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 10+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-08-10 21:16 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

Hello Julien,

Unless I missed it, you never replied to the feedback I gave on PATCH
3/5 and 4/5 in this series, so I've marked patches 3/5, 4/5 and 5/5 as
Changes Requested. Patches 1/5 and 2/5 had already been applied a while
ago.

Best regards,

Thomas Petazzoni

On Tue,  7 Feb 2023 23:09:39 +0100
Julien Olivain <ju.o@free.fr> wrote:

> openmpi normally includes compiler wrapper binary programs (e.g. mpicc,
> mpicxx, etc...). Those programs are inconvenient when cross compiling.
> Those target binary wrappers are useless in Buildroot, as the target
> root filesystem does not include compilers. For cross compilation,
> openmpi also ships Perl scripts providing a subset of those functions.
> With those compiler wrappers, openmpi programs can now be cross
> compiled properly in Buildroot. This patch enables those wrappers.
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
>  package/openmpi/openmpi.mk | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/package/openmpi/openmpi.mk b/package/openmpi/openmpi.mk
> index f14b55ced5..e6f5cd0250 100644
> --- a/package/openmpi/openmpi.mk
> +++ b/package/openmpi/openmpi.mk
> @@ -17,7 +17,9 @@ OPENMPI_INSTALL_STAGING = YES
>  # found. This makes the configuration fail. See:
>  # https://github.com/open-mpi/ompi/blob/v4.1.4/config/ompi_check_ime.m4#L35
>  # Disable explicitly to avoid the issue.
> -OPENMPI_CONF_OPTS = --without-ime
> +OPENMPI_CONF_OPTS = \
> +	--enable-script-wrapper-compilers \
> +	--without-ime
>  
>  # Enabling Fortran support requires pre-seeding the configure script
>  # with various values that cannot be guessed, so we provide cache



-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-08-10 21:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 22:09 [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Julien Olivain
2023-02-07 22:09 ` [Buildroot] [PATCH 2/5] package/openmpi: bump to version 4.1.4 Julien Olivain
2023-02-21 20:06   ` Thomas Petazzoni via buildroot
2023-02-07 22:09 ` [Buildroot] [PATCH 3/5] package/openmpi: enable mpi compiler wrapper scripts Julien Olivain
2023-02-21  9:10   ` Thomas Petazzoni via buildroot
2023-08-10 21:16   ` Thomas Petazzoni via buildroot
2023-02-07 22:09 ` [Buildroot] [PATCH 4/5] package/openmpi-examples: new package Julien Olivain
2023-02-21  9:12   ` Thomas Petazzoni via buildroot
2023-02-07 22:09 ` [Buildroot] [PATCH 5/5] support/testing: add test for openmpi Julien Olivain
2023-02-21  8:57 ` [Buildroot] [PATCH 1/5] DEVELOPERS: add Julien Olivain for package/openmpi Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.