You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/Compilation-Guide.md
+31-15Lines changed: 31 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
layout: userdoc
3
3
title: "Compilation Guide"
4
4
author: Dominik Schrempf, Jana Trifinopoulos, Meaningseeking, Minh Bui
5
-
date: 2020-07-22
5
+
date: 2021-04-19
6
6
docid: 20
7
7
icon: book
8
8
doctype: manual
@@ -44,9 +44,11 @@ General requirements
44
44
45
45
*[CMake](http://www.cmake.org) version >= 2.8.10.
46
46
47
-
*[Eigen3 library](https://eigen.tuxfamily.org)(for IQ-TREE version >= 1.6). By default IQ-TREE will detect the path to the installed Eigen3 library. If this failed, you have to manually specify `-DEIGEN3_INCLUDE_DIR=<installed_eigen3_dir>` to the `cmake` command (see below).
47
+
*[Boost library](https://www.boost.org) for IQ-TREE version 2. Boost library is typically available under Linux. Under MacOS you use [Homebrew](https://brew.sh) and run `brew install boost` to install the Boost library. By default IQ-TREE will detect the path to the installed Boost library.
48
48
49
-
* (_Optional_) If you want to compile the multicore version, make sure that the OpenMP library was installed. This should typically be the case with `gcc` under Linux.
49
+
*[Eigen3 library](https://eigen.tuxfamily.org) (for IQ-TREE version >= 1.6). Under MacOS you use [Homebrew](https://brew.sh) and run `brew install eigen` to install the Boost library. By default IQ-TREE will detect the path to the installed Eigen3 library. If this failed, you have to manually specify `-DEIGEN3_INCLUDE_DIR=<installed_eigen3_dir>` to the `cmake` command (see below).
50
+
51
+
* OpenMP library, which is used to compile the multicore version. This should typically be the case with `gcc` under Linux. Under MacOS you use [Homebrew](https://brew.sh) and run `brew install libomp` to install the OpenMP library.
50
52
51
53
* (_Optional_) Install [git](https://git-scm.com) if you want to clone source code from [IQ-TREE GitHub repository](https://github.com/Cibiv/IQ-TREE).
52
54
@@ -56,10 +58,18 @@ Downloading source code
56
58
57
59
Choose the source code (`zip` or `tar.gz`) of the IQ-TREE release you want to use from:
58
60
61
+
<https://github.com/iqtree/iqtree2/releases>
62
+
63
+
For IQ-TREE version 1 please use:
64
+
59
65
<https://github.com/Cibiv/IQ-TREE/releases/>
60
66
61
67
Alternatively, if you have `git` installed, you can also clone the source code from GitHub with:
62
68
69
+
git clone https://github.com/iqtree/iqtree2.git
70
+
71
+
For IQ-TREE version 1 please clone:
72
+
63
73
git clone https://github.com/Cibiv/IQ-TREE.git
64
74
65
75
Please find below separate compilation guide fors [Linux](#compiling-under-linux), [Mac OS X](#compiling-under-mac-os-x), and [Windows](#compiling-under-windows) as well as for [32-bit version](#compiling-32-bit-version) or for [MPI version](#compiling-mpi-version).
@@ -85,26 +95,18 @@ Compiling under Linux
85
95
86
96
cmake ..
87
97
88
-
To build the multicore version please add `-DIQTREE_FLAGS=omp` to the cmake command:
89
-
90
-
cmake -DIQTREE_FLAGS=omp ..
91
-
92
98
If `cmake` failed with message about `Eigen3 not found`, then install Eigen3 library and run `cmake` again. If this still failed, you have to manually specify the downloaded directory of Eigen3 with:
93
99
94
100
cmake -DEIGEN3_INCLUDE_DIR=<eigen3_dir> ..
95
101
96
102
97
103
5. Compile source code with `make`:
98
104
99
-
make
100
-
101
-
You can speed up the compilation by specifying the number of CPU cores to use with `make` by e.g.:
102
-
103
-
make -j4
104
-
105
-
to use 4 cores instead of the default 1 core.
105
+
make -j
106
+
107
+
`j` option tells it to use all CPU cores to speed up the compilation. Without this option, `make` uses only one core, which might be slow.
106
108
107
-
This creates an executable `iqtree` (`iqtree-omp` for older multicore versions <= 1.5.X). It can be copied to your system search path so that IQ-TREE can be called from the Terminal simply with the command line `iqtree`.
109
+
This creates an executable `iqtree2` (`iqtree` for version 1). It can be copied to your system search path so that IQ-TREE can be called from the Terminal simply with the command line `iqtree2`.
108
110
109
111
>**TIP**: The above guide typically compiles IQ-TREE with `gcc`. If you have Clang installed and want to compile with Clang, the compilation will be similar to Mac OS X like below.
110
112
{: .tip}
@@ -118,6 +120,8 @@ Compiling under Mac OS X
118
120
119
121
* Make sure that Clang compiler is installed, which is typically the case if you installed Xcode and the associated command line tools.
120
122
123
+
* If you installed cmake with Homebrew
124
+
121
125
* Find the path to the CMake executable, which is typically `/Applications/CMake.app/Contents/bin/cmake`. For later convenience, please create a symbolic link `cmake` to this cmake executable, so that cmake can be invoked from the Terminal by simply entering `cmake`.
122
126
123
127
The steps to compile IQ-TREE are similar to Linux (see above), except that you need to specify `clang` as compiler when configuring source code with CMake (step 4):
@@ -280,3 +284,15 @@ Windows binaries were statically compiled under Windows 7 using Clang 3.9.0 in c
0 commit comments