Compiling GAML
GAML is "Genome Assembly by Maximum Likelihood".[1]
Download
Clone the repository:
git clone
https://github.com/usamec/GAML.git
This creates a directory "GAML
".
Prerequisites
From the README:
- recent GCC compiler - GCC 4.8.1 is available on Proteus
- Boost libraries >= 1.46 - Boost 1.41.0 is available by default on Proteus; later versions are also available
- Velvet - Velvet 1.2.10 is available on Proteus
- Bowtie - Bowtie 1.1.1, and 2.2.5 are available on Proteus
- BLASR - BLASR 1.3.1 is available on Proteus
See the file CMakeLists.txt
in the downloaded source code for specific
versions.
Since all these are available, load the appropriate modules before beginning compilation:
gcc/4.8.1 (this should have been already loaded by default)
boost/openmpi/gcc/64/1.57.0
velvet/1.2.10
bowtie2/2.2.5
blasr/1.3.1
Configuring
Optional Optimization Flags
This is optional. Modify optimization flags for the compiler. This may
or may not improve run times: only a test will tell. Edit the file
"CMakeLists.txt
":
### REMOVE THE FOLLOWING LINE, i.e. delete it or add a "#" in front
list( APPEND CMAKE_CXX_FLAGS "-std=c++0x -g -O2 ${CMAKE_CXX_FLAGS}")
### AND REPLACE WITH THIS
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -march=corei7-avx")
See Compiling with GCC for current hardware-specific optimization options.
Generate Makefiles
Cmake builds should never be made in the same directory as the source
code. So, create a subdirectory named "build
" in which to run the
compilation, and run cmake from there:
[juser@proteusi01`` ``GAML]$
mkdir build
[juser@proteusi01`` ``GAML]$
cd build
[juser@proteusi01`` ``build]$
export CC=`which gcc`
[juser@proteusi01`` ``build]$
export CXX=`which g++`
[juser@proteusi01`` ``build]$
echo $CC
/cm/shared/apps/gcc/4.8.1/bin/gcc
[juser@proteusi01`` ``build]$
echo $CXX
/cm/shared/apps/gcc/4.8.1/bin/g++
[juser@proteusi01`` ``build]$
cmake ..
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: /cm/shared/apps/gcc/4.8.1/bin/gcc
-- Check for working C compiler: /cm/shared/apps/gcc/4.8.1/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /cm/shared/apps/gcc/4.8.1/bin/g++
-- Check for working CXX compiler: /cm/shared/apps/gcc/4.8.1/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.57.0
-- Found the following Boost libraries:
-- serialization
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/HA/opt/src/GAML/build
Build
This will generate a lot of output, and save it to a file named "Make.out":
[juser@proteusi01`` ``build]$
make 2>&1 | tee Make.out
This creates the executable programs:
gaml
testret
Move these files to a convenient location in your PATH.
NB to run these programs, the modules loaded above have to be loaded before execution. You can also write your own modulefile to ensure the prerequisites are loaded, and to set up the path.
Starting Over
If you ever need to start over, delete the build
directory (do "rm
-rf build"), and create a new build directory.