mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-03 20:54:00 +01:00
Updated Installation instructions (markdown)
parent
c49fb2dec7
commit
325d3cd21d
@ -17,7 +17,7 @@ https://opam.ocaml.org/doc/Install.html
|
||||
|
||||
####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 flags useful for the compilation : optimization flags, Lapack libary, etc. We have two default configuration files in ``$QP_ROOT/config`` : ``ifort.cfg`` and ``gfortran.cfg``. You copy these files to create a new config file adapted to your architecture.
|
||||
|
||||
Note that the ``popcnt`` instruction accelerates *a lot* the programs, so the
|
||||
SSE4.2, AVX or AVX2 instruction sets should be enabled if possible.
|
||||
@ -31,23 +31,24 @@ of the Intel Fortran compiler instead of the ``-x`` option, or the
|
||||
#### 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
|
||||
`--production` when calling this script. It builds faster.
|
||||
* Else if you are a developer and you want to be able to compile specific modules, `--development`. It will create for you the `build.ninja` file in each module.
|
||||
|
||||
### 2) Set environment variables
|
||||
|
||||
### 2) Set environment variable
|
||||
A configuration file named ``quantum_package.rc`` will be created.
|
||||
To finish the installation, source this file in your shell::
|
||||
To finish the installation and to start using the quantum package, source this file in your shell::
|
||||
|
||||
`source quantum_package.rc`
|
||||
|
||||
And you can also source it inside your ``.bashrc`` file.
|
||||
And you can also source it inside your ``.bashrc`` file, or create a system-wide module file.
|
||||
|
||||
If you use a C-shell, you will have to translate the ``.bashrc`` file into
|
||||
If you use a C-shell, you will have to translate the ``quantum_package.rc`` file into
|
||||
C-shell syntax and source it in your shell.
|
||||
|
||||
### Optional) Add some new module
|
||||
### Optional) Add some new modules
|
||||
|
||||
From speed consideration, the quantum package have no executable out of the box. You need to install (and then compile) some module, if you wan't the executable ; the `qp_module.py` will help you.
|
||||
The quantum package has no executable out of the box. You need to install (and then compile) some modules. The `qp_module.py` will help you.
|
||||
|
||||
```
|
||||
Usage: qp_module.py list (--installed|--avalaible-local|--avalaible-remote)
|
||||
@ -56,25 +57,27 @@ From speed consideration, the quantum package have no executable out of the box.
|
||||
qp_module.py download -n <name> [<path_folder>...]
|
||||
```
|
||||
|
||||
For exemple you can type : `qp_module.py install Full_CI`. This will install the `Full_CI` module. All the module installed a in the `$QP_ROOT/src/` if you wan't to check it.
|
||||
For exemple you can type : `qp_module.py install Full_CI`. This will install the `Full_CI` module. All the modules are installed in the `$QP_ROOT/src/`, and all the available modules are in `$QP_ROOT/plugins/`
|
||||
|
||||
### 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.
|
||||
|
||||
If you have set the `--developement` flag in a specific module you can go in
|
||||
the corresponding module `$QP_ROOT/src/module_name`- directory and run `ninja` to build only this module.
|
||||
You can type `ninja all` in a module for compiling all the submodule
|
||||
the corresponding module `$QP_ROOT/src/module_name` directory and run `ninja` to build only this module.
|
||||
You can type `ninja all` in a module to compile all the submodules.
|
||||
|
||||
### 4) Compiling the OCaml
|
||||
You need to compile the OCaml source code. OCaml as here to handle the hight level IO.
|
||||
|
||||
An important part of the quantum package is written in OCaml. You will also need to compile the OCaml source code.
|
||||
(In a near future, this step will be integrated in the main ninja file).
|
||||
```
|
||||
cd $QP_ROOT ; make -C ocaml/
|
||||
```
|
||||
|
||||
### 5) Testing if all is ok
|
||||
Some unit test are available in the `test` directory. For runing the test
|
||||
### 5) Testing if all is OK
|
||||
Some unit tests are available in the `test` directory. To run the tests:
|
||||
```
|
||||
cd $QP_ROOT/tests
|
||||
bats bats/qp.bats
|
||||
```
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user