saturne installation on Ubuntu
test
installation
Table of Contents
1 installation guide
- Install the following packages before running
install_saturne.py
- Zlib (optional)
- BLAS
- PyQt (optional, required for the GUI)
pip3 install pyqt5
; pyqt5 installation, use pip3 package- pyqt5 reference guide
- C, C++, and Fortran compilers
- on Ubuntu OS, type in:
sudo apt install gcc
sudo apt install gfortran
- on Ubuntu OS, type in:
- Python
- python 3.6.7 is default installed on Ubuntu
- MPI (optional)
- Create a directory named
saturne_build
runinstall_saturne.py
mkdir /home/kaiming/Documents/Code-saturne/saturne_build cd /home/kaiming/Documents/Code-saturne/code_saturne_5_build /home/kaiming/Documents/Code-saturne/code_saturne_5/install_saturne.py
- setup environment path– lauch the package
code_saturne
from a terminal
two methods:
- defining a permanent alias
- add the installation path of
code_saturne
, i.e.
/home/kaiming/Code_Saturne/5.0.9/code_saturne-5.0.9/arch/Linux_x86_64/bin
method 1: defining a permanent alias
a. define a alias named code_saturne
in a file, .bash_aliases
vi .bash_aliases
b. Then define a alias as below
cspath=/home/kaiming/Code_Saturne/5.0.9/code_saturne-5.0.9/arch/Linux_x86_64/bin alias code_saturne="$cspath/code_saturne"
c. To load .bash_aliases
, add the following commands in the ~/.bashrc
if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi
d. source ~/.bashrc
>> source ~/.bashrc
https://askubuntu.com/questions/1414/how-to-create-a-permanent-alias
method 2: add path environment variable http://www.linfo.org/path_env_var.html
- now, you can lauch
code_saturne
in any terminal >> codesaturne
to launch the GUI of code saturne
>> code_saturne gui
The documentation should then be available through the commands:
>> code_saturne info -g refcard #reference card >> code_saturne info -g user
- How to run a python script on Ubuntu
$ python3 /path/to/script.py https://askubuntu.com/questions/590410/how-do-i-run-python-code-as-a-script
- PyQt installation
- log
kaiming@127:~$ pip3 install pyqt5 Collecting pyqt5 Downloading https://files.pythonhosted.org/packages/d4/bf/d884da8e2f7096d201c891d515eb6813a8e85df5eb6f5e12e867bf1d831c/PyQt5-5.11.3-5.11.2-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl (117.8MB) 100% |████████████████████████████████| 117.8MB 22kB/s Collecting PyQt5sip<4.20,>=4.19.11 (from pyqt5) Exception: Traceback (most recent call last): File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 377, in _makerequest httplibresponse = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
solution: try it again
which returns:
Installing collected packages: PyQt5-sip, pyqt5
Successfully installed PyQt5-sip-4.19.13 pyqt5-5.11.3
- log