1.2. Installation History

1.2.1. Remove message

touch ~/.sudo_as_admin_successful

1.2.7. How to create extension .foam with paraFoam -touch?

$ nano OpenFOAM/OpenFOAM-2.4.0/bin/paraFoam

# reader extension
extension=foam

1.2.8. Kate

sudo apt-get update
sudo apt-get install kate

Show line numbers:

Settings -> configure kate -> appearance -> borders

1.2.9. Dropbox

Ubuntu Software Centre then Daemon

sudo apt-get update  //update package list - need to log out and log in to restart Nautilius

1.2.10. Texmaker

sudo apt-get update
sudo apt-get install texlive-full
sudo apt-get install texmaker
http://www.artfiles.org/openoffice.org/contrib/dictionaries/en_GB.zip
Unzip the archive
cd /usr/share/hunspell
sudo cp -rv /home/apr207/Downloads/en_GB.dic .
sudo cp -rv /home/apr207/Downloads/en_GB.aff .

1.2.11. SSH

sudo apt-get install openssh-server
from laptop: ssh -XC user@IP address

Start ssh: sudo service ssh start
Stop ssh: service ssh stop

1.2.12. Gimp

Ubuntu Software Centre

(Evince gave an error)

1.2.13. Pointwise

Downloaded pw-V18.0R2-linux_x86_64-jre.sh
sh pw-V18.0R2-linux_x86_64-jre.sh
Next
Accept
/home/apr207/Pointwise/PointwiseV18.0R2 is installation directory
Run Pointwise
(Won't find license)
Specify license server
server: emps-pointwise
port: 2385

Added this to .bashrc:
# Pointwise
alias pointwise="/home/apr207/Pointwise/PointwiseV18.0R2/pointwise"

1.2.14. Tree

sudo apt-get install tree

1.2.15. LIGGGHTS

## [optional] 1. Install Voro++ 0.4.x by compiling
sudo apt install g++
cd ~
wget http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz
tar -zxvf voro++-0.4*.tar.gz
cd $HOME/voro++-0.4.*
make all
sudo make install
which voro++
# /usr/local/bin/voro++ <- comes up
#
## 2 Install Liggghts 3.x by compiling
## 2.1 Install Packages
sudo apt install git libvtk5-dev libeigen2-dev openmpi-bin openmpi-doc libopenmpi-dev
which mpirun
#/usr/bin/mpirun comes up
which mpic++
#/usr/bin/mpic++ comes up
## 2.2 Get Liggghts via Git
cd ~
git clone https://github.com/CFDEMproject/LIGGGHTS-PUBLIC $HOME/LIGGGHTS-PUBLIC3.6.0
## 2.3 Compiling Liggghts with VORONOI and jpg, png support
cd $HOME/LIGGGHTS-PUBLIC3.6.0/src
# [optional] if you want to use voro++ in LIGGGHTS:
make yes-voronoi
# [optional] if you need extra packages install with sudo make yes-packagename
gedit /$HOME/LIGGGHTS-PUBLIC3.6.0/src/MAKE/Makefile.ubuntuVTK
add "-DLAMMPS_JPEG -DLAMMPS_PNG" in line 32
add "-I/usr/include" in line 63
add "-ljpeg -lpng" in line 65
change line 73 to "VTK_INC = -I/usr/include/vtk-5.10"
change line 74 to "VTK_LIB = -lvtkCommon -lvtkFiltering -lvtkIO -lvtkParallel -lvtkGraphics"
# save and close gedit
# [optional] changes on the source code
make clean-all
make ubuntuVTK
# create system wide shortcut liggghts360 for compiled binary (I used to have different versions parallel)
sudo ln -s /$HOME/LIGGGHTS-PUBLIC3.6.0/src/lmp_ubuntuVTK /usr/bin/liggghts360
liggghts360

# Liggghts comes up, telling version, compiling date etc., press Ctr+d to quit
#
## [optional] 3. Install LPP for post processing (converts LIGGGHTS Dumps to vtk-files) - doesn't work?
cd ~
sudo apt-get install python-numpy
#already newest version
sudo git clone https://github.com/CFDEMproject/LPP.git $HOME/LPP
./install
gedit ~/.bashrc
#add:
alias lpp="python $HOME/LPP/src/lpp.py"
#sudo chown -R andrew:andrew LPP
#open new Terminal: lpp
#
## [optional] 4. Install Syntax Highlighting for xed (gedit)
cd ~
wget https://www.dropbox.com/s/78elqj4i2dn52wt/liggghts3.lang
sudo mv liggghts3.lang /usr/share/gtksourceview-3.0/language-specs
#
## [optional] 5. Install ParaView 5.0.1
sudo apt-get install paraview
# already newest version
## [optional] 6. Install GNUplot 5.0.3
sudo apt-get install gnuplot-x11
gnuplot
plot sin(x)
# window with sin graph comes up, press Ctr+d to quit.
#
## [optional] 7. Install Povray 3.7.1
# Alternative: http://www.conoce3000.com/html/espaniol/Apuntes/2014-06-20-CompilarInstalarPOV-Ray37LinuxMintCinnamon64bitsCompilarInstalarPOV-Ray37LinuxMintCinnamon64bits.php?Arch=20
cd ~
sudo apt-get install autoconf automake libboost-all-dev libboost-dev libopenexr-dev libsdl-dev zlib1g-dev libpng-dev libjpeg-dev libtiff-dev
git clone https://github.com/POV-Ray/povray.git $HOME/POV-Ray3.7
cd $HOME/POV-Ray3.7/unix
./prebuild.sh
cd ..
./configure COMPILED_BY="andrew"
make check
# windows with cup and cookies comes up, click picture
sudo make install
# done!

# Test LIGGHTS

Copy all tutorials to LIGGGHTS_User folder

cd $HOME/LIGGGHTS_User/chute_wear

liggghts360 < in.chute_wear

cd post

lpp dump*.chute

1.2.16. VIM

sudo apt-get install vim

1.2.17. INKSCAPE

sudo apt-get install inkscape

1.2.18. LAMMPS

sudo add-apt-repository ppa:gladky-anton/lammps
sudo apt-get update

sudo apt-get install lammps-daily

lammps-daily < in.lj

sudo apt-get update

sudo apt-get install lammps-daily-doc

1.2.19. CFMesh

Downloaded CFMesh:

https://sourceforge.net/projects/cfmesh/

Copied cfMesh-v1.1.2 to /home

Set environment to $ two (OpenFOAM version 2.4 - as this is installed on Rodrigo and is possible on Callisto - no instruction for 2.3.1)

$ ./Allwmake

Copy the tutorial files:

$ cp -rf tutorials $FOAM_RUN


$ file file.stl

file.stl: ASCII text

1.2.20. Mesh Lab

Ubuntu Software Centre

1.2.21. FreeCAD

Ubuntu Software Centre

1.2.22. Pizza.py

Downloaded Pizza.py from

https://sourceforge.net/projects/pizza-py/?source=typ_redirect

Extracted the file
Copied to /home

Added this to .bashrc

#Pizza.py
alias pizza="python -i $HOME/pizza/src/pizza.py"

1.2.23. Installed Redshift

Ubuntu Software Centre

1.2.24. Install Heekes CAD

Add heekscnc-devel PPA to your repositories list:

### sudo add-apt-repository ppa:neomilium/heekscnc-devel ### maybe not the development version

sudo add-apt-repository ppa:neomilium/cam

Update your packages list:

sudo apt-get update

1.2.25. Install HeeksCNC

sudo apt-get install heekscnc

1.2.26. Install Mendeley

Ubuntu Software Centre 64 bit version of Mendeley: https://www.mendeley.com/download-mendeley-desktop/ubuntu/instructions/ Install automatically

1.2.27. Install Pinta

Ubuntu Software Centre

1.2.28. Install Curl

sudo apt install curl

1.2.29. Check for Updates

To check for updates: Start > Software Updater

1.2.30. Check packages have been updated

/usr/lib/update-notifier/apt-check -p

1.2.31. Install Scipy stack

$ sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose

1.2.32. Remove gedit

Ubuntu Software Centre

1.2.33. Terminator

Ubuntu Software Centre

1.2.34. Sublime

sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg

sudo dnf config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo

sudo dnf install sublime-text

Edit sublime_text.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Sublime Text
Icon=sublime_text.png
Path=/
Exec=/opt/sublime_text/sublime_text %f
StartupNotify=false
StartupWMClass=Sublime_text
OnlyShowIn=Unity;
X-UnityGenerated=true

1.2.35. OpenFOAM 2.1.x

FROM: http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.1.x/Ubuntu

Up to step 7.

FROM: https://www.cfd-online.com/Forums/openfoam-installation/168746-problems-installing-openfoam-2-4-0-ubuntu-16-04-a.html


#Go into OpenFOAM's main source folder
cd $WM_PROJECT_DIR

#Change how the flex version is checked
find src applications -name "*.L" -type f | xargs sed -i -e 's=\(YY\_FLEX\_SUBMINOR\_VERSION\)=YY_FLEX_MINOR_VERSION < 6 \&\& \1='

#Still better be certain that the correct Qt version is being used
export QT_SELECT=qt4

#Back to step 8

cd $WM_PROJECT_DIR

# This next command will take a while... somewhere between 30 minutes to 3-6 hours.
./Allwmake > make.log 2>&1

#Run it a second time for getting a summary of the installation
./Allwmake > make.log 2>&1

1.2.36. OpenFOAM 2.1.0

Till step 4:

http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.1.x/Ubuntu#Ubuntu_14.04

sudo -s

apt-get update

apt-get install build-essential cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev \
libncurses-dev libxt-dev libopenmpi-dev openmpi-bin git-core gcc-4.7 g++-4.7

apt-get install libscotch-dev

exit

https://openfoam.org/download/2-1-0-source/

download OpenFOAM-2.1.0 and ThirdParty-2.1.0

cd ThirdParty-2.1.0
mkdir download
wget -P download http://www.paraview.org/files/v3.12/ParaView-3.12.0.tar.gz
wget -P download https://gforge.inria.fr/frs/download.php/28043/scotch_5.1.11.tar.gz
tar -xzf download/ParaView-3.12.0.tar.gz
tar -xzf download/scotch_5.1.11.tar.gz
cd ..

Now step 6:

uname -m
sed -i -e 's/gcc/\$(WM_CC)/' OpenFOAM-2.1.0/wmake/rules/linux64Gcc/c
sed -i -e 's/g++/\$(WM_CXX)/' OpenFOAM-2.1.0/wmake/rules/linux64Gcc/c++
source $HOME/OpenFOAM/OpenFOAM-2.1.0/etc/bashrc WM_NCOMPPROCS=8 WM_MPLIB=SYSTEMOPENMPI
export WM_CC='gcc-4.7'
export WM_CXX='g++-4.7'

FULL_SETTINGS="$FOAM_SETTINGS; export WM_CC=gcc-4.7; export WM_CXX=g++-4.7"
echo "alias of210='source \$HOME/OpenFOAM/OpenFOAM-2.1.0/etc/bashrc $FULL_SETTINGS'" >> $HOME/.bashrc
unset FULL_SETTINGS

cd OpenFOAM-2.1.0
./Allwmake > log.make 2>&1
./Allwmake > log.make 2>&1

FROM: http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.1.x/Ubuntu

Up to step 7.

FROM: https://www.cfd-online.com/Forums/openfoam-installation/168746-problems-installing-openfoam-2-4-0-ubuntu-16-04-a.html

#Go into OpenFOAM's main source folder
cd $WM_PROJECT_DIR

#Change how the flex version is checked
find src applications -name "*.L" -type f | xargs sed -i -e 's=\(YY\_FLEX\_SUBMINOR\_VERSION\)=YY_FLEX_MINOR_VERSION < 6 \&\& \1='

#Still better be certain that the correct Qt version is being used
export QT_SELECT=qt4

#Back to step 8

cd $WM_PROJECT_DIR

# This next command will take a while... somewhere between 30 minutes to 3-6 hours.
./Allwmake > make.log 2>&1

#Run it a second time for getting a summary of the installation
./Allwmake > make.log 2>&1

1.2.37. Generate OpenFOAM 2.2.2 doxygen

sudo apt-get install doxygen graphviz

./Allmake

1.2.38. OpenFOAM 2.3.0

# The following lines shouldn't do anything:

sudo -s

apt-get update

apt-get install build-essential cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev libqtwebkit-dev gnuplot \
libreadline-dev libncurses5-dev libxt-dev libopenmpi-dev openmpi-bin libboost-system-dev libboost-thread-dev libgmp-dev \
libmpfr-dev python python-dev

apt-get install libglu1-mesa-dev libqt4-opengl-dev

exit

# download OpenFOAM-2.3.0 and ThirdParty-2.3.0:

cd ~

cd OpenFOAM

wget "http://downloads.sourceforge.net/foam/OpenFOAM-2.3.0.tgz?use_mirror=mesh" -O OpenFOAM-2.3.0.tgz

wget "http://downloads.sourceforge.net/foam/ThirdParty-2.3.0.tgz?use_mirror=mesh" -O ThirdParty-2.3.0.tgz

tar -xzf OpenFOAM-2.3.0.tgz
tar -xzf ThirdParty-2.3.0.tgz

# Symbolic links:

ln -s /usr/bin/mpicc.openmpi OpenFOAM-2.3.0/bin/mpicc
ln -s /usr/bin/mpirun.openmpi OpenFOAM-2.3.0/bin/mpirun

uname -m

source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc WM_NCOMPPROCS=8 WM_MPLIB=SYSTEMOPENMPI

echo "alias of230='source \$HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc $FOAM_SETTINGS'" >> $HOME/.bashrc

# Open new terminal:

of230

# Paraview

cd $WM_THIRD_PARTY_DIR

#make very certain that the correct Qt version is being used, by running this command:
export QT_SELECT=qt4

# This next command will take a while... somewhere between 5 minutes to 30 minutes.
./Allwmake > log.make 2>&1

#update the shell environment
wmSET $FOAM_SETTINGS

#Go into OpenFOAM's main source folder
cd $WM_PROJECT_DIR

#Change how the flex version is checked
find src applications -name "*.L" -type f | xargs sed -i -e 's=\(YY\_FLEX\_SUBMINOR\_VERSION\)=YY_FLEX_MINOR_VERSION < 6 \&\& \1='

#Still better be certain that the correct Qt version is being used
export QT_SELECT=qt4

#Go into OpenFOAM's main source folder
cd $WM_PROJECT_DIR

#Still better be certain that the correct Qt version is being used
export QT_SELECT=qt4

# This next command will take a while... somewhere between 30 minutes to 3-6 hours.
./Allwmake > log.make 2>&1

#Run it a second time for getting a summary of the installation
./Allwmake > log.make 2>&1

icoFoam -help

1.2.39. OpenFOAM 2.2.x

http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-3.0.1/Ubuntu#Ubuntu_16.04

sudo -s

apt-get update

apt-get install build-essential flex bison zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev \
libncurses-dev libxt-dev libopenmpi-dev openmpi-bin

exit

cd OpenFOAM

download from github OpenFOAM-2.2.x-master and ThirdParty-2.2.x-master

unzip using archive manager

remove master from the folder names

uname -m

source $HOME/OpenFOAM/OpenFOAM-2.2.x/etc/bashrc WM_NCOMPPROCS=2 WM_MPLIB=SYSTEMOPENMPI

echo "alias of22x='source \$HOME/OpenFOAM/OpenFOAM-2.2.x/etc/bashrc $FOAM_SETTINGS'" >> $HOME/.bashrc

sed -i -e 's=-lz -lm -lrt=-Xlinker --no-as-needed -lz -lm -lrt=' \
  ThirdParty-2.2.x/etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-*

#Go into OpenFOAM's main source folder
cd $WM_PROJECT_DIR

#Change how the flex version is checked
find src applications -name "*.L" -type f | xargs sed -i -e 's=\(YY\_FLEX\_SUBMINOR\_VERSION\)=YY_FLEX_MINOR_VERSION < 6 \&\& \1='

#Still better be certain that the correct Qt version is being used
export QT_SELECT=qt4

./Allwmake > log.make 2>&1

./Allwmake > log.make 2>&1

1.2.40. To create a desktop shortcut for Doxygen

Ubuntu software centre: install gnome panel

$ gnome-desktop-item-edit --create-new ~/Desktop

1.2.43. DOS2UNIX

sudo apt install dos2unix

1.2.44. Mencoder

Ubuntu Software Centre

1.2.45. Engauge Digitiser

Ubuntu Software Centre

1.2.47. Sphinx

sudo apt-get install python-sphinx

1.2.48. Filezilla

Ubuntu Software Centre

1.2.49. Gitk

Ubuntu Software Centre

1.2.50. Ubuntu Freezes Randomly Solution

https://askubuntu.com/questions/761706/ubuntu-15-10-and-16-04-keep-freezing-randomly

sudo nano /etc/default/grub There is a line in that: GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” (like this), replace with: GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash intel_idle.max_cstate=1” Save it (CTRL+O) sudo update-grub sudo reboot

I think this makes the mouse disappear (!)

1.2.51. Installing OpenFOAM-5.0 on emps-rodrigo (emps-machines)

  1. Download packages:

download from http://dl.openfoam.org/source/5-0 download from http://dl.openfoam.org/third-party/5-0 scp -r OpenFOAM-5.x-version-5.0.tar.gz apr207@emps-rodrigo:/home/links/apr207/OpenFOAM scp -r ThirdParty-5.x-version-5.0.tar.gz apr207@emps-rodrigo:/home/links/apr207/OpenFOAM tar -zxvf OpenFOAM-5.x-version-5.0.tar.gz tar -zxvf ThirdParty-5.x-version-5.0.tar.gz mv OpenFOAM-5.x-version-5.0 OpenFOAM-5.0 mv ThirdParty-5.x-version-5.0 ThirdParty-5.0

  1. Don’t need to install any software for compilation

  2. Set environment variables:

cd $HOME nano .bashrc alias five=”module load mpi; source $HOME/OpenFOAM/OpenFOAM-5.0/etc/bashrc”

  1. After logging out and logging in again, install Third Party Scotch and PT Scotch

five cd $WM_THIRD_PARTY_DIR ./Allwmake > log &

  1. Install OpenFOAM

cd ../OpenFOAM-5.0/ ./Allwmake > log &

However, the following error occurred during stage 5):

touch: cannot touch ‘/secamfs/userspace/staff/apr207/OpenFOAM/OpenFOAM-5.0/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/src/parallel/decompose/ptscotchDecomp/using:openmpi-system’: No such file or directory touch: cannot touch ‘/secamfs/userspace/staff/apr207/OpenFOAM/OpenFOAM-5.0/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/src/parallel/decompose/ptscotchDecomp/using:scotch_6.0.3’: No such file or directory

  1. Install Pstream separately

cd src/parallel ./Allwmake

  1. Re-install OpenFOAM

cd ../OpenFOAM-5.0/ ./Allwmake

1.2.52. Install traceroute

See who is connected to remote server

sudo apt install traceroute

$ traceroute emps-kodaly

1.2.53. Install CFMESH

Download from https://sourceforge.net/projects/cfmesh/files/v1.1.2/

Extract to ~/home/apr207/cfMesh-v1.1.2

It only works with version 2.4.0:

$ two $ export WM_NCOMPPROCS=[8] $ source /home/apr207/OpenFOAM/OpenFOAM-2.4.0/etc/bashrc $ ./Allwmake

1.2.54. Installing OpenFOAM-2.1.0 on emps-rodrigo (emps-machines)

  1. Download packages:

Till step 4:

http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.1.x/Ubuntu#Ubuntu_14.04

https://openfoam.org/download/2-1-0-source/

download OpenFOAM-2.1.0 and ThirdParty-2.1.0

scp -r OpenFOAM-2.1.0.tgz apr207@emps-rodrigo:/home/links/apr207/OpenFOAM

scp -r ThirdParty-2.1.0.tgz apr207@emps-rodrigo:/home/links/apr207/OpenFOAM

tar -zxvf OpenFOAM-2.1.0.tgz

tar -zxvf ThirdParty-2.1.0.tgz
  1. Set environment variables:

cd ~
nano .bashrc
alias twoone="module load mpi; source $HOME/OpenFOAM/OpenFOAM-2.1.0/etc/bashrc"
  1. After logging out and logging in again, install Third Party Scotch and PT Scotch

twoone
cd $WM_THIRD_PARTY_DIR
./Allwmake > log 2>&1 &
  1. Install OpenFOAM

cd ../OpenFOAM-2.1.0/
./Allwmake > log 2>&1 &



could not open file omp.h for source file PstreamGlobals.C
could not open file openmpi/ompi/mpi/cxx/mpicxx.h for source file PstreamGlobals.C

1.2.55. Vim highlighting for case files

Install pathogen and create .vimrc file

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

vim ~/.vimrc

    execute pathogen#infect()
    syntax on
    filetype plugin indent on
    set t_Co=256

Clone the extension

cd $HOME/.vim/bundle
git clone https://bitbucket.org/shor-ty/vimextensionopenfoam.git

Check that 256 colours are present:

export TERM=screen-256color

1.2.56. Terminator color scheme (Lemur only)

Right click the terminator window and select preferences. Go to the Profile tab and add a new profile. Give it a name. Configure how you want the terminal to look. Close out of that.

When you launch terminator, launch it like so

terminator --profile=profilename

That will load terminator with a profile with the name of profilename. Change profilename to what you called yours.

1.2.57. Redshift colour

Edit those by adding the -t flag followed by the values (in the form of day:night)

redshift-gtk -l 50.7:-3.53 -t 2500:2500

You’ll have to play around with the numbers a bit to find one that works for you. The lower the number, the more red it will get - 6500 being no tint at all. To make RedShift start up when your computer does, you can easily do so by going to Startup Applications and adding a new program. Name it whatever you want and type the above command (using your settings) in the command box.

1.2.58. Simple Screen Recorder

sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder
sudo apt-get update
sudo apt-get install simplescreenrecorder

1.2.59. Error - System program problem detected

System program problem detected Do you want to report the problem now?

See the crashes:

ls -l /var/crash/
sudo rm /var/crash/*
sudo gedit /etc/default/apport &

    # set this to 0 to disable apport, or to 1 to enable it
    # you can temporarily override this with
    # sudo service apport start force_start=1
    enabled=0

1.2.60. How to install discord on Ubuntu

Load terminator

$ discord

It says to download discord Download deb file Open debfile Done

$ discord

link account

1.2.61. Install Spyder

Ubuntu software centre

1.2.62. Unity Tweak

Ubuntu software centre

1.2.63. TMUX

Ubuntu software centre

1.2.64. Theme

$ gsettings set org.gnome.desktop.interface gtk-theme ‘Adwaita-dark’

$ sudo apt-get install gnome-tweaks

1.2.65. FontForge

Ubuntu software centre

1.2.66. NCDU

For quick size of directories $ ncdu

Ubuntu software centre

1.2.67. Code::Blocks IDE

Ubuntu software centre

1.2.68. VIM-GTK

Better than vim on its own - it has keyboard integration

Ubuntu software centre

1.2.69. Anaconda

Anaconda website

1.2.70. OpenFOAM 4.x

Have to install 32 bit integer support for compatiblility with CFMesh

https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-4.x/Ubuntu#Ubuntu_16.04

  • Ubuntu 16.04

Here you have the following choices:

  • Follow the official instructions for building from source code: OpenFOAM Source Repository

  • Or by following the detailed step-by-step instructions below…

Discussion thread where you can ask questions about these steps: No thread available. Please a create a new thread in the forum.

Steps:

  1. Switch to root mode (administrator), to install the necessary packages:

sudo -s
  • If the ‘sudo’ command tells you’re not in the sudoers list, then run:

su -
  1. Update the apt-get cache by running:

apt-get update
  1. Install the necessary packages:

apt-get install git-core build-essential binutils-dev cmake flex bison zlib1g-dev qt4-dev-tools libqt4-dev libqtwebkit-dev gnuplot \
libreadline-dev libncurses-dev libxt-dev libopenmpi-dev openmpi-bin libboost-system-dev libboost-thread-dev libgmp-dev \
libmpfr-dev python python-dev libcgal-dev

Note: It has been reported that the following should also be executed in some cases, so that ParaView will build properly:

apt-get install libglu1-mesa-dev libqt4-opengl-dev

Now exit from the root mode:

exit
  1. Download and unpack (here you can copy-paste all in single go):

#OpenFOAM downloading and installation
cd ~
mkdir OpenFOAM
cd OpenFOAM
git clone https://github.com/OpenFOAM/OpenFOAM-4.x.git
git clone https://github.com/OpenFOAM/ThirdParty-4.x.git
  1. Optional: Let’s make a few symbolic links that should ensure that the correct global MPI installation is used by this OpenFOAM installation:

ln -s /usr/bin/mpicc.openmpi OpenFOAM-4.x/bin/mpicc
ln -s /usr/bin/mpirun.openmpi OpenFOAM-4.x/bin/mpirun

This way we avoid having problems in case there is more than one MPI toolbox installed in your Ubuntu system, for example if MPICH2 is installed and is the default MPI toolbox.

For building OpenFOAM itself, it depends on whether you have installed the i686 or x86_64 architecture of Ubuntu. To check this, run:

uname -m

Now, accordingly:

For i686:

source $HOME/OpenFOAM/OpenFOAM-4.x/etc/bashrc WM_ARCH_OPTION=32 FOAMY_HEX_MESH=yes
  • For x86_64, it depends on whether you need 64-bit integer support or not:

  • For building with the normal 32-bit integer support (maximum 2.147×10^9 cells, faces or points):

source $HOME/OpenFOAM/OpenFOAM-4.x/etc/bashrc FOAMY_HEX_MESH=yes
  • For building with the normal 64-bit integer support (maximum 9.22×10^18 cells, faces or points):

source $HOME/OpenFOAM/OpenFOAM-4.x/etc/bashrc WM_LABEL_SIZE=64 FOAMY_HEX_MESH=yes
  1. Save an alias in the personal .bashrc file, simply by running the following command:

echo "alias of4x='source \$HOME/OpenFOAM/OpenFOAM-4.x/etc/bashrc $FOAM_SETTINGS'" >> $HOME/.bashrc

Note: This last line means that whenever you start a new terminal window or tab, you should run the alias command associated to the OpenFOAM-4.x shell environment. In other words, whenever you start a new terminal, you should run:

of4x

For more information on this topic, read section Using aliases to help manage multiple OpenFOAM versions in the page Installation/Working with the Shell.

  1. Now, in order to build ParaView 5.0.1, including with the ability to use Python and MPI, a few steps are needed:

  1. Make sure you’re running in the ThirdParty folder and that the correct Qt version is used:

cd $WM_THIRD_PARTY_DIR
export QT_SELECT=qt4
  1. For building ParaView with Python and MPI, it depends on whether you have installed the i686 or x86_64 architecture of Ubuntu. To check this, run:

uname -m

Now, accordingly:

  • For i686:

#this will take a while... somewhere between 30 minutes to 2 hours or more
./makeParaView -python -mpi -python-lib /usr/lib/i386-linux-gnu/libpython2.7.so.1.0 > log.makePV 2>&1
  • For x86_64:

#this will take a while... somewhere between 30 minutes to 2 hours or more
./makeParaView -python -mpi -python-lib /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 > log.makePV 2>&1
wmRefresh
  1. Now let’s build OpenFOAM:

  1. Go into OpenFOAM’s main source folder and be certain that the correct Qt version is being used:

cd $WM_PROJECT_DIR
export QT_SELECT=qt4
  1. This next command will take a while… somewhere between 30 minutes to 3-6 hours:

./Allwmake -j 4 > log.make 2>&1

Note: The “4” refers to the number of cores to be used for building in parallel. In addition, the amount of RAM needed for building scales with the number of cores used, something like 1GB of RAM per core; a minimum of 1.5GB is needed for linking the libraries, which is not done in parallel.

  1. Run it a second time for getting a summary of the installation:

./Allwmake -j 4 > log.make 2>&1

Note: Technically, the build will stop as soon as the first error is found. Running a second time only makes it easier to sort through between what’s already been built and where the crash occurred.

To check if everything went well: Check if icoFoam is working, by running this command:

icoFoam -help

1.2.71. Check Numpy version

$ python -c “import numpy; print(numpy.version.version)”

1.2.72. Check Matplotlib version

$ python -c “import matplotlib; print(matplotlib.__version__)”

1.2.73. Install PyFoam

$ pip install PyFoam==0.6.6

1.2.74. Install numpy-stl

$ pip install numpy-stl

1.2.75. Install deap

$ pip install deap

1.2.78. nbsphinx

conda install -c conda-forge nbsphinx

1.2.79. downgrade pandoc

From anaconda.org (searched for pandoc):

conda install -c edurand pandoc

1.2.80. Python Environments

conda create –name py2 python=2.7 conda create –name py3 python=3.5

source activate py2 source activate py3 source deactivate

1.2.81. Mayavi

$ pip install mayavi

1.2.82. PyQt5

$ pip install PyQt5

1.2.83. VPN

This is what I did for SSH (username = your uni username, IP address = your PC). If you need any more information: https://as.exeter.ac.uk/it/network/vpn/

1.2.83.1. On the Uni computer:

sudo apt-get install openssh-server

1.2.83.2. On the home computer:

Download installed package: https://as.exeter.ac.uk/it/network/vpn/

Install the package and dependencies:

dpkg -i ps-pulse-linux-5.2r6.0-b977-ubuntu-debian-installer.deb

/usr/local/pulse/PulseClient.sh install_dependency_packages

Connect to VPN (it may say install yum - ignore this):

/usr/local/pulse/PulseClient.sh -h vpnsecure.exeter.ac.uk -u username -U https://vpnsecure.exeter.ac.uk -r Exeter

Connect to SSH (with compression):

ssh -XC username@IPaddress

1.2.84. Installing OpenFOAM 4.x on blade servers

  1. Download packages:

git clone https://github.com/OpenFOAM/OpenFOAM-4.x.git git clone https://github.com/OpenFOAM/ThirdParty-4.x.git

  1. Don’t need to install any software for compilation

  2. Set environment variables:

cd $HOME nano .bashrc alias of4x=”module load mpi; source $HOME/OpenFOAM/OpenFOAM-5.0/etc/bashrc”

  1. After logging out and logging in again, install Third Party Scotch and PT Scotch

of4x cd $WM_THIRD_PARTY_DIR ./Allwmake > log &

  1. Install OpenFOAM

cd ../OpenFOAM-4.x/ ./Allwmake -j 16 > log.make 2>&1

1.2.85. Tubulucid

  • numpy

  • scipy

  • matplotlib

  • pytest

conda install vtk