!27 Fix riscv64 support & Fix build using llvm
From: @misaka00251 Reviewed-by: @Charlie_li Signed-off-by: @Charlie_li
This commit is contained in:
commit
8cf278e169
18
1000-add-riscv-support.patch
Normal file
18
1000-add-riscv-support.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--- a/src/mpid/ch3/channels/common/include/mv2_clock.h 2018-07-24 22:30:00.000000000 +0800
|
||||||
|
+++ b/src/mpid/ch3/channels/common/include/mv2_clock.h 2022-03-03 14:19:52.430980863 +0800
|
||||||
|
@@ -92,7 +92,14 @@
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+#elif defined(__riscv)
|
||||||
|
+typedef unsigned long cycles_t;
|
||||||
|
+static inline cycles_t get_cycles()
|
||||||
|
+{
|
||||||
|
+ unsigned long clk;
|
||||||
|
+ asm volatile("rdcycle %0" : "=r" (clk));
|
||||||
|
+ return clk;
|
||||||
|
+}
|
||||||
|
#else
|
||||||
|
#warning get_cycles not implemented for this architecture: attempt asm/timex.h
|
||||||
|
#include <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
|
||||||
|
%ifarch riscv64
|
||||||
|
Patch1000: 1000-add-riscv-support.patch
|
||||||
|
%endif
|
||||||
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
|
||||||
@ -91,6 +94,17 @@ cp -pr default psm2
|
|||||||
export FFLAGS="$FFLAGS -fallow-argument-mismatch"
|
export FFLAGS="$FFLAGS -fallow-argument-mismatch"
|
||||||
export AR=ar
|
export AR=ar
|
||||||
|
|
||||||
|
%if "%toolchain" == "clang"
|
||||||
|
export FFLAGS=$(echo $FFLAGS | sed -e 's|--config \/usr\/lib\/rpm\/generic-hardened-clang.cfg ||g')
|
||||||
|
export FFLAGS=$(echo $FFLAGS | sed -e 's|-Werror=format-security ||g')
|
||||||
|
export FCFLAGS=$(echo $FCFLAGS | sed -e 's|--config \/usr\/lib\/rpm\/generic-hardened-clang.cfg ||g')
|
||||||
|
%ifarch riscv64
|
||||||
|
export LDFLAGS=$(echo $LDFLAGS | sed -e 's|-fno-openmp-implicit-rpath|-fPIE -fPIC|g')
|
||||||
|
%else
|
||||||
|
export LDFLAGS=$(echo $LDFLAGS | sed -e 's|-fno-openmp-implicit-rpath ||g')
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
cd psm2
|
cd psm2
|
||||||
%configure --prefix=%{_libdir}/mvapich2-psm2 --exec-prefix=%{_libdir}/mvapich2-psm2 \
|
%configure --prefix=%{_libdir}/mvapich2-psm2 --exec-prefix=%{_libdir}/mvapich2-psm2 \
|
||||||
@ -247,6 +261,9 @@ cd ..
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 17 2023 misaka00251 <liuxin@iscas.ac.cn> - 2.3.6-2
|
||||||
|
- Fix riscv64 support & Fix build using llvm
|
||||||
|
|
||||||
* 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
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user