saturne installation on Ubuntu

 

test

installation

Table of Contents

1 installation guide

saturne_installation.html

  1. Install the following packages before running install_saturne.py
  • C, C++, and Fortran compilers
    • on Ubuntu OS, type in:
      • sudo apt install gcc
      • sudo apt install gfortran
  • Python
    • python 3.6.7 is default installed on Ubuntu
  • MPI (optional)
  • Create a directory named saturne_build run install_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"

alias.png c. To load .bash_aliases , add the following commands in the ~/.bashrc

if [ -f ~/.bash_aliases ]; then
     . ~/.bash_aliases
fi

bashrc.png 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

  1. 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
  1. How to run a python script on Ubuntu
  2. PyQt installation
    1. 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

Author: kaiming

Created: 2019-05-10 五 10:23

Emacs 25.2.2 (Org mode 8.2.10)

Validate

 

posted @ 2019-03-31 12:35  kaiming_ai  阅读(538)  评论(0编辑  收藏  举报