Skip to contentSkip to conversation

mpich: Upgrade to 4.1.1

PATCH Superseded Zoltán Böszörményi 2 participants 6 messages Jun 7, 2023 – Jun 9, 2023

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 mpich: Upgrade to 4.1.1

mpich 4.1+ has its own official way to allow cross-compiling, use it.

Remove the old PACKAGECONFIG[x11], the configuration option does not exist anymore.

Add PACKAGECONFIG knobs to allow building the C++ and FORTRAN parts. Both are needed by intel-oneapi-mkl in meta-intel. Don't enable either by default to keep the current minimalistic build.

Remove configuration options that don't exist in the new version.

Set TOOLCHAIN = "gcc".

---
 meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb | 58 -----------------
 meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb | 64 +++++++++++++++++++
 2 files changed, 64 insertions(+), 58 deletions(-)
 delete mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb
 create mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb
meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb deleted +0 -58
deleted file mode 100644
index 000f73981..000000000
@@ -1,58 +0,0 @@
-SUMMARY = "Message Passing Interface (MPI) implementation"
-HOMEPAGE = "http://www.mpich.org/"
-SECTION = "devel"
-
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bd4d7ab13df98988b1ca2a4e01c8c163"
-
-SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
-SRC_URI[sha256sum] = "17406ea90a6ed4ecd5be39c9ddcbfac9343e6ab4f77ac4e8c5ebe4a3e3b6c501"
-
-RDEPENDS:${PN} += "bash perl libxml2"
-
-EXTRA_OECONF = "--enable-debuginfo \
-    --enable-fast \
-    --enable-shared  \
-    --with-pm=gforker  \
-    --disable-rpath \
-    --disable-f77 \
-    --disable-fc \
-    --disable-fortran \
-    --disable-cxx \
-    BASH_SHELL='${USRBINPATH}/env bash' \
-    PERL='${USRBINPATH}/env perl' \
-    --with-device=ch3:nemesis \
-    --with-rdmacm=no \
-    --disable-numa \
-"
-
-PACKAGECONFIG += " \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-"
-PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
-
-# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
-LDFLAGS:append:x86-64 = " -lgcc"
-LDFLAGS:append:x86 = " -lgcc"
-
-inherit autotools gettext pkgconfig
-
-do_configure() {
-    for d in confdb test/mpi test/mpi/confdb src/pm/hydra/confdb \
-        src/pm/hydra/tools/topo/hwloc/hwloc/config src/pm/hydra/mpl/confdb \
-        modules/yaksa/m4 modules/json-c modules/ucx modules/hwloc/config \
-        test/mpi/dtpools/confdb src/mpl/confdb src/mpi/romio/confdb;  do
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/$d
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/$d
-    done
-#    cd ${S}
-#    autoupdate
-#    autoreconf --verbose --install --force
-#    cd ${B}
-    oe_runconf
-}
-
-do_install:append() {
-    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
-    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
-}
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +64 -0

64 lines not on this page · raw message

Signature · 1 line
2.40.1
#1 lore raw

2023. 06. 07. 9:23 keltezéssel, Zoltán Böszörményi írta:

Quoted 134 lines

mpich 4.1+ has its own official way to allow cross-compiling, use it.

Remove the old PACKAGECONFIG[x11], the configuration option does not exist anymore.

Add PACKAGECONFIG knobs to allow building the C++ and FORTRAN parts. Both are needed by intel-oneapi-mkl in meta-intel. Don't enable either by default to keep the current minimalistic build.

Remove configuration options that don't exist in the new version.

Set TOOLCHAIN = "gcc".

---
  meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb | 58 -----------------
  meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb | 64 +++++++++++++++++++
  2 files changed, 64 insertions(+), 58 deletions(-)

delete mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb create mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb

meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb deleted +0 -58
deleted file mode 100644
index 000f73981..000000000
@@ -1,58 +0,0 @@
-SUMMARY = "Message Passing Interface (MPI) implementation"
-HOMEPAGE = "http://www.mpich.org/"
-SECTION = "devel"
-
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bd4d7ab13df98988b1ca2a4e01c8c163"
-
-SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
-SRC_URI[sha256sum] = "17406ea90a6ed4ecd5be39c9ddcbfac9343e6ab4f77ac4e8c5ebe4a3e3b6c501"
-
-RDEPENDS:${PN} += "bash perl libxml2"
-
-EXTRA_OECONF = "--enable-debuginfo \
-    --enable-fast \
-    --enable-shared  \
-    --with-pm=gforker  \
-    --disable-rpath \
-    --disable-f77 \
-    --disable-fc \
-    --disable-fortran \
-    --disable-cxx \
-    BASH_SHELL='${USRBINPATH}/env bash' \
-    PERL='${USRBINPATH}/env perl' \
-    --with-device=ch3:nemesis \
-    --with-rdmacm=no \
-    --disable-numa \
-"
-
-PACKAGECONFIG += " \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-"
-PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
-
-# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
-LDFLAGS:append:x86-64 = " -lgcc"
-LDFLAGS:append:x86 = " -lgcc"
-
-inherit autotools gettext pkgconfig
-
-do_configure() {
-    for d in confdb test/mpi test/mpi/confdb src/pm/hydra/confdb \
-        src/pm/hydra/tools/topo/hwloc/hwloc/config src/pm/hydra/mpl/confdb \
-        modules/yaksa/m4 modules/json-c modules/ucx modules/hwloc/config \
-        test/mpi/dtpools/confdb src/mpl/confdb src/mpi/romio/confdb;  do
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/$d
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/$d
-    done
-#    cd ${S}
-#    autoupdate
-#    autoreconf --verbose --install --force
-#    cd ${B}
-    oe_runconf
-}
-
-do_install:append() {
-    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
-    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
-}
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +42 -0
new file mode 100644
index 000000000..cb9c0f1dd
@@ -0,0 +1,64 @@
+SUMMARY = "Message Passing Interface (MPI) implementation"
+HOMEPAGE = "http://www.mpich.org/"
+SECTION = "devel"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f1804c45b8b4e816e53eb1f175d810f3"
+
+SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
+SRC_URI[sha256sum] = "ee30471b35ef87f4c88f871a5e2ad3811cd9c4df32fd4f138443072ff4284ca2"
+
+TOOLCHAIN = "gcc"
+
+RDEPENDS:${PN} += "bash perl libxml2"
+
+EXTRA_OECONF = "--enable-debuginfo \
+    --enable-fast \
+    --enable-shared  \
+    --with-pm=gforker  \
+    BASH_SHELL='${USRBINPATH}/env bash' \
+    PERL='${USRBINPATH}/env perl' \
+    --with-device=ch3:nemesis \
+"
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx"
+PACKAGECONFIG[fortran] = "--with-cross=${WORKDIR}/cross_values.txt --enable-fortran,--disable-f77 --disable-fc --disable-fortran,libgfortran"
+
+# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
+LDFLAGS:append:x86-64 = " -lgcc"
+LDFLAGS:append:x86 = " -lgcc"
+
+inherit autotools gettext pkgconfig qemu
+
+DEPENDS += "qemu-native"
+
+do_configure() {
+    if [ "${@bb.utils.contains('PACKAGECONFIG', 'fortran', '1', '', d)}" = "1" ]; then
+        qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
+        cat > ${WORKDIR}/qemuwrapper << EOF
+#!/bin/sh
+$qemu_binary "\$@"

meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb line 52

Quoted 10 lines
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +10 -0
+EOF
+        chmod +x ${WORKDIR}/qemuwrapper
+
+        sed -i 's:my \(.*\) ./t`;:my \1 ${WORKDIR}/qemuwrapper ${WORKDIR}/t`;:' ${S}/maint/gen_cross.pl
+
+        cd ${WORKDIR}
+        perl ${S}/maint/gen_cross.pl
+    fi
+
+    sed -i 's:\(CROSS_F90_INTEGER_MODEL_MAP=.*\) }"$:\1 }, ":' ${WORKDIR}/cross_values.txt

This must be in the if [] above. Just sent v4 with this fix.

Quoted 12 lines
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +12 -0
+
+    cd ${S}
+    ./autogen.sh
+
+    cd ${B}
+    oe_runconf
+}
+
+do_install:append() {
+    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
+    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
+}
#2 lore raw

still seeing issues

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2802

Quoted 162 lines · Böszörményi Zoltán

2023. 06. 07. 9:23 keltezéssel, Zoltán Böszörményi írta:

Quoted 134 lines

mpich 4.1+ has its own official way to allow cross-compiling, use it.

Remove the old PACKAGECONFIG[x11], the configuration option does not exist anymore.

Add PACKAGECONFIG knobs to allow building the C++ and FORTRAN parts. Both are needed by intel-oneapi-mkl in meta-intel. Don't enable either by default to keep the current minimalistic build.

Remove configuration options that don't exist in the new version.

Set TOOLCHAIN = "gcc".

---
  meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb | 58 -----------------
  meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb | 64 +++++++++++++++++++
  2 files changed, 64 insertions(+), 58 deletions(-)

delete mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb create mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb

meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb deleted +0 -58
deleted file mode 100644
index 000f73981..000000000
@@ -1,58 +0,0 @@
-SUMMARY = "Message Passing Interface (MPI) implementation"
-HOMEPAGE = "http://www.mpich.org/"
-SECTION = "devel"
-
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bd4d7ab13df98988b1ca2a4e01c8c163"
-
-SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
-SRC_URI[sha256sum] = "17406ea90a6ed4ecd5be39c9ddcbfac9343e6ab4f77ac4e8c5ebe4a3e3b6c501"
-
-RDEPENDS:${PN} += "bash perl libxml2"
-
-EXTRA_OECONF = "--enable-debuginfo \
-    --enable-fast \
-    --enable-shared  \
-    --with-pm=gforker  \
-    --disable-rpath \
-    --disable-f77 \
-    --disable-fc \
-    --disable-fortran \
-    --disable-cxx \
-    BASH_SHELL='${USRBINPATH}/env bash' \
-    PERL='${USRBINPATH}/env perl' \
-    --with-device=ch3:nemesis \
-    --with-rdmacm=no \
-    --disable-numa \
-"
-
-PACKAGECONFIG += " \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-"
-PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
-
-# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
-LDFLAGS:append:x86-64 = " -lgcc"
-LDFLAGS:append:x86 = " -lgcc"
-
-inherit autotools gettext pkgconfig
-
-do_configure() {
-    for d in confdb test/mpi test/mpi/confdb src/pm/hydra/confdb \
-        src/pm/hydra/tools/topo/hwloc/hwloc/config src/pm/hydra/mpl/confdb \
-        modules/yaksa/m4 modules/json-c modules/ucx modules/hwloc/config \
-        test/mpi/dtpools/confdb src/mpl/confdb src/mpi/romio/confdb;  do
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/$d
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/$d
-    done
-#    cd ${S}
-#    autoupdate
-#    autoreconf --verbose --install --force
-#    cd ${B}
-    oe_runconf
-}
-
-do_install:append() {
-    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
-    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
-}
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +42 -0
new file mode 100644
index 000000000..cb9c0f1dd
@@ -0,0 +1,64 @@
+SUMMARY = "Message Passing Interface (MPI) implementation"
+HOMEPAGE = "http://www.mpich.org/"
+SECTION = "devel"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f1804c45b8b4e816e53eb1f175d810f3"
+
+SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
+SRC_URI[sha256sum] = "ee30471b35ef87f4c88f871a5e2ad3811cd9c4df32fd4f138443072ff4284ca2"
+
+TOOLCHAIN = "gcc"
+
+RDEPENDS:${PN} += "bash perl libxml2"
+
+EXTRA_OECONF = "--enable-debuginfo \
+    --enable-fast \
+    --enable-shared  \
+    --with-pm=gforker  \
+    BASH_SHELL='${USRBINPATH}/env bash' \
+    PERL='${USRBINPATH}/env perl' \
+    --with-device=ch3:nemesis \
+"
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx"
+PACKAGECONFIG[fortran] = "--with-cross=${WORKDIR}/cross_values.txt --enable-fortran,--disable-f77 --disable-fc --disable-fortran,libgfortran"
+
+# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
+LDFLAGS:append:x86-64 = " -lgcc"
+LDFLAGS:append:x86 = " -lgcc"
+
+inherit autotools gettext pkgconfig qemu
+
+DEPENDS += "qemu-native"
+
+do_configure() {
+    if [ "${@bb.utils.contains('PACKAGECONFIG', 'fortran', '1', '', d)}" = "1" ]; then
+        qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
+        cat > ${WORKDIR}/qemuwrapper << EOF
+#!/bin/sh
+$qemu_binary "\$@"

meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb line 52

Quoted 10 lines
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +10 -0
+EOF
+        chmod +x ${WORKDIR}/qemuwrapper
+
+        sed -i 's:my \(.*\) ./t`;:my \1 ${WORKDIR}/qemuwrapper ${WORKDIR}/t`;:' ${S}/maint/gen_cross.pl
+
+        cd ${WORKDIR}
+        perl ${S}/maint/gen_cross.pl
+    fi
+
+    sed -i 's:\(CROSS_F90_INTEGER_MODEL_MAP=.*\) }"$:\1 }, ":' ${WORKDIR}/cross_values.txt

This must be in the if [] above. Just sent v4 with this fix.

Quoted 12 lines
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +12 -0
+
+    cd ${S}
+    ./autogen.sh
+
+    cd ${B}
+    oe_runconf
+}
+
+do_install:append() {
+    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
+    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
+}
#3 lore raw
Quoted 5 lines · Khem Raj

still seeing issues

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2802

I dropped the unknown option and it went further which is good, however I am seeing

WARNING: mpich-4.1.1-r0 do_package_qa: QA Issue: File /usr/lib/libmpi.so.12.3.0 in package mpich contains reference to TMPDIR
File /usr/bin/mpicc in package mpich contains reference to TMPDIR File /usr/bin/mpicxx in package mpich contains reference to TMPDIR [buildpaths]

So it will be good to look into this problem as well, why do we see these QA warnings.

Quoted 163 lines · Böszörményi Zoltán
Quoted 162 lines

2023. 06. 07. 9:23 keltezéssel, Zoltán Böszörményi írta:

Quoted 134 lines

mpich 4.1+ has its own official way to allow cross-compiling, use it.

Remove the old PACKAGECONFIG[x11], the configuration option does not exist anymore.

Add PACKAGECONFIG knobs to allow building the C++ and FORTRAN parts. Both are needed by intel-oneapi-mkl in meta-intel. Don't enable either by default to keep the current minimalistic build.

Remove configuration options that don't exist in the new version.

Set TOOLCHAIN = "gcc".

---
  meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb | 58 -----------------
  meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb | 64 +++++++++++++++++++
  2 files changed, 64 insertions(+), 58 deletions(-)

delete mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb create mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb

meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb deleted +0 -58
deleted file mode 100644
index 000f73981..000000000
@@ -1,58 +0,0 @@
-SUMMARY = "Message Passing Interface (MPI) implementation"
-HOMEPAGE = "http://www.mpich.org/"
-SECTION = "devel"
-
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bd4d7ab13df98988b1ca2a4e01c8c163"
-
-SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
-SRC_URI[sha256sum] = "17406ea90a6ed4ecd5be39c9ddcbfac9343e6ab4f77ac4e8c5ebe4a3e3b6c501"
-
-RDEPENDS:${PN} += "bash perl libxml2"
-
-EXTRA_OECONF = "--enable-debuginfo \
-    --enable-fast \
-    --enable-shared  \
-    --with-pm=gforker  \
-    --disable-rpath \
-    --disable-f77 \
-    --disable-fc \
-    --disable-fortran \
-    --disable-cxx \
-    BASH_SHELL='${USRBINPATH}/env bash' \
-    PERL='${USRBINPATH}/env perl' \
-    --with-device=ch3:nemesis \
-    --with-rdmacm=no \
-    --disable-numa \
-"
-
-PACKAGECONFIG += " \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-"
-PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
-
-# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
-LDFLAGS:append:x86-64 = " -lgcc"
-LDFLAGS:append:x86 = " -lgcc"
-
-inherit autotools gettext pkgconfig
-
-do_configure() {
-    for d in confdb test/mpi test/mpi/confdb src/pm/hydra/confdb \
-        src/pm/hydra/tools/topo/hwloc/hwloc/config src/pm/hydra/mpl/confdb \
-        modules/yaksa/m4 modules/json-c modules/ucx modules/hwloc/config \
-        test/mpi/dtpools/confdb src/mpl/confdb src/mpi/romio/confdb;  do
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/$d
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/$d
-    done
-#    cd ${S}
-#    autoupdate
-#    autoreconf --verbose --install --force
-#    cd ${B}
-    oe_runconf
-}
-
-do_install:append() {
-    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
-    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
-}
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +42 -0
new file mode 100644
index 000000000..cb9c0f1dd
@@ -0,0 +1,64 @@
+SUMMARY = "Message Passing Interface (MPI) implementation"
+HOMEPAGE = "http://www.mpich.org/"
+SECTION = "devel"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f1804c45b8b4e816e53eb1f175d810f3"
+
+SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
+SRC_URI[sha256sum] = "ee30471b35ef87f4c88f871a5e2ad3811cd9c4df32fd4f138443072ff4284ca2"
+
+TOOLCHAIN = "gcc"
+
+RDEPENDS:${PN} += "bash perl libxml2"
+
+EXTRA_OECONF = "--enable-debuginfo \
+    --enable-fast \
+    --enable-shared  \
+    --with-pm=gforker  \
+    BASH_SHELL='${USRBINPATH}/env bash' \
+    PERL='${USRBINPATH}/env perl' \
+    --with-device=ch3:nemesis \
+"
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx"
+PACKAGECONFIG[fortran] = "--with-cross=${WORKDIR}/cross_values.txt --enable-fortran,--disable-f77 --disable-fc --disable-fortran,libgfortran"
+
+# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
+LDFLAGS:append:x86-64 = " -lgcc"
+LDFLAGS:append:x86 = " -lgcc"
+
+inherit autotools gettext pkgconfig qemu
+
+DEPENDS += "qemu-native"
+
+do_configure() {
+    if [ "${@bb.utils.contains('PACKAGECONFIG', 'fortran', '1', '', d)}" = "1" ]; then
+        qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
+        cat > ${WORKDIR}/qemuwrapper << EOF
+#!/bin/sh
+$qemu_binary "\$@"

meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb line 52

Quoted 10 lines
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +10 -0
+EOF
+        chmod +x ${WORKDIR}/qemuwrapper
+
+        sed -i 's:my \(.*\) ./t`;:my \1 ${WORKDIR}/qemuwrapper ${WORKDIR}/t`;:' ${S}/maint/gen_cross.pl
+
+        cd ${WORKDIR}
+        perl ${S}/maint/gen_cross.pl
+    fi
+
+    sed -i 's:\(CROSS_F90_INTEGER_MODEL_MAP=.*\) }"$:\1 }, ":' ${WORKDIR}/cross_values.txt

This must be in the if [] above. Just sent v4 with this fix.

Quoted 12 lines
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +12 -0
+
+    cd ${S}
+    ./autogen.sh
+
+    cd ${B}
+    oe_runconf
+}
+
+do_install:append() {
+    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
+    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
+}
#4 lore raw

I have added fixes for the issues I have seen, Please take a look at the updated patch in master-next

Quoted 183 lines · Khem Raj
Quoted 5 lines · Khem Raj

still seeing issues

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2802

I dropped the unknown option and it went further which is good, however I am seeing

WARNING: mpich-4.1.1-r0 do_package_qa: QA Issue: File /usr/lib/libmpi.so.12.3.0 in package mpich contains reference to TMPDIR
File /usr/bin/mpicc in package mpich contains reference to TMPDIR File /usr/bin/mpicxx in package mpich contains reference to TMPDIR [buildpaths]

So it will be good to look into this problem as well, why do we see these QA warnings.

Quoted 163 lines · Böszörményi Zoltán
Quoted 162 lines

2023. 06. 07. 9:23 keltezéssel, Zoltán Böszörményi írta:

Quoted 134 lines

mpich 4.1+ has its own official way to allow cross-compiling, use it.

Remove the old PACKAGECONFIG[x11], the configuration option does not exist anymore.

Add PACKAGECONFIG knobs to allow building the C++ and FORTRAN parts. Both are needed by intel-oneapi-mkl in meta-intel. Don't enable either by default to keep the current minimalistic build.

Remove configuration options that don't exist in the new version.

Set TOOLCHAIN = "gcc".

---
  meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb | 58 -----------------
  meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb | 64 +++++++++++++++++++
  2 files changed, 64 insertions(+), 58 deletions(-)

delete mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb create mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb

meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb deleted +0 -58
deleted file mode 100644
index 000f73981..000000000
@@ -1,58 +0,0 @@
-SUMMARY = "Message Passing Interface (MPI) implementation"
-HOMEPAGE = "http://www.mpich.org/"
-SECTION = "devel"
-
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bd4d7ab13df98988b1ca2a4e01c8c163"
-
-SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
-SRC_URI[sha256sum] = "17406ea90a6ed4ecd5be39c9ddcbfac9343e6ab4f77ac4e8c5ebe4a3e3b6c501"
-
-RDEPENDS:${PN} += "bash perl libxml2"
-
-EXTRA_OECONF = "--enable-debuginfo \
-    --enable-fast \
-    --enable-shared  \
-    --with-pm=gforker  \
-    --disable-rpath \
-    --disable-f77 \
-    --disable-fc \
-    --disable-fortran \
-    --disable-cxx \
-    BASH_SHELL='${USRBINPATH}/env bash' \
-    PERL='${USRBINPATH}/env perl' \
-    --with-device=ch3:nemesis \
-    --with-rdmacm=no \
-    --disable-numa \
-"
-
-PACKAGECONFIG += " \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-"
-PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
-
-# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
-LDFLAGS:append:x86-64 = " -lgcc"
-LDFLAGS:append:x86 = " -lgcc"
-
-inherit autotools gettext pkgconfig
-
-do_configure() {
-    for d in confdb test/mpi test/mpi/confdb src/pm/hydra/confdb \
-        src/pm/hydra/tools/topo/hwloc/hwloc/config src/pm/hydra/mpl/confdb \
-        modules/yaksa/m4 modules/json-c modules/ucx modules/hwloc/config \
-        test/mpi/dtpools/confdb src/mpl/confdb src/mpi/romio/confdb;  do
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/$d
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/$d
-    done
-#    cd ${S}
-#    autoupdate
-#    autoreconf --verbose --install --force
-#    cd ${B}
-    oe_runconf
-}
-
-do_install:append() {
-    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
-    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
-}
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +42 -0
new file mode 100644
index 000000000..cb9c0f1dd
@@ -0,0 +1,64 @@
+SUMMARY = "Message Passing Interface (MPI) implementation"
+HOMEPAGE = "http://www.mpich.org/"
+SECTION = "devel"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f1804c45b8b4e816e53eb1f175d810f3"
+
+SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
+SRC_URI[sha256sum] = "ee30471b35ef87f4c88f871a5e2ad3811cd9c4df32fd4f138443072ff4284ca2"
+
+TOOLCHAIN = "gcc"
+
+RDEPENDS:${PN} += "bash perl libxml2"
+
+EXTRA_OECONF = "--enable-debuginfo \
+    --enable-fast \
+    --enable-shared  \
+    --with-pm=gforker  \
+    BASH_SHELL='${USRBINPATH}/env bash' \
+    PERL='${USRBINPATH}/env perl' \
+    --with-device=ch3:nemesis \
+"
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx"
+PACKAGECONFIG[fortran] = "--with-cross=${WORKDIR}/cross_values.txt --enable-fortran,--disable-f77 --disable-fc --disable-fortran,libgfortran"
+
+# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
+LDFLAGS:append:x86-64 = " -lgcc"
+LDFLAGS:append:x86 = " -lgcc"
+
+inherit autotools gettext pkgconfig qemu
+
+DEPENDS += "qemu-native"
+
+do_configure() {
+    if [ "${@bb.utils.contains('PACKAGECONFIG', 'fortran', '1', '', d)}" = "1" ]; then
+        qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
+        cat > ${WORKDIR}/qemuwrapper << EOF
+#!/bin/sh
+$qemu_binary "\$@"

meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb line 52

Quoted 10 lines
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +10 -0
+EOF
+        chmod +x ${WORKDIR}/qemuwrapper
+
+        sed -i 's:my \(.*\) ./t`;:my \1 ${WORKDIR}/qemuwrapper ${WORKDIR}/t`;:' ${S}/maint/gen_cross.pl
+
+        cd ${WORKDIR}
+        perl ${S}/maint/gen_cross.pl
+    fi
+
+    sed -i 's:\(CROSS_F90_INTEGER_MODEL_MAP=.*\) }"$:\1 }, ":' ${WORKDIR}/cross_values.txt

This must be in the if [] above. Just sent v4 with this fix.

Quoted 12 lines
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +12 -0
+
+    cd ${S}
+    ./autogen.sh
+
+    cd ${B}
+    oe_runconf
+}
+
+do_install:append() {
+    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
+    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
+}
#5 lore raw

2023. 06. 08. 23:10 keltezéssel, Khem Raj írta:

Quoted 2 lines

I have added fixes for the issues I have seen, Please take a look at the updated patch in master-next

Thanks, it looks good.

Quoted 179 lines · Khem Raj
Quoted 177 lines · Khem Raj
Quoted 4 lines

still seeing issues

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2802

I dropped the unknown option and it went further which is good, however I am seeing

WARNING: mpich-4.1.1-r0 do_package_qa: QA Issue: File /usr/lib/libmpi.so.12.3.0 in package mpich contains reference to TMPDIR
File /usr/bin/mpicc in package mpich contains reference to TMPDIR File /usr/bin/mpicxx in package mpich contains reference to TMPDIR [buildpaths]

So it will be good to look into this problem as well, why do we see these QA warnings.

Quoted 160 lines · Böszörményi Zoltán
Quoted 159 lines

2023. 06. 07. 9:23 keltezéssel, Zoltán Böszörményi írta:

Quoted 134 lines

mpich 4.1+ has its own official way to allow cross-compiling, use it.

Remove the old PACKAGECONFIG[x11], the configuration option does not exist anymore.

Add PACKAGECONFIG knobs to allow building the C++ and FORTRAN parts. Both are needed by intel-oneapi-mkl in meta-intel. Don't enable either by default to keep the current minimalistic build.

Remove configuration options that don't exist in the new version.

Set TOOLCHAIN = "gcc".

---
   meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb | 58 -----------------
   meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb | 64 +++++++++++++++++++
   2 files changed, 64 insertions(+), 58 deletions(-)

delete mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb create mode 100644 meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb

meta-oe/recipes-devtools/mpich/mpich_4.0.3.bb deleted +0 -58
deleted file mode 100644
index 000f73981..000000000
@@ -1,58 +0,0 @@
-SUMMARY = "Message Passing Interface (MPI) implementation"
-HOMEPAGE = "http://www.mpich.org/"
-SECTION = "devel"
-
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bd4d7ab13df98988b1ca2a4e01c8c163"
-
-SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
-SRC_URI[sha256sum] = "17406ea90a6ed4ecd5be39c9ddcbfac9343e6ab4f77ac4e8c5ebe4a3e3b6c501"
-
-RDEPENDS:${PN} += "bash perl libxml2"
-
-EXTRA_OECONF = "--enable-debuginfo \
-    --enable-fast \
-    --enable-shared  \
-    --with-pm=gforker  \
-    --disable-rpath \
-    --disable-f77 \
-    --disable-fc \
-    --disable-fortran \
-    --disable-cxx \
-    BASH_SHELL='${USRBINPATH}/env bash' \
-    PERL='${USRBINPATH}/env perl' \
-    --with-device=ch3:nemesis \
-    --with-rdmacm=no \
-    --disable-numa \
-"
-
-PACKAGECONFIG += " \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-"
-PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
-
-# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
-LDFLAGS:append:x86-64 = " -lgcc"
-LDFLAGS:append:x86 = " -lgcc"
-
-inherit autotools gettext pkgconfig
-
-do_configure() {
-    for d in confdb test/mpi test/mpi/confdb src/pm/hydra/confdb \
-        src/pm/hydra/tools/topo/hwloc/hwloc/config src/pm/hydra/mpl/confdb \
-        modules/yaksa/m4 modules/json-c modules/ucx modules/hwloc/config \
-        test/mpi/dtpools/confdb src/mpl/confdb src/mpi/romio/confdb;  do
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/$d
-        install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/$d
-    done
-#    cd ${S}
-#    autoupdate
-#    autoreconf --verbose --install --force
-#    cd ${B}
-    oe_runconf
-}
-
-do_install:append() {
-    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
-    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
-}
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +42 -0
new file mode 100644
index 000000000..cb9c0f1dd
@@ -0,0 +1,64 @@
+SUMMARY = "Message Passing Interface (MPI) implementation"
+HOMEPAGE = "http://www.mpich.org/"
+SECTION = "devel"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f1804c45b8b4e816e53eb1f175d810f3"
+
+SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
+SRC_URI[sha256sum] = "ee30471b35ef87f4c88f871a5e2ad3811cd9c4df32fd4f138443072ff4284ca2"
+
+TOOLCHAIN = "gcc"
+
+RDEPENDS:${PN} += "bash perl libxml2"
+
+EXTRA_OECONF = "--enable-debuginfo \
+    --enable-fast \
+    --enable-shared  \
+    --with-pm=gforker  \
+    BASH_SHELL='${USRBINPATH}/env bash' \
+    PERL='${USRBINPATH}/env perl' \
+    --with-device=ch3:nemesis \
+"
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx"
+PACKAGECONFIG[fortran] = "--with-cross=${WORKDIR}/cross_values.txt --enable-fortran,--disable-f77 --disable-fc --disable-fortran,libgfortran"
+
+# libmpi.so needs symbols like __multf3 and somehow it does not respect --rtlib option passed by clang
+LDFLAGS:append:x86-64 = " -lgcc"
+LDFLAGS:append:x86 = " -lgcc"
+
+inherit autotools gettext pkgconfig qemu
+
+DEPENDS += "qemu-native"
+
+do_configure() {
+    if [ "${@bb.utils.contains('PACKAGECONFIG', 'fortran', '1', '', d)}" = "1" ]; then
+        qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
+        cat > ${WORKDIR}/qemuwrapper << EOF
+#!/bin/sh
+$qemu_binary "\$@"

meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb line 52

Quoted 10 lines
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +10 -0
+EOF
+        chmod +x ${WORKDIR}/qemuwrapper
+
+        sed -i 's:my \(.*\) ./t`;:my \1 ${WORKDIR}/qemuwrapper ${WORKDIR}/t`;:' ${S}/maint/gen_cross.pl
+
+        cd ${WORKDIR}
+        perl ${S}/maint/gen_cross.pl
+    fi
+
+    sed -i 's:\(CROSS_F90_INTEGER_MODEL_MAP=.*\) }"$:\1 }, ":' ${WORKDIR}/cross_values.txt

This must be in the if [] above. Just sent v4 with this fix.

Quoted 12 lines
meta-oe/recipes-devtools/mpich/mpich_4.1.1.bb new file +12 -0
+
+    cd ${S}
+    ./autogen.sh
+
+    cd ${B}
+    oe_runconf
+}
+
+do_install:append() {
+    sed -i 's,${S}/,,g' ${D}/${libdir}/libmpi.la
+    sed -i 's,${DEBUG_PREFIX_MAP},,g' ${D}/${libdir}/pkgconfig/mpich.pc
+}