Skip to content

Commit f36021d

Browse files
Still needs more changes to show how to do things with Meson
1 parent 78a88f2 commit f36021d

1 file changed

Lines changed: 27 additions & 14 deletions

File tree

UserGuide/install.rst

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ For python, we strongly recommend using the anaconda distribution, that already
6868

6969
The numpy, scipy and matplotlib are python packages. These are usually provided with a new installation
7070
of python distributions like anaconda. Lapack and Blas are needed for compiling the FORTRAN code (together with a FORTRAN compiler like gfortran).
71-
In many Linux distributions like ubuntu they can be installed as
71+
In many Linux distributions like ubuntu they can be installed as
7272

7373
.. code-block:: console
7474
7575
sudo apt-get install libblas-dev liblapack-dev liblapacke-dev gfortran
7676
7777
7878
79-
Note that this specific command may change in time.
79+
Note that this specific command may change in time.
8080

8181

8282
Together with these mandatory requirements (otherwise, the code will not compile correctly or raise an exception at the startup), we
@@ -90,7 +90,7 @@ If these packages are available, they will enable the automatic cluster/local ca
9090
To install all the python dependencies (and recommended) automatically, you may just run:
9191

9292
.. code-block:: console
93-
93+
9494
pip install -r requirements.txt
9595
9696
@@ -102,8 +102,8 @@ Installation from pip
102102
The easiest way to install python-sscha (and CellConstructor) is through the python package manager:
103103

104104
.. code-block:: console
105-
106-
pip install python-sscha
105+
106+
pip install python-sscha
107107
108108
109109
@@ -116,25 +116,40 @@ Installation from source
116116
------------------------
117117

118118
Once all the dependences of the codes are satisfied, you can unzip the source code downloaded from the website.
119-
Then run, inside the directory that contains the setup.py script, the following command:
119+
Then run, inside the directory that contains the meson.build script, the following command:
120120

121121
.. code-block:: console
122122
123-
python setup.py install
123+
pip install .
124124
125125
126126
As for the pip installation, you may append the --user option to install the package only for the user (without requiring administrator powers).
127127

128+
An "editable" install is highly recommended for developers. It allows you to modify the source code and have the changes reflected immediately without needing to reinstall.
129+
.. code-block:: console
130+
131+
pip install -e .
132+
128133
129134
Install with Intel FORTRAN compiler
130135
-----------------------------------
131136

132-
The setup.py script works automatically with the GNU FORTRAN compiler. However, due to some differences in linking lapack,
133-
to use the intel compiler you need to edit a bit the setup.py script:
137+
Meson works automatically with the GNU FORTRAN compiler. However, due to some differences in linking lapack,
138+
to use the intel compiler you need to:
139+
140+
Ensure MKL is installed in your Conda environment:
141+
.. code-block:: console
134142
135-
In this case, you need to delete the lapack linking from the
136-
setup.py and include the -mkl as linker option.
137-
Note that you must force to use the same liker compiler as the one used for the compilation.
143+
conda install mkl mkl-devel
144+
145+
You can pass Meson options through pip's \--config-settings flag.
146+
.. code-block:: console
147+
148+
pip install . --config-settings=--setup-args=-Duse_mkl=true
149+
150+
Or for an editable install:
151+
.. code-block::
152+
pip install -e . --config-settings=--setup-args=-Duse_mkl=true
138153
139154
Install with a specific compiler path
140155
-------------------------------------
@@ -154,5 +169,3 @@ If we want to use a custom compiler in /path/to/fcompiler we may run the setup a
154169
155170
156171
A specific setup.py script is provided to install it easily in FOSS clusters.
157-
158-

0 commit comments

Comments
 (0)