10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-07-22 10:47:33 +02:00

README.md

This commit is contained in:
Anthony Scemama 2016-01-26 01:40:14 +01:00
parent fa2187fea0
commit e46ff1e2fd

View File

@ -9,10 +9,11 @@ Quantum package
Set of quantum chemistry programs and libraries. Set of quantum chemistry programs and libraries.
(under GNU GENERAL PUBLIC LICENSE v2) (under GNU GENERAL PUBLIC LICENSE v2)
For more information, you can visit the [wiki of the project](http://github.com/LCPQ/quantum_package/wiki>), or bellow for the installation instruction. For more information, you can visit the [wiki of the project](http://github.com/LCPQ/quantum_package/wiki>), or below for the installation instructions.
# Installation # Installation
## Requirements ## Requirements
* Fortran compiler (`ifort` and `gfortran` are tested) * Fortran compiler (`ifort` and `gfortran` are tested)
* Python >= 2.6 * Python >= 2.6
@ -30,29 +31,30 @@ For more information, you can visit the [wiki of the project](http://github.com/
For example you can type `./configure config/gfortran.cfg --production` For example you can type `./configure config/gfortran.cfg --production`
This command have to purpose : This command has two purposes :
- Download and install all the requirements. - Download and install all the requirements.
Installing OCaml and the Core library may take some time (up to 20min on an old machine). Installing OCaml and the Core library may take some time (up to 20min on an old machine).
- And create the file which contains all the tree dependencies for the binaries. - Create the file which contains all the dependencies for the binaries.
It's not a Makefile, but a Ninja file (so don't type `make` is hopeless, type `ninja` instead) It's not a Makefile, but a Ninja file (so don't type `make` is hopeless, type `ninja` instead)
####Compilation Flags (`<config_file>`) ####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. `<config_file>` is the path to the file which contains all the compilation flags (optimization flags, Lapack libary, etc). There are two example configure files in ``$QP_ROOT/config`` : ``ifort.cfg`` and ``gfortran.cfg``. You can copy these files to create a new file adapted to your architecture.
#### What utilization of the code will you do? #### What utilization of the code will you do?
* If you only want the binaries (for production workflow) use the flag * If you only want the binaries (for production workflow) use the flag
`--production` in when calling this script. It's quicker `--production`. It compiles faster.
* 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 * Else if you are a developer and you want to be able to compile specific modules use: `--development`. It will create the `build.ninja` in each module.
### 2) Set environment variable ### 2) Load environment variables
source quantum_package.rc 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. 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 ### Optional) Add some modules
Usage: qp_module.py list (--installed|--avalaible-local|--avalaible-remote) Usage: qp_module.py list (--installed|--avalaible-local|--avalaible-remote)
qp_module.py install <name>... qp_module.py install <name>...
@ -62,61 +64,22 @@ This file contains all the environment variables needed by the quantum package b
For exemple you can type : For exemple you can type :
`qp_module.py install Full_CI` `qp_module.py install Full_CI`
### 3) Compiling the fortran ### 3) Compiling the Fortran
Just type `ninja` if you are in `$QP_ROOT` (or `ninja -f $QP_ROOT/build.ninja` elsewhere). The compilation will take approximately 3 min. 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 If you have set the `--developement` flag you can go in any module directory and run `ninja` to build only this particular module. You can type `ninja all` in a module to compile all the submodules.
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 ### 4) Compiling the OCaml
cd ocaml ; make ; cd - make -C ocaml
### 5) Testing if all is ok ### 5) Testing if all is ok
cd testing_no_regression ; ./unit_test.py cd tests ; bats bats/qp.bats
## 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
# Note on EZFIO.cfg # Note on EZFIO.cfg
@ -126,24 +89,24 @@ You can type `ninja all` in a module for compiling all the submodule
Required: Required:
[<provider_name>] The name of the provider in irp.f90 and in the EZFIO lib [<provider_name>] The name of the provider in irp.f90 and in the EZFIO lib
doc:<str> The plain text documentation doc:<str> The plain text documentation
type:<str> A Fancy_type supported by the ocaml. type:<str> A type supported by the OCaml.
type `ei_handler.py get_supported_type` for a list type `ei_handler.py get_supported_type` for a list
interface:<str> The interface is list of string sepeared by "," who can containt : interface:<str> The interface is a list of strings sepeared by "," which can contain :
- ezfio (if you only whant the ezfiolib) - ezfio : to build the EZFIO API
- provider (if you want the provider) - provider : to build the corresponding providers
- ocaml (if you want the ocaml gestion) - ocaml : to build the corresponding bindings in OCaml
Optional: Optional:
default: <str> The default value needed, default: <str> The default value,
if 'ocaml' is in interface list. needed if 'ocaml' is in interface list.
! No list is allowed for now ! ! No list is allowed for now !
size: <str> The size information. size: <str> The size information.
(by default is one) (by default is one)
Example : 1, =sum(ao_num); (ao_num,3) Example : 1; =sum(ao_num); (ao_num,3)
ATTENTION : The module and the value are separed by a "." not a "_". WARNING : The module and the value are separed by a "." not a "_".
For exemple (determinants.n_det) For example (determinants.n_det)
ezfio_name: <str> The name for the EZFIO lib ezfio_name: <str> The name in the EZFIO API
(by default is <provider_name>) (by default is <provider_name>)
ezfio_dir: <str> Will be the folder of EZFIO. ezfio_dir: <str> Will be the directory of EZFIO.
(by default is <module_lower>) (by default is <module_lower>)
``` ```
@ -169,7 +132,7 @@ interface: ezfio
#### Why ? #### Why ?
You have two or more ezfio configuration file for the same variable. Check in `$QP_ROOT/install/config/` You have two or more ezfio configuration files for the same variable. Check files in `$QP_ROOT/install/EZFIO/config/`
#### Fix #### Fix