diff --git a/add-sw_64-support.patch b/add-sw_64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..69a1a02cf028e6df234b7f5b9a62f72cbf14fef5 --- /dev/null +++ b/add-sw_64-support.patch @@ -0,0 +1,32 @@ +From 1e81da541310a3a1a5f9e9c3e2314f5b02019700 Mon Sep 17 00:00:00 2001 +From: Hailiang +Date: Tue, 18 Mar 2025 15:20:11 +0800 +Subject: [PATCH] add sw_64 support + +--- + src/mpid/ch3/channels/common/include/mv2_clock.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/mpid/ch3/channels/common/include/mv2_clock.h b/src/mpid/ch3/channels/common/include/mv2_clock.h +index 9a0128f..6147539 100644 +--- a/src/mpid/ch3/channels/common/include/mv2_clock.h ++++ b/src/mpid/ch3/channels/common/include/mv2_clock.h +@@ -95,6 +95,15 @@ static inline cycles_t get_cycles() + ); + return val; + } ++#elif defined(__sw_64__) ++typedef unsigned long cycles_t; ++static inline cycles_t get_cycles() ++{ ++ cycles_t ret; ++ ++ __asm__ __volatile__ ("rtc %0" : "=r"(ret)); ++ return ret; ++} + #elif defined(__aarch64__) + typedef unsigned long cycles_t; + static inline cycles_t get_cycles() +-- +2.20.1 + diff --git a/mvapich2.spec b/mvapich2.spec index d6ae6b88d76c1f3732c323bf6ea9e22761c6a4d8..39a2d5b74970b0d44cacde62091e467c35f8009f 100644 --- a/mvapich2.spec +++ b/mvapich2.spec @@ -2,7 +2,7 @@ Name: mvapich2 Version: 2.3.6 -Release: 4 +Release: 5 Summary: OSU MVAPICH2 MPI package License: BSD and MIT URL: http://mvapich.cse.ohio-state.edu @@ -15,6 +15,7 @@ Patch0002: 0002-mvapich23-unbundle-osu_benchmarks.patch Patch1000: 1000-add-riscv-support.patch %endif Patch1001: 0001-mvapich2-2.3.6-add-support-for-loongarch64.patch +Patch1002: add-sw_64-support.patch BuildRequires: gcc-gfortran python3-devel gcc-c++ BuildRequires: bison flex autoconf automake libtool BuildRequires: perl-Digest-MD5 hwloc-devel rdma-core-devel @@ -133,7 +134,12 @@ cd default --includedir=%{_includedir}/%{namearch} --sysconfdir=%{_sysconfdir}/%{namearch} \ --datarootdir=%{_datadir}/mvapich2 --docdir=%{_docdir}/mvapich2 \ --enable-error-checking=runtime --enable-timing=none --enable-g=mem,dbg,meminit \ - --enable-fast=all --enable-shared --enable-static --enable-fortran=all --enable-cxx \ + --enable-fast=all --enable-shared --enable-static --enable-cxx \ +%ifarch sw_64 + --disable-fortran \ +%else + --enable-fortran=all \ +%endif --disable-silent-rules --disable-wrapper-rpath --with-hwloc=v2 find . -name libtool -exec \ @@ -207,9 +213,11 @@ cd .. %{_libdir}/mvapich2/bin/mpic++ %{_libdir}/mvapich2/bin/mpicc %{_libdir}/mvapich2/bin/mpicxx +%ifnarch sw_64 %{_libdir}/mvapich2/bin/mpif77 %{_libdir}/mvapich2/bin/mpif90 %{_libdir}/mvapich2/bin/mpifort +%endif %{_libdir}/mvapich2/lib/pkgconfig %{_libdir}/mvapich2/lib/*.a %{_libdir}/mvapich2/lib/*.so @@ -262,6 +270,9 @@ cd .. %changelog +* Tue Mar 18 2025 mahailiang - 2.3.6-5 +- add support for sw_64 + * Thu Apr 25 2024 Pengda Dou - 2.3.6-4 - add support for loongarch64