Compiling and Installing HISAT2
Prerequisites
You have downloaded the sse2neon.h file from https://github.com/DLTcollab/sse2neon/blob/master/sse2neon.h.
Procedure
- Use PuTTY to log in to the server as the root user.
- Copy the downloaded sse2neon.h file to the /path/to/GNU/lib/gcc/aarch64-unknown-linux-gnu/9.1.0/include directory.
- Run the following commands to decompress the HISAT2 installation package:
cd /path/to/HISAT2 tar -xvf hisat2-2.1.0.tar.gz cd hisat2-2.1.0
- Run the following commands to set environment variables:
export NO_TBB=1 export POPCNT_CAPABILITY=0
- Perform the following steps to modify the Makefile file:
- Open Makefile.
vi Makefile
- Press i to go to the insert mode, and modify the BITS=64 aarch64 branches of the file by inserting the following content in bold between line 140 and line 141:
Currently, BITS=64 supports only x86 and does not support AArch64. The AArch64 branch needs to be added.
Before the modification:BITS=32 ifeq (x86_64,$(shell uname -m)) BITS=64 endif
After the modification:BITS=32 ifeq (x86_64,$(shell uname -m)) BITS=64 endif ifeq (aarch64,$(shell uname -m)) BITS=64 endif
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Perform the following steps to modify the Makefile file:
- Open Makefile.
vi Makefile
- Press i to go to the insert mode, and modify the -m64 and -msse2 AArch64 branches of the file by inserting the following content in bold between line 159 and line 160.
The compilation options -m64 and -msse2 in Makefile support only x86 and does not support AArch64. The AArch64 branch needs to be added.
Before the modification (line 149 to line 156 in the source file):ifeq (32,$(BITS)) BITS_FLAG = -m32 endif ifeq (64,$(BITS)) BITS_FLAG = -m64 endif SSE_FLAG=-msse2After the modification:ifeq (32,$(BITS)) BITS_FLAG = -m32 endif ifeq (64,$(BITS)) BITS_FLAG = -m64 endif SSE_FLAG=-msse2 ifeq (aarch64,$(shell uname -m)) BITS_FLAG = SSE_FLAG = endif - Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Perform the following steps to modify the Makefile file:
- Open Makefile.
vi Makefile
- Press i to go to the insert mode and modify the FLAGS parameters in the file.Before the modification:
EXTRA_FLAGS += -DPOPCNT_CAPABILITY DEBUG_FLAGS = -O0 -g3 $(BIToS_FLAG) $(SSE_FLAG) DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\"" RELEASE_FLAGS = -O3 $(BITS_FLAG) $(SSE_FLAG) -funroll-loops -g3 RELEASE_DEFS = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\"" NOASSERT_FLAGS = -DNDEBUG FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
After the modification:EXTRA_FLAGS += DEBUG_FLAGS = -O0 -g3 $(BIToS_FLAG) $(SSE_FLAG) -funroll-loops -std=c++98 DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\"" RELEASE_FLAGS = -O3 $(BITS_FLAG) $(SSE_FLAG) -funroll-loops -g3 -std=c++98 -Xlinker --allow-multiple-definition RELEASE_DEFS = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\"" NOASSERT_FLAGS = -DNDEBUG FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Perform the following steps to modify the aligner_sw.h and sse_util.h header files:
- Upload the sse2neon.h file to the third_party directory.
- Open aligner_sw.h.
vi aligner_sw.h
- Press i to go to the insert mode. Replace #include <emmintrin.h> with #include <sse2neon.h>.
Before the modification:
#include <emmintrin.h>
After the modification:
#include <sse2neon.h>
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Modify the sse_util.h file. For details, see 8.b to 8.d.
- Run the following command to compile and install HISAT2:
make
Parent topic: HISAT2 2.1.0 Porting Guide (CentOS 7.6)