add sw_64 and loongarch64 support
(cherry picked from commit ac95e747a9e8439cfe17d83c8ecf11d87af4cf32)
This commit is contained in:
parent
a4e1b7a6c2
commit
391f4aa58d
37
1000-add-loongarch64-support-not-upstream-mv2_clock.patch
Normal file
37
1000-add-loongarch64-support-not-upstream-mv2_clock.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From 2c87d0fb35dc83c446665c80c78629bb9114e2b4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: houfangdong <houfangdong@loongson.cn>
|
||||||
|
Date: Thu, 18 Nov 2021 09:03:23 +0800
|
||||||
|
Subject: [PATCH 3/3] mv2_clock support loongarch64.
|
||||||
|
|
||||||
|
---
|
||||||
|
src/mpid/ch3/channels/common/include/mv2_clock.h | 14 ++++++++++++++
|
||||||
|
1 file changed, 14 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/mpid/ch3/channels/common/include/mv2_clock.h b/src/mpid/ch3/channels/common/include/mv2_clock.h
|
||||||
|
index 98f05df..45f3316 100644
|
||||||
|
--- a/src/mpid/ch3/channels/common/include/mv2_clock.h
|
||||||
|
+++ b/src/mpid/ch3/channels/common/include/mv2_clock.h
|
||||||
|
@@ -92,6 +92,20 @@ static inline cycles_t get_cycles()
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
+#elif defined(__loongarch64)
|
||||||
|
+typedef unsigned long cycles_t;
|
||||||
|
+static inline cycles_t get_cycles()
|
||||||
|
+{
|
||||||
|
+ int rID = 0;
|
||||||
|
+ cycles_t val = 0;
|
||||||
|
+
|
||||||
|
+ __asm__ __volatile__(
|
||||||
|
+ "rdtime.d %0, %1 \n\t"
|
||||||
|
+ : "=r"(val), "=r"(rID)
|
||||||
|
+ :
|
||||||
|
+ );
|
||||||
|
+ return val;
|
||||||
|
+}
|
||||||
|
|
||||||
|
#else
|
||||||
|
#warning get_cycles not implemented for this architecture: attempt asm/timex.h
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
20
1001-add-sw_64-support-not-upstream-mv2_clock.patch
Normal file
20
1001-add-sw_64-support-not-upstream-mv2_clock.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff --git a/src/mpid/ch3/channels/common/include/mv2_clock.h b/src/mpid/ch3/channels/common/include/mv2_clock.h
|
||||||
|
index 135798f..ae32d00 100644
|
||||||
|
--- a/src/mpid/ch3/channels/common/include/mv2_clock.h
|
||||||
|
+++ b/src/mpid/ch3/channels/common/include/mv2_clock.h
|
||||||
|
@@ -106,6 +106,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;
|
||||||
|
+}
|
||||||
|
|
||||||
|
#else
|
||||||
|
#warning get_cycles not implemented for this architecture: attempt asm/timex.h
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: mvapich2
|
Name: mvapich2
|
||||||
Version: 2.3.6
|
Version: 2.3.6
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: OSU MVAPICH2 MPI package
|
Summary: OSU MVAPICH2 MPI package
|
||||||
License: BSD and MIT
|
License: BSD and MIT
|
||||||
URL: http://mvapich.cse.ohio-state.edu
|
URL: http://mvapich.cse.ohio-state.edu
|
||||||
@ -11,6 +11,9 @@ Source1: mvapich2.module.in
|
|||||||
Source2: mvapich2.macros.in
|
Source2: mvapich2.macros.in
|
||||||
Patch0001: 0001-mvapich23-unbundle-contrib-hwloc.patch
|
Patch0001: 0001-mvapich23-unbundle-contrib-hwloc.patch
|
||||||
Patch0002: 0002-mvapich23-unbundle-osu_benchmarks.patch
|
Patch0002: 0002-mvapich23-unbundle-osu_benchmarks.patch
|
||||||
|
Patch1000: 1000-add-loongarch64-support-not-upstream-mv2_clock.patch
|
||||||
|
Patch1001: 1001-add-sw_64-support-not-upstream-mv2_clock.patch
|
||||||
|
# END KYLINSEC
|
||||||
BuildRequires: gcc-gfortran python3-devel gcc-c++
|
BuildRequires: gcc-gfortran python3-devel gcc-c++
|
||||||
BuildRequires: bison flex autoconf automake libtool
|
BuildRequires: bison flex autoconf automake libtool
|
||||||
BuildRequires: perl-Digest-MD5 hwloc-devel rdma-core-devel
|
BuildRequires: perl-Digest-MD5 hwloc-devel rdma-core-devel
|
||||||
@ -119,6 +122,11 @@ cd default
|
|||||||
--datarootdir=%{_datadir}/mvapich2 --docdir=%{_docdir}/mvapich2 \
|
--datarootdir=%{_datadir}/mvapich2 --docdir=%{_docdir}/mvapich2 \
|
||||||
--enable-error-checking=runtime --enable-timing=none --enable-g=mem,dbg,meminit \
|
--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-fortran=all --enable-cxx \
|
||||||
|
%ifarch sw_64
|
||||||
|
--disable-fortran \
|
||||||
|
%else
|
||||||
|
--enable-fortran=all \
|
||||||
|
%endif
|
||||||
--disable-silent-rules --disable-wrapper-rpath --with-hwloc=v2
|
--disable-silent-rules --disable-wrapper-rpath --with-hwloc=v2
|
||||||
|
|
||||||
find . -name libtool -exec \
|
find . -name libtool -exec \
|
||||||
@ -192,9 +200,11 @@ cd ..
|
|||||||
%{_libdir}/mvapich2/bin/mpic++
|
%{_libdir}/mvapich2/bin/mpic++
|
||||||
%{_libdir}/mvapich2/bin/mpicc
|
%{_libdir}/mvapich2/bin/mpicc
|
||||||
%{_libdir}/mvapich2/bin/mpicxx
|
%{_libdir}/mvapich2/bin/mpicxx
|
||||||
|
%ifnarch sw_64
|
||||||
%{_libdir}/mvapich2/bin/mpif77
|
%{_libdir}/mvapich2/bin/mpif77
|
||||||
%{_libdir}/mvapich2/bin/mpif90
|
%{_libdir}/mvapich2/bin/mpif90
|
||||||
%{_libdir}/mvapich2/bin/mpifort
|
%{_libdir}/mvapich2/bin/mpifort
|
||||||
|
%endif
|
||||||
%{_libdir}/mvapich2/lib/pkgconfig
|
%{_libdir}/mvapich2/lib/pkgconfig
|
||||||
%{_libdir}/mvapich2/lib/*.a
|
%{_libdir}/mvapich2/lib/*.a
|
||||||
%{_libdir}/mvapich2/lib/*.so
|
%{_libdir}/mvapich2/lib/*.so
|
||||||
@ -247,13 +257,16 @@ cd ..
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 28 2023 panchenbo <panchenbo@kylinsec.com.cn> - 2.3.6-2
|
||||||
|
- add sw_64 and loongarch64 support
|
||||||
|
|
||||||
* Mon Jun 20 2022 liyanan <liyanan32@h-partners.com> - 2.3.6-1
|
* Mon Jun 20 2022 liyanan <liyanan32@h-partners.com> - 2.3.6-1
|
||||||
- Update to 2.3.6
|
- Update to 2.3.6
|
||||||
|
|
||||||
* Sat 07 Aug 2021 sunguoshuai <sunguoshuai@huawei.com> - 2.3-11
|
* Sat Aug 07 2021 sunguoshuai <sunguoshuai@huawei.com> - 2.3-11
|
||||||
- fix build error with gcc 10,include allow mismatched arguement and multiple definition
|
- fix build error with gcc 10,include allow mismatched arguement and multiple definition
|
||||||
|
|
||||||
* Wed July 9 2021 zhaoyao <zhaoyao32@huawei.com> - 2.3-10
|
* Fri Jul 09 2021 zhaoyao <zhaoyao32@huawei.com> - 2.3-10
|
||||||
- fix build error: Abording because C++ compiler does not work.
|
- fix build error: Abording because C++ compiler does not work.
|
||||||
|
|
||||||
* Sat Mar 27 2021 zhanghua <zhanghua40@huawei.com> - 2.3-9
|
* Sat Mar 27 2021 zhanghua <zhanghua40@huawei.com> - 2.3-9
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user