diff --git a/Life Sciences/README.md b/Life Sciences/README.md index d3aadd7a731e34a52f0676e2d2dc33797db13888..2de251eea09c37abbcdc96584d8e51a971c64b52 100644 --- a/Life Sciences/README.md +++ b/Life Sciences/README.md @@ -1,2 +1,2 @@ Life Sciences Software List: -- repositories: xxx +- repositories: redundans diff --git a/Life Sciences/redundans/build.sh b/Life Sciences/redundans/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..fe5847366fd8944e80fa6375f0869602ab79dff0 --- /dev/null +++ b/Life Sciences/redundans/build.sh @@ -0,0 +1,47 @@ +#!/bin/bash +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash build.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +[[ ! "$1" =~ ^/.* || "$1" = "/" ]] && echo "请输入正确的构建路径" && exit 1 +[[ ! "$2" =~ ^/.* || "$2" = "/" ]] && echo "请输入正确的安装路径" && exit 1 + +create_dir() +{ + local path=$1 + [[ "$path" =~ .*/$ ]] && path=${path%/*} + if [[ ! -d "$path" && ! -f "$path" ]]; then mkdir -p $path; else path=$path`date "+%y%m%d%H%M%S"` && mkdir -p $path; fi + echo $path +} + +buildpath=$(create_dir $1) +installpath=$(create_dir $2) + +yum install -y m4 environment-modules systemd-devel +source /etc/profile +module purge + +set -e +dep_dir="dependency" +bash $dep_dir/bisheng-compiler-2.1.0.sh $buildpath $installpath +module use $installpath/bisheng-compiler-2.1.0 +module load $installpath/bisheng-compiler-2.1.0/bisheng_modulefiles + +bash redundans-v0.13c.sh $buildpath $installpath + +mkdir -p pkg/redundans-v0.13c-hpc && cp -r $installpath/* pkg/redundans-v0.13c-hpc/ +cat>"pkg/redundans-v0.13c-hpc/env.sh"< /dev/null +EOF +cd pkg/ && tar zcvf redundans-v0.13c-hpc.tar.gz redundans-v0.13c-hpc + +rm -rf $buildpath $installpath diff --git a/Life Sciences/redundans/dependency/bisheng-compiler-2.1.0.sh b/Life Sciences/redundans/dependency/bisheng-compiler-2.1.0.sh new file mode 100644 index 0000000000000000000000000000000000000000..3be7ce1a7ca5a3468b87fb74e93920979896c997 --- /dev/null +++ b/Life Sciences/redundans/dependency/bisheng-compiler-2.1.0.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash bisheng-compiler-2.1.0.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +[[ ! "$1" =~ ^/.* || ! -d "$1" || "$1" = "/" ]] && echo "请输入正确的构建路径" && exit 1 +[[ ! "$2" =~ ^/.* || ! -d "$2" || "$2" = "/" ]] && echo "请输入正确的安装路径" && exit 1 + +buildpath=$1 +installpath=$2 +[[ "$buildpath" =~ .*/$ ]] && buildpath=${buildpath%/*} +[[ "$installpath" =~ .*/$ ]] && installpath=${installpath%/*} +set -e +yum install -y wget tar environment-modules libatomic + +wget -t 0 -c -P $buildpath https://mirrors.huaweicloud.com/kunpeng/archive/compiler/bisheng_compiler/bisheng-compiler-2.1.0-aarch64-linux.tar.gz +tar xf $buildpath/bisheng-compiler-2.1.0-aarch64-linux.tar.gz -C $buildpath && rm -rf $buildpath/bisheng-compiler-2.1.0-aarch64-linux.tar.gz +mkdir -p $installpath/bisheng-compiler-2.1.0 && cp -r $buildpath/bisheng-compiler-2.1.0-aarch64-linux/* $installpath/bisheng-compiler-2.1.0/ + +cat>"$installpath/bisheng-compiler-2.1.0/bisheng_modulefiles"</\/\*#include \*\//g' ksw.c +sed -i '/#include / a\#include "sse2neon.h"' ksw.c +sed -i 's/const uint8_t rle_auxtab/extern const uint8_t rle_auxtab/g' rle.h +make + +cd $buildpath/redundans-0.13c/bin/last +sed -i 's/(MAKE) CXXFLAGS/(MAKE) CXX=clang++ CXXFLAGS/g' makefile +make clean && make + +cd $buildpath/redundans-0.13c/bin/snap +sed -i 's/-std=c++98/-std=c++98 -march=armv8.2-a/' Makefile +sed -i "s/g++/clang++/" Makefile +sed -i "s/-msse//" Makefile +sed -i 's/#include /\/\*#include \*\//g' SNAPLib/Compat.h +sed -i '/#include / a\#include "sse2neon.h"' SNAPLib/Compat.h +make + +cd $buildpath/v1.12-r6/ +sed -i "s/g++/clang++/" Release/makefile +sed -i "s/g++/clang++/" Release/subdir.mk +sed -i "s/hash(/hash_table(/" HashTable.hpp +make +\cp Release/GapCloser $buildpath/redundans-0.13c/bin/ +rm -rf $buildpath/v1.12-r6 +mkdir -p $installpath/redundans-0.13c && cp -r $buildpath/redundans-0.13c/* $installpath/redundans-0.13c + +rm -rf $buildpath/redundans-0.13c + diff --git a/README.md b/README.md index 8003e4a6e07bbfae3aab6e9d8453c9d8181ee447..dbcbe5328d6e16fff6cf96cc99aee79714c42dbd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ HPC Software List: - repositories: https://gitee.com/src-openeuler/wrf - repositories: https://gitee.com/src-openeuler/lammps +- repositories: Life Seciences/redundans