diff --git a/0001-add-loongarch64-and-riscv64-support.patch b/0001-add-loongarch64-and-riscv64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..eff2b9d750cd038471fdf7eb536e5ff13ce4e2a5 --- /dev/null +++ b/0001-add-loongarch64-and-riscv64-support.patch @@ -0,0 +1,16 @@ +diff -Naru a/config/opal_config_asm.m4 b/config/opal_config_asm.m4 +--- a/config/opal_config_asm.m4 2024-12-05 10:03:53.984893277 +0800 ++++ b/config/opal_config_asm.m4 2024-12-05 10:12:01.651288678 +0800 +@@ -538,6 +538,12 @@ + powerpc-*|powerpc64-*|powerpcle-*|powerpc64le-*|rs6000-*|ppc-*) + opal_gcc_inline_assign='"1: li %0,0" : "=&r"(ret)' + ;; ++ riscv64*) ++ opal_gcc_inline_assign='"li %0, 0" : "=&r"(ret)' ++ ;; ++ loongarch64*) ++ opal_gcc_inline_assign='"li.d %0, 0" : "=&r"(ret)' ++ ;; + esac + + AS_IF([test "$opal_gcc_inline_assign" != ""], diff --git a/0001-add-loongarch64-support-for-openmpi.patch b/0001-add-loongarch64-support-for-openmpi.patch deleted file mode 100644 index e19d6d1b48815a47ed0d87d615fee5e7575d4d74..0000000000000000000000000000000000000000 --- a/0001-add-loongarch64-support-for-openmpi.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 015d0246d315377d1d8aeadeff8fcbc2aef49874 Mon Sep 17 00:00:00 2001 -From: Wenlong Zhang -Date: Thu, 20 Jul 2023 03:27:39 +0000 -Subject: [PATCH] add loongarch64 support for openmpi - ---- - config/opal_config_asm.m4 | 5 +++++ - opal/include/opal/sys/architecture.h | 1 + - opal/include/opal/sys/cma.h | 5 +++++ - 3 files changed, 11 insertions(+) - -diff --git a/config/opal_config_asm.m4 b/config/opal_config_asm.m4 -index d8640e0..586a2c8 100644 ---- a/config/opal_config_asm.m4 -+++ b/config/opal_config_asm.m4 -@@ -1154,6 +1154,11 @@ AC_DEFUN([OPAL_CONFIG_ASM],[ - OPAL_ASM_SUPPORT_64BIT=1 - OPAL_GCC_INLINE_ASSIGN='"li %0, 0" : "=&r"(ret)' - ;; -+ loongarch64*) -+ opal_cv_asm_arch="LOONGARCH64" -+ OPAL_ASM_SUPPORT_64BIT=1 -+ OPAL_GCC_INLINE_ASSIGN='"li.d %0, 0" : "=&r"(ret)' -+ ;; - # There is no current difference between s390 and s390x - # But use two different defines in case some come later - # as s390 is 31bits while s390x is 64bits -diff --git a/opal/include/opal/sys/architecture.h b/opal/include/opal/sys/architecture.h -index 8a9fc53..ed54270 100644 ---- a/opal/include/opal/sys/architecture.h -+++ b/opal/include/opal/sys/architecture.h -@@ -45,6 +45,7 @@ - #define OPAL_S390 0110 - #define OPAL_S390X 0111 - #define OPAL_RISCV64 0120 -+#define OPAL_LOONGARCH64 0130 - #define OPAL_BUILTIN_SYNC 0200 - #define OPAL_BUILTIN_GCC 0202 - #define OPAL_BUILTIN_NO 0203 -diff --git a/opal/include/opal/sys/cma.h b/opal/include/opal/sys/cma.h -index 8040ccb..11417b5 100644 ---- a/opal/include/opal/sys/cma.h -+++ b/opal/include/opal/sys/cma.h -@@ -97,6 +97,11 @@ - #define __NR_process_vm_readv 270 - #define __NR_process_vm_writev 271 - -+#elif OPAL_ASSEMBLY_ARCH == OPAL_LOONGARCH64 -+/* LOONGARCH64 uses the asm-generic syscall numbers */ -+#define __NR_process_vm_readv 270 -+#define __NR_process_vm_writev 271 -+ - #else - #error "Unsupported architecture for process_vm_readv and process_vm_writev syscalls" - #endif --- -2.33.0 - diff --git a/add-riscv64-support.patch b/add-riscv64-support.patch deleted file mode 100644 index cd5f7f46fb2d031766fd07cb575c4772f7d1fc55..0000000000000000000000000000000000000000 --- a/add-riscv64-support.patch +++ /dev/null @@ -1,49 +0,0 @@ -Author: lvxiaoqian -Date: Mon Aug 15 14:06:16 2022 +0800 - - add riscv support - -diff --git a/config/opal_config_asm.m4 b/config/opal_config_asm.m4 -index 5183c7e..d8640e0 100644 ---- a/config/opal_config_asm.m4 -+++ b/config/opal_config_asm.m4 -@@ -1148,6 +1148,11 @@ AC_DEFUN([OPAL_CONFIG_ASM],[ - AC_MSG_WARN([$opal_cv_asm_arch: gcc atomics have been known to perform poorly on powerpc.]) - fi - -+ ;; -+ riscv64*) -+ opal_cv_asm_arch="RISCV64" -+ OPAL_ASM_SUPPORT_64BIT=1 -+ OPAL_GCC_INLINE_ASSIGN='"li %0, 0" : "=&r"(ret)' - ;; - # There is no current difference between s390 and s390x - # But use two different defines in case some come later -diff --git a/opal/include/opal/sys/architecture.h b/opal/include/opal/sys/architecture.h -index ee9aa96..8a9fc53 100644 ---- a/opal/include/opal/sys/architecture.h -+++ b/opal/include/opal/sys/architecture.h -@@ -44,6 +44,7 @@ - #define OPAL_ARM64 0101 - #define OPAL_S390 0110 - #define OPAL_S390X 0111 -+#define OPAL_RISCV64 0120 - #define OPAL_BUILTIN_SYNC 0200 - #define OPAL_BUILTIN_GCC 0202 - #define OPAL_BUILTIN_NO 0203 -diff --git a/opal/include/opal/sys/cma.h b/opal/include/opal/sys/cma.h -index 4211013..8040ccb 100644 ---- a/opal/include/opal/sys/cma.h -+++ b/opal/include/opal/sys/cma.h -@@ -92,6 +92,11 @@ - #define __NR_process_vm_readv 340 - #define __NR_process_vm_writev 341 - -+#elif OPAL_ASSEMBLY_ARCH == OPAL_RISCV64 -+/* RISCV64 uses the asm-generic syscall numbers */ -+#define __NR_process_vm_readv 270 -+#define __NR_process_vm_writev 271 -+ - #else - #error "Unsupported architecture for process_vm_readv and process_vm_writev syscalls" - #endif diff --git a/openmpi.spec b/openmpi.spec index 367f4f3f8422ccdf0a5f37def81204c3b6b8bb37..91e932cb1796904536bae8663cd53df0a9bc4831 100644 --- a/openmpi.spec +++ b/openmpi.spec @@ -1,6 +1,6 @@ Name: openmpi Version: 5.0.5 -Release: 2 +Release: 3 Summary: Open Source High Performance Computing License: BSD-3-Clause URL: https://www.open-mpi.org/ @@ -8,12 +8,7 @@ Source0: https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-%{ve Source1: openmpi.module.in Source2: openmpi.pth.py3 Source3: macros.openmpi -%ifarch riscv64 -Patch1000: add-riscv64-support.patch -%endif -%ifarch loongarch64 -Patch1001: 0001-add-loongarch64-support-for-openmpi.patch -%endif +Patch0001: 0001-add-loongarch64-and-riscv64-support.patch ExcludeArch: %{ix86} BuildRequires: gcc-c++, gcc-gfortran @@ -105,7 +100,7 @@ openmpi python3 interface --with-hwloc=/usr \ --with-pmix=external \ --with-libevent=external \ - --mandir=%{_mandir}/%{name_all} + --mandir=%{_mandir}/%{name} %make_build @@ -118,7 +113,7 @@ sed 's#@LIBDIR@#%{_libdir}/%{name}#; s#@ETCDIR@#%{_sysconfdir}/%{name_all}#; s#@FMODDIR@#%{_fmoddir}/%{name}#; s#@INCDIR@#%{_includedir}/%{name_all}#; - s#@MANDIR@#%{_mandir}/%{name_all}#; + s#@MANDIR@#%{_mandir}/%{name}#; s#@PY3SITEARCH@#%{python3_sitearch}/%{name}#; s#@COMPILER@#openmpi-%{_arch}#; s#@SUFFIX@#_openmpi#' \ @@ -163,8 +158,8 @@ echo "%{_libdir}/openmpi/lib" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.c %dir %{_sysconfdir}/%{name_all} %dir %{_libdir}/%{name}/lib %dir %{_libdir}/%{name}/lib/openmpi -%dir %{_mandir}/%{name_all} -%dir %{_mandir}/%{name_all}/man* +%dir %{_mandir}/%{name} +%dir %{_mandir}/%{name}/man* %dir %{_libdir}/%{name}/share %dir %{_libdir}/%{name}/share/openmpi %config(noreplace) %{_sysconfdir}/%{name_all}/* @@ -209,9 +204,13 @@ echo "%{_libdir}/openmpi/lib" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.c %{python3_sitearch}/openmpi.pth %files help -%{_mandir}/%{name_all}/man*/* +%{_mandir}/%{name}/man*/* %changelog +* Thu Dec 05 2024 Jia Chao - 5.0.5-3 +- Fix: build on riscv64 and loongarch. +- Fix: help create the same filelist on different arch. + * Tue Oct 15 2024 Funda Wang - 5.0.5-2 - 32-bit environments are no longer supported - cleanup spec