mirror of
https://github.com/LCPQ/quantum_package
synced 2025-04-23 00:40:32 +02:00
Update README
This commit is contained in:
parent
40b949f47a
commit
3a0f55d4d0
@ -1,38 +0,0 @@
|
|||||||
# Compile
|
|
||||||
|
|
||||||
We need to create the file which contains all the tree dependencies for the
|
|
||||||
binaries. It's not a Makefile, but a Ninja file (so don't type `make` is
|
|
||||||
hopeless, type `ninja` instead).
|
|
||||||
|
|
||||||
The script to create the dependency file (aka `build.ninja`) is
|
|
||||||
`qp_create_ninja.py`.
|
|
||||||
|
|
||||||
## What utilization of the code will you do?
|
|
||||||
|
|
||||||
* If you only want the binaries (for production workflow) use the flag
|
|
||||||
`--production` in when calling this script. It's quicker
|
|
||||||
* Else if you are a developer and you want to be able to compile specific
|
|
||||||
modules use: `--development`. It will create for you the `build.ninja` in each
|
|
||||||
module
|
|
||||||
|
|
||||||
## Compilation Flags
|
|
||||||
|
|
||||||
You need to specify all the flags useful for the compilation: like the
|
|
||||||
optimization flags, the Lapack libary, etc. ``$QP_ROOT/config`` contains
|
|
||||||
``ifort.cfg`` and ``gfortran.cfg`` containing the compiler flags that will be
|
|
||||||
used. You can edit these files to modify the compiling options.
|
|
||||||
|
|
||||||
## Example to create the Ninja file
|
|
||||||
|
|
||||||
`qp_create_ninja.py create --production $QP_ROOT/config/ifort.cfg`
|
|
||||||
|
|
||||||
## Compiling
|
|
||||||
|
|
||||||
Just type `ninja` if you are in `$QP_ROOT` (or `ninja -f $QP_ROOT/build.ninja`
|
|
||||||
elsewhere). The compilation will take approximately 3 min.
|
|
||||||
|
|
||||||
If you have set the `--developement` flag in a specific module you can go in
|
|
||||||
the corresponding module directory and run `ninja` to build only this module.
|
|
||||||
You can type `ninja all` in a module for compiling all the submodule
|
|
||||||
|
|
||||||
Finally, go in `$QP_ROOT/ocaml` and type `make`
|
|
85
INSTALL.md
85
INSTALL.md
@ -1,85 +0,0 @@
|
|||||||
# Installation
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
* curl
|
|
||||||
* m4
|
|
||||||
* GNU make
|
|
||||||
* Fortran compiler (ifort or gfortran are tested)
|
|
||||||
* Python >= 2.6
|
|
||||||
* Bash
|
|
||||||
* Patch (for opam)
|
|
||||||
|
|
||||||
## Optional
|
|
||||||
|
|
||||||
* graphviz
|
|
||||||
|
|
||||||
|
|
||||||
## Standard installation
|
|
||||||
|
|
||||||
1) `./setup_environment.sh`
|
|
||||||
|
|
||||||
This command will download and install all the requirements.
|
|
||||||
Installing OCaml and the Core library may take somme time
|
|
||||||
(up to 20min on an old machine).
|
|
||||||
|
|
||||||
2) `source quantum_package.rc`
|
|
||||||
|
|
||||||
This file contains all the environement variables neeeded by the quantum package
|
|
||||||
both to compile and run. This should also be done before running calculations.
|
|
||||||
|
|
||||||
3) `cp ./src/Makefile.config.gfortran ./src/Makefile.config`
|
|
||||||
|
|
||||||
Create the ``Makefile.config`` which contains all the flags needed by the compiler.
|
|
||||||
The is also an example for the Intel Compiler (`Makefile.config.ifort`).
|
|
||||||
Edit this file and tune the flags as you want.
|
|
||||||
|
|
||||||
4) `make build`
|
|
||||||
|
|
||||||
It will compile all the executables and tools.
|
|
||||||
|
|
||||||
5) `make binary`
|
|
||||||
|
|
||||||
Optional. It will build a `tar.gz` file containing everything needed to run the quantum package on a
|
|
||||||
machine where you can't compile.
|
|
||||||
|
|
||||||
|
|
||||||
## Installing behind a firewall
|
|
||||||
|
|
||||||
1) Download `tsocks`:
|
|
||||||
|
|
||||||
wget http://sourceforge.net/projects/tsocks/files/latest/download
|
|
||||||
mv download tsocks.tar.gz
|
|
||||||
|
|
||||||
2) Tranfer `tsocks.tar.gz` on the remote host
|
|
||||||
|
|
||||||
3) Configure `tsocks` with the proper directory for the `tsocks.conf` file:
|
|
||||||
|
|
||||||
tar -zxvf tsocks.tar.gz
|
|
||||||
cd tsocks-*
|
|
||||||
./configure --with-conf=${PWD}/tsocks.conf
|
|
||||||
|
|
||||||
4) Create the `tsocks.conf` file with the following content:
|
|
||||||
|
|
||||||
server = 127.0.0.1
|
|
||||||
server_port = 10000
|
|
||||||
|
|
||||||
5) Create the tsocks library:
|
|
||||||
|
|
||||||
make
|
|
||||||
|
|
||||||
6) Add the `libtsocks.so` to the `LD_PRELOAD` environment variable:
|
|
||||||
|
|
||||||
export LD_PRELOAD="${PWD}/libtsocks.so.1.8"
|
|
||||||
|
|
||||||
7) Create a custom curl command to set the tsocks option: open a file named
|
|
||||||
`curl`, which is accessible from your `PATH` environment variable before the
|
|
||||||
real `curl` command, and fill this file with:
|
|
||||||
|
|
||||||
#!/bin/bash
|
|
||||||
/usr/bin/curl --socks5 127.0.0.1:10000 $@
|
|
||||||
|
|
||||||
8) Start a tsocks ssh tunnel:
|
|
||||||
|
|
||||||
ssh -fN -D 10000 user@external-server.com
|
|
||||||
|
|
110
README.md
110
README.md
@ -1,10 +1,116 @@
|
|||||||
Quantum package
|
Quantum package
|
||||||
===============
|
===============
|
||||||
|
|
||||||
[](https://travis-ci.org/LCPQ/quantum_package)
|
[](https://travis-ci.org/LCPQ/quantum_package)
|
||||||
|
|
||||||
[](https://gitter.im/LCPQ/quantum_package?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/LCPQ/quantum_package?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
|
||||||
|
|
||||||
Set of quantum chemistry programs and libraries.
|
Set of quantum chemistry programs and libraries.
|
||||||
|
|
||||||
For more information, you can visit the [wiki of the project](http://github.com/LCPQ/quantum_package/wiki>), or the [Install](INSTALL.md) file.
|
For more information, you can visit the [wiki of the project](http://github.com/LCPQ/quantum_package/wiki>), or bellow for the installation instruction.
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
* Fortran compiler (ifort or gfortran are tested)
|
||||||
|
* Python >= 2.6
|
||||||
|
* GNU make
|
||||||
|
* Bash
|
||||||
|
|
||||||
|
## Standard installation
|
||||||
|
|
||||||
|
### 1) Configure
|
||||||
|
|
||||||
|
$ configure <config_file> (--production | --development)
|
||||||
|
|
||||||
|
This command have to purpose :
|
||||||
|
|
||||||
|
- Download and install all the requirements.
|
||||||
|
Installing OCaml and the Core library may take somme time (up to 20min on an old machine).
|
||||||
|
- And create the file which contains all the tree dependencies for the binaries.
|
||||||
|
It's not a Makefile, but a Ninja file (so don't type `make` is hopeless, type `ninja` instead)
|
||||||
|
|
||||||
|
####Compilation Flags (`<config_file>`)
|
||||||
|
|
||||||
|
`<config_file>` is the path to the file who contain all the flags useful for the compilation: like the optimization flags, the Lapack libary, etc. We have two default configure file in ``$QP_ROOT/config`` : ``ifort.cfg`` and ``gfortran.cfg``. You can edit these files to modify the compiling options.
|
||||||
|
|
||||||
|
#### What utilization of the code will you do?
|
||||||
|
|
||||||
|
* If you only want the binaries (for production workflow) use the flag
|
||||||
|
`--production` in when calling this script. It's quicker
|
||||||
|
* Else if you are a developer and you want to be able to compile specific modules use: `--development`. It will create for you the `build.ninja` in each module
|
||||||
|
|
||||||
|
### 2) Set environment variable
|
||||||
|
|
||||||
|
source quantum_package.rc
|
||||||
|
This file contains all the environment variables needed by the quantum package both to compile and run. This should also be done before running calculations.
|
||||||
|
|
||||||
|
### Optional) Add some new module
|
||||||
|
|
||||||
|
Usage: qp_install_module.py list (--installed|--avalaible-local|--avalaible-remote)
|
||||||
|
qp_install_module.py install <name>...
|
||||||
|
qp_install_module.py create -n <name> [<children_module>...]
|
||||||
|
qp_install_module.py download -n <name> [<path_folder>...]
|
||||||
|
|
||||||
|
For exemple you can type :
|
||||||
|
`qp_install_module.py install Full_CI`
|
||||||
|
|
||||||
|
### 3) Compiling the fortran
|
||||||
|
|
||||||
|
ninja
|
||||||
|
Just type `ninja` if you are in `$QP_ROOT` (or `ninja -f $QP_ROOT/build.ninja`
|
||||||
|
elsewhere). The compilation will take approximately 3 min.
|
||||||
|
|
||||||
|
If you have set the `--developement` flag in a specific module you can go in
|
||||||
|
the corresponding module directory and run `ninja` to build only this module.
|
||||||
|
You can type `ninja all` in a module for compiling all the submodule
|
||||||
|
|
||||||
|
|
||||||
|
### 4) Compiling the OCaml
|
||||||
|
|
||||||
|
cd ocaml ; make ; cd -
|
||||||
|
|
||||||
|
### 5) Testing if all is ok
|
||||||
|
|
||||||
|
cd testing_no_regression ; ./unit_test.py
|
||||||
|
|
||||||
|
## Installing behind a firewall !
|
||||||
|
|
||||||
|
1) Download `tsocks`:
|
||||||
|
|
||||||
|
wget http://sourceforge.net/projects/tsocks/files/latest/download
|
||||||
|
mv download tsocks.tar.gz
|
||||||
|
|
||||||
|
2) Tranfer `tsocks.tar.gz` on the remote host
|
||||||
|
|
||||||
|
3) Configure `tsocks` with the proper directory for the `tsocks.conf` file:
|
||||||
|
|
||||||
|
tar -zxvf tsocks.tar.gz
|
||||||
|
cd tsocks-*
|
||||||
|
./configure --with-conf=${PWD}/tsocks.conf
|
||||||
|
|
||||||
|
4) Create the `tsocks.conf` file with the following content:
|
||||||
|
|
||||||
|
server = 127.0.0.1
|
||||||
|
server_port = 10000
|
||||||
|
|
||||||
|
5) Create the tsocks library:
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
6) Add the `libtsocks.so` to the `LD_PRELOAD` environment variable:
|
||||||
|
|
||||||
|
export LD_PRELOAD="${PWD}/libtsocks.so.1.8"
|
||||||
|
|
||||||
|
7) Create a custom curl command to set the tsocks option: open a file named
|
||||||
|
`curl`, which is accessible from your `PATH` environment variable before the
|
||||||
|
real `curl` command, and fill this file with:
|
||||||
|
|
||||||
|
#!/bin/bash
|
||||||
|
/usr/bin/curl --socks5 127.0.0.1:10000 $@
|
||||||
|
|
||||||
|
8) Start a tsocks ssh tunnel:
|
||||||
|
|
||||||
|
ssh -fN -D 10000 user@external-server.com
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user