documentation:software:compiling

This section aims at helping the users compile the software they need. They are mere guidelines!

Following instructions from https://github.com/xcompact3d/Incompact3d

salloc

git clone https://github.com/xcompact3d/Incompact3d
cd Incompact3d/
git checkout v3.0
module load mpi/openmpi-x86_64
make

# once compiled
cd examples/Cylinder
pwd
/homes/<user>/Incompact3d/examples/Cylinder

mpirun -n 1 ~/Incompact3d/xcompact3d

 Xcompact3d is run with the default file -->input.i3d                                                                       
 ===========================================================
 ======================Xcompact3D===========================
 ===Copyright (c) 2018 Eric Lamballais and Sylvain Laizet===
 ===Modified by Felipe Schuch and Ricardo Frantz============
 ===Modified by Paul Bartholomew, Georgios Deskos and=======
 ===Sylvain Laizet -- 2018- ================================
 ===========================================================
 Git version        : v3.0-0-g9015765
 
 Simulating cylinder
 (lx,ly,lz)=   20.000000000000000        12.000000000000000        6.0000000000000000     
 (nx,ny,nz)=         257         128          64
 (dx,dy,dz)=   7.8125000000000000E-002   9.3750000000000000E-002   9.3750000000000000E-002
 (nx*ny*nz)=     2105344
 (p_row,p_col)=           0           0
 
 Numerical precision: Double
 Boundary condition : (nclx1 ,nclxn )=(2,2)
                      (ncly1 ,nclyn )=(0,0)
                      (nclz1 ,nclzn )=(0,0)
 High and low speed : u1=  1.00 and u2=  1.00
 Reynolds number Re :    300.00000000
 Gravity vector     : (gx, gy, gz)=(     0.00000000,     0.00000000,     0.00000000)
 Time step dt       :      0.00250000
 Spatial scheme     :      0.69477383
 Temporal scheme    : Adams-bashforth 3
 Scalar             : off
 Immersed boundary  : on with Lagrangian Poly
 
 In auto-tuning mode......
 factors:            1
 processor grid           1  by            1  time=   8.6869291961193085E-002
 the best processor grid is probably            1  by            1
 Initializing variables...
 Using the hyperviscous operator with (nu_0/nu,c_nu) = (   4.0000000000000000      ,  0.44000000000000000      )
 Using the hyperviscous operator with (nu_0/nu,c_nu) = (   4.0000000000000000      ,  0.44000000000000000      )
 Using the hyperviscous operator with (nu_0/nu,c_nu) = (   4.0000000000000000      ,  0.44000000000000000      )
 Generating the geometry!
     step 1
     step 2
     step 3
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 16346 on node ava01 exited on signal 9 (Killed).
--------------------------------------------------------------------------

A Distro “Scientific Linux 7” não faz parte dos SO's suportados, pelo openfoam, pelo que não podemos garantir que funcione corretamente sendo tambem por isso que a aplicação terá de ser compilada na conta de cada um, para evitar a introdução de instabilidade no sistema important box

# infos https://openfoam.org/download/7-source/

salloc -n 16 -p big

mkdir OpenFOAM
cd OpenFOAM/
wget -O - http://dl.openfoam.org/source/7 | tar xvz
wget -O - http://dl.openfoam.org/third-party/7 | tar xvz
mv OpenFOAM-7-version-7 OpenFOAM-7
mv ThirdParty-7-version-7 ThirdParty-7

# https://openfoam.org/download/source/software-for-compilation/
source $HOME/OpenFOAM/OpenFOAM-7/etc/bashrc WM_LABEL_SIZE=64 WM_MPLIB=OPENMPI FOAMY_HEX_MESH=yes

cd ThirdParty-7
mkdir download
wget -P download https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2
tar -xjf download/openmpi-2.1.1.tar.bz2

# https://openfoam.org/download/source/third-party-software/
./Allwmake -j 16

# https://www.paraview.org/download/
wget 'https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v5.6&type=binary&os=Linux&downloadFile=ParaView-5.6.0-MPI-Linux-64bit.tar.gz' -O ParaView.tar.gz
gunzip ParaView.tar.gz
tar -xf ParaView.tar
rm ParaView.tar
wmRefresh

cd ..
cd OpenFOAM-7
module load gcc/9.3.1
./Allwmake -j 16

# Getting started
mkdir -p $FOAM_RUN
cd $FOAM_RUN
cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .
cd pitzDaily
blockMesh
simpleFoam
# more at http://cfd.direct/openfoam/user-guide

# A different approach! Just do:

salloc -n 6
source /soft/no_support/OpenFOAM/OpenFOAM-6/etc/bashrc WM_LABEL_SIZE=64 WM_MPLIB=OPENMPI FOAMY_HEX_MESH=yes

# Then You can run OpenFoam cmds like:
icoFoam -help

 # Next, the compilation of this software and sources
 # NOTE: You do not need to compile if You use the method "source /soft/no_support/..." explained before!
 
 https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-6/CentOS_SL_RHEL
 2.3 CentOS 7.5 (1804)
 
 cd ~
 mkdir OpenFOAM
 cd OpenFOAM
 git clone https://github.com/OpenFOAM/OpenFOAM-6.git
 git clone https://github.com/OpenFOAM/ThirdParty-6.git
 
 cd ThirdParty-6
 mkdir download
 
 wget -P download https://www.cmake.org/files/v3.9/cmake-3.9.0.tar.gz
 wget -P download  https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.10/CGAL-4.10.tar.xz
 wget -P download https://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2
 wget -P download https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2
 wget -P download http://www.paraview.org/files/v5.4/ParaView-v5.4.0.tar.gz
 
 tar -xzf download/cmake-3.9.0.tar.gz
 tar -xJf download/CGAL-4.10.tar.xz
 tar -xjf download/boost_1_55_0.tar.bz2
 tar -xjf download/openmpi-2.1.1.tar.bz2
 tar -xzf download/ParaView-v5.4.0.tar.gz --transform='s/ParaView-v5.4.0/ParaView-5.4.0/'
 
 cd ..
 sed -i -e 's/\(boost_version=\)boost-system/\1boost_1_55_0/' OpenFOAM-6/etc/config.sh/CGAL
 sed -i -e 's/\(cgal_version=\)cgal-system/\1CGAL-4.10/' OpenFOAM-6/etc/config.sh/CGAL
 
 source $HOME/OpenFOAM/OpenFOAM-6/etc/bashrc WM_LABEL_SIZE=64 WM_MPLIB=OPENMPI FOAMY_HEX_MESH=yes
 
 cd $WM_THIRD_PARTY_DIR
 ./makeCmake > log.makeCmake 2>&1
 wmRefresh
 
 cd $WM_THIRD_PARTY_DIR
 ./Allwmake > log.make 2>&1
 wmRefresh
 
 cd $WM_THIRD_PARTY_DIR
 ./makeParaView -mpi -python -qmake $(which qmake-qt4) > log.makePV 2>&1
 wmRefresh
 
 cd $WM_PROJECT_DIR
 ./Allwmake -j 8 > log.make 2>&1
 
 # Check if icoFoam is working, by running this command:
 icoFoam -help
 
 # https://openfoamwiki.net/index.php/FAQ/Installation_and_Running
 
 # manual
 # https://cfd.direct/openfoam/user-guide/
 ls -A1 $WM_PROJECT_DIR/doc/Guides*/*UserGuide*.pdf
  • documentation/software/compiling.txt
  • Last modified: 2022/01/04 13:24
  • by jcunha