Compiling and Installing kmersGWAS
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following commands to add the sse2neon dependency:
cd /path/to/KMERSGWAS wget https://github.com/DLTcollab/sse2neon/archive/master.tar.gz --no-check-certificate -O sse2neon-master.tar.gz tar -zxf sse2neon-master.tar.gz export CPLUS_INCLUDE_PATH=/path/to/KMERSGWAS/sse2neon-master/:$CPLUS_INCLUDE_PATH export C_INCLUDE_PATH=/path/to/KMERSGWAS/sse2neon-master/:$C_INCLUDE_PATH
- Run the following commands to decompress the installation package:
cd /path/to/KMERSGWAS tar -zxf kmersGWAS-0.2-beta.tar.gz
- Run the following commands to copy the KMC package to kmersGWAS:
tar -zxf KMC-3.1.2rc1.tar.gz cp -rf KMC-3.1.2rc1/* kmersGWAS-0.2-beta/include/KMC/
- Run the following commands to copy the CTPL package to kmersGWAS:
tar -zxf CTPL-v.0.0.2.tar.gz cp -rf CTPL-v.0.0.2/* kmersGWAS-0.2-beta/include/CTPL/
- Run the following commands to copy the cxxopts package to kmersGWAS:
tar -zxf cxxopts-2.2.1.tar.gz cp -rf cxxopts-2.2.1/* kmersGWAS-0.2-beta/include/cxxopts/
- Run the following command to go to the kmersGWAS installation directory:
cd kmersGWAS-0.2-beta
- Run the following command to delete the -msse4.2 compilation option:
sed -i 's/-msse4.2//g' Makefile
- Run the following command to add compilation optimization parameters:
sed -i 's/-O3/-O3 -march=armv8.2-a -mtune=tsv110/g' Makefile
- Replace the nmmintrin.h reference file.
- Run the following commands to comment out nmmintrin.h and smmintrin.h:
sed -i 's/#include <nmmintrin.h>/\/\/#include <nmmintrin.h>/g;s/#include <smmintrin.h>/\/\/#include <smmintrin.h>/g' src/kmers_multiple_databases.cpp sed -i 's/#include <smmintrin.h>/\/\/#include <smmintrin.h>/g' src/snps_multiple_databases.cpp
- Run the following commands to import the header file sse2neon.h:
sed -i '/#include <nmmintrin.h>/ i\#include "sse2neon.h"' src/kmers_multiple_databases.cpp sed -i '/#include <smmintrin.h>/ i\#include "sse2neon.h"' src/snps_multiple_databases.cpp
- Run the following commands to comment out nmmintrin.h and smmintrin.h:
- Run the following command to perform the compilation and installation:
make -j
- Run the following commands to delete the original gemma_0_96 and create a new soft link:
cd /path/to/KMERSGWAS/kmersGWAS-0.2-beta/external_programs rm -rf gemma_0_96 ln -s /path/to/GEMMA/bin/gemma gemma_0_96
Parent topic: kmersGWAS 0.2 Porting Guide (CentOS 7.6)
