Skip to content

Latest commit

 

History

History

NoteForLinux

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Note for Linux

A note for a brand new Linux system.

Suggestion for the Linux system

1. Install Linux system (ref: wikiHow)

Download the system ISO image. Recommend Linux Mint (20.3) and Ubuntu 20.04.6 LTS (Focal Fossa). 2. Create a bootable USB drive (Disk >=4 GB). Recommend Rufus and Universal USB Installer.

  1. Restart the computer and install the new Linux system. Suggestions for the system installation:

    swap=16+GB
    /boot=2+GB
    /=100+GB
    /home=2TB+

2. Log in and Update and upgrade. Select the fastest software source, then use the following commands

sudo apt-get update
sudo apt-get upgrade

3. Check the video card

Usually, no problems.

4. Install small useful tools

sudo apt-get install vlc tmux python python3 python3-numpy vim git python3-matplotlib htop tree pip openmpi-bin libfl-dev 

Some of the tools have to be installed manually: VSCode, Chrome, Blender, Typora, Teamviewer

5. Install salome_meca. Recommend version 2020.0.1

NOTE Before the installation verify that when you lunch python in a terminal, it is Python2

  1. Download salome_meca from the website and unzip the package.

    tar -xvf salome_meca-2020.0.1-1-universal.tgz
  2. Install using the following command:

    sudo ./salome_meca-2020.0.1-1-universal.run

    Install in the directory: /opt/salome2020

Issue about openGL The FATAL ERROR message is ```OpenGl_Window::CreateWindow: glXCreateContext failed.``` This issue can be fixed by:
cd opt/salome2020/V2019.0.3_universal/prerequisites/debianForSalome/lib
sudo rm libstdc++.so.6.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6
Issue about libffi.so.6: The FATAL ERROR message is
........
File "/opt/salome2020/V2020.0.1_universal_universal/prerequisites/Python-365/lib/python3.6/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: libffi.so.6: cannot open shared object file: No such file or directory

This issue can be fixed by:

cd opt/salome2020/V2019.0.3_universal/prerequisites/debianForSalome/lib
sudo apt install libffi7
sudo rm libffi.so.6
ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 libffi.so.6              

6. Install Code_aster 14.6

  1. Download code aster stable version 14.6.0 from the Office website Unzip the package

    tar -xvf aster-full-src-14.6.0-1.noarch.tar.gz.tar.gz
  2. Install prerequisites

    sudo apt-get install gcc g++ gfortran cmake python3 python3-dev python3-numpy tk bison flex liblapack-dev libblas-dev libboost-python-dev libboost-numpy-dev zlib1g-dev xterm nedit ddd xemacs21 kwrite gedit gnome-terminal && pip install numpy setuptools matplotlib

    NOTE: If it raises some problem about "blas", please make sure the libopenblas-base libopenblas-dev is not instlled with libblas-dev at the same time.

  3. Install the main program, using the following command in the aster-full-src-14.6.0 folder

    sudo python3 setup.py install --prefix=/opt/aster146
  4. Get alias command add the following to the ~/.bashrc file, so that you can enter the Code_Aster environment and run simulations easily. Now, the installation for the series version is finished.

    alias aster='source /opt/aster146/etc/codeaster/profile.sh'
  5. NOTE: you can test your installation with the following command:

    /opt/aster146/bin/as_run --test sdnl142a

7. Install OpenFOAM 2012

  1. Download openfoam main program and third party from OpenFoam and ThirdParty.

  2. Fellow OpenFOAM® Quick Build Guide and build the source code. I prefer to install in /opt with sudo su.

  3. Move the ThirdParty-v2012.tgz and OpenFOAM-v2012.tgz to /opt/openfoam folder with root admin right.

  4. Unzip the package and source the environment under the /opt/openfoam/OpenFOAM-v2012 folder using:

    source etc/bashrc
  5. Test the system readiness (optional, not supported for cross-compilation)

    foamSystemCheck 
  6. Compile OpenFOAM

    ./Allwmake -j -s -q -l
  7. Post-compilation steps

    foamInstallationTest

For other version and more useful tips please find here

Useful tips

  1. Right click meum

    • For Linux Mint (only for Cinnamon edition )

      vi ~/.local/share/nemo/action/vscode.nemo_action

      Then add the following to the file:

      [Nemo Action]
      Name=Open in VS Code
      Comment=Open in VS Code
      Exec=code %F
      Icon-Name=com.visualstudio.code
      Selection=Any
      Extensions=dir;
  2. Bashrc file:

    alias of7='source /opt/openfoam7/etc/bashrc'
    alias of1906='source /opt/openfoam/OpenFOAM-v1906/etc/bashrc'
    alias of2012='source /opt/openfoam/OpenFOAM-v2012/etc/bashrc'
    alias of1812='source /opt/openfoam/OpenFOAM-v1812/etc/bashrc'
    alias of301='source /opt/OpenFOAM/OpenFOAM-3.0.1/etc/bashrc'
    alias of240='source /opt/OpenFOAM/OpenFOAM-2.4.0/etc/bashrc'
    alias ofe40='source /opt/foam/foam-extend-4.0/etc/bashrc'
    alias ofe41='source /opt/foam/foam-extend-4.1/etc/bashrc'
    alias of6='source /opt/openfoam6/etc/bashrc'
    
    alias aster='source /opt/aster146/etc/codeaster/profile.sh'
    alias salome2020='/opt/salome2020/appli_V2020.0.1_universal_universal/salome &'