Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CMake flags for PyBind11 linking. #527

Merged
merged 3 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Installation

## Prerequisites
## Clone the repo

Clone the develop branch, which contains the latest developments

```bash
git clone https://github.com/GQCG/GQCP.git --branch develop --single-branch --recurse-submodules
cd GQCP
```

## Install the GQCG development environment

Before installing GQCP, please make sure the following dependencies are available on your system:

Expand All @@ -24,26 +33,36 @@ If you use your own installation of libint, please set the `LIBINT_DATA_PATH` en

## CMake out-of-source build

For a default CMake build, the steps are the following:
Perform an out-of-source build:

1. clone the develop branch, which contains the latest release
```bash
mkdir build && cd build
cmake .. (CMake options)
make && make test && sudo make install
```

```bash
git clone https://github.com/GQCG/GQCP.git --branch develop --single-branch --recurse-submodules
cd GQCP
```
The possible CMake options are listed below. As such, for the provided GQCG environment this reduces to

2. perform an out-of-source build:
```bash
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH=${conda_install_dir}/envs/gqcg_dev \
-DCMAKE_INSTALL_PREFIX=~/.local \
-DBUILD_TESTS=TRUE \
-DBUILD_PYTHON_BINDINGS=TRUE \
-DPYTHON_EXECUTABLE=${conda_install_dir}/envs/gqcg_dev/bin/python \
-DPYTHON_LIBRARY=${conda_install_dir}/envs/gqcg_dev/lib/libpython3.8.a
make -j{CPU} && make test && (sudo) make install
```

where `${conda_install_dir}` is the directory where you have installed conda. This directory can be found using

```bash
mkdir build && cd build
cmake .. (CMake options)
make && make test && sudo make install
```
```bash
which conda
```

The possible CMake options are listed below.
which should return `${conda_install_dir}/bin/conda`.

## CMake options
### CMake options

In general, please set and pass the following options to the `cmake ..` command:

Expand Down Expand Up @@ -76,3 +95,5 @@ For this library, there are several extra options and configuration arguments yo
* `-DBUILD_PYTHON_BINDINGS=TRUE` makes sure that selected pieces of the GQCP library can be called from Python. This uses [PyBind11](https://github.com/pybind/pybind11), so make sure you have this installed if you wish to use GQCPY on your system.

* `-DPYTHON_EXECUTABLE=python_executable` with `python_executable` the path to your preferred Python executable.

* `-DPYTHON_LIBRARY=python_library` with `python_library` the path to the libraries that support your preferred Python executable.
63 changes: 61 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,42 @@ channels:
- conda-forge
- defaults
dependencies:
- appnope=0.1.0=py38_1000
- attrs=19.3.0=py_0
- backcall=0.1.0=py_0
- benchmark=1.5.0=h4a8c4bd_3
- blas=2.14=openblas
- bleach=3.1.0=py_0
- boost-cpp=1.69.0=hd59e818_1001
- bzip2=1.0.8=h0b31af3_2
- ca-certificates=2020.1.1=0
- ca-certificates=2019.11.28=hecc5488_0
- certifi=2019.11.28=py38_0
- cint=3.0.17=h4fadc1d_0
- cmake=3.13.4=h1e01633_0
- curl=7.68.0=h8754def_0
- dbus=1.13.12=h90a0687_0
- decorator=4.4.1=py_0
- defusedxml=0.6.0=py_0
- eigen=3.3.7=ha1b3eb9_1001
- entrypoints=0.3=py38_1000
- expat=2.2.9=h4a8c4bd_2
- gettext=0.19.8.1=h46ab8bc_1002
- glib=2.58.3=py38h577aef8_1002
- icu=58.2=h0a44026_1000
- importlib_metadata=1.5.0=py38_0
- intel-openmp=2019.5=intel_281
- ipykernel=5.1.4=py38h5ca1d4c_0
- ipython=7.12.0=py38h5ca1d4c_0
- ipython_genutils=0.2.0=py_1
- ipywidgets=7.5.1=py_0
- jedi=0.16.0=py38_0
- jinja2=2.11.1=py_0
- jpeg=9c=h1de35cc_1001
- jsonschema=3.2.0=py38_0
- jupyter=1.0.0=py_2
- jupyter_client=5.3.4=py38_1
- jupyter_console=6.0.0=py_0
- jupyter_core=4.6.3=py38_0
- krb5=1.16.4=h1752a42_0
- libblas=3.8.0=14_openblas
- libcblas=3.8.0=14_openblas
Expand All @@ -26,31 +49,67 @@ dependencies:
- libedit=3.1.20170329=hcfe32e1_1001
- libffi=3.2.1=h6de7cb9_1006
- libgfortran=4.0.0=2
- libiconv=1.15=h01d97ff_1005
- libint=2.3.1=0
- liblapack=3.8.0=14_openblas
- liblapacke=3.8.0=14_openblas
- libopenblas=0.3.7=h3d69b6c_7
- libpng=1.6.37=h2573ce8_0
- libsodium=1.0.17=h01d97ff_0
- libssh2=1.8.2=hcdc9a53_2
- libuv=1.34.0=h0b31af3_0
- llvm-openmp=9.0.1=h28b9765_2
- markupsafe=1.1.1=py38h0b31af3_0
- mistune=0.8.4=py38h0b31af3_1000
- mkl=2019.0=118
- mkl-include=2019.5=intel_281
- mkl-static=2019.5=intel_281
- nbconvert=5.6.1=py38_0
- nbformat=5.0.4=py_0
- ncurses=6.1=h0a44026_1002
- notebook=6.0.3=py38_0
- numpy=1.18.1=py38hde6bac1_0
- openssl=1.1.1d=0
- openssl=1.1.1d=h0b31af3_0
- pandoc=2.9.2=0
- pandocfilters=1.4.2=py_1
- parso=0.6.1=py_0
- pcre=8.44=h4a8c4bd_0
- pexpect=4.8.0=py38_0
- pickleshare=0.7.5=py38_1000
- pip=20.0.2=py_2
- prometheus_client=0.7.1=py_0
- prompt_toolkit=2.0.10=py_0
- ptyprocess=0.6.0=py_1001
- pybind11=2.4.3=py38ha1b3eb9_1
- pygments=2.5.2=py_0
- pyqt=5.9.2=py38h655552a_2
- pyrsistent=0.15.7=py38h0b31af3_0
- python=3.8.1=hf2284b6_2
- python-dateutil=2.8.1=py_0
- pyzmq=18.1.1=py38h4bf09a9_0
- qt=5.9.7=h93ee506_2
- qtconsole=4.6.0=py_0
- readline=8.0=hcfe32e1_0
- rhash=1.3.6=h1de35cc_1001
- send2trash=1.5.0=py_0
- setuptools=45.2.0=py38_0
- sip=4.19.8=py38h0a44026_0
- six=1.14.0=py38_0
- spectra=0.8.1=h80324dd_0
- sqlite=3.30.1=h93121df_0
- tbb=2019.6=intel_233
- terminado=0.8.3=py38_0
- testpath=0.4.4=py_0
- tk=8.6.10=hbbe82c9_0
- tornado=6.0.3=py38h0b31af3_4
- traitlets=4.3.3=py38_0
- wcwidth=0.1.8=py_0
- webencodings=0.5.1=py_1
- wheel=0.34.2=py_1
- widgetsnbextension=3.5.1=py38_0
- xz=5.2.4=h1de35cc_1001
- zeromq=4.3.2=h6de7cb9_2
- zipp=2.2.0=py_0
- zlib=1.2.11=h0b31af3_1006
prefix: /anaconda3/envs/gqcg_dev