Installing svFSI from source code
Posted: Thu Mar 03, 2022 1:14 am
I was successful in installing the svFSI using source code.
For beginners who want to install the svFSI without Trillnos in ubuntu 18.04 or 20.04, I am hereby posting the things that worked for me.
1.First, build the prerequisites just with apt
3. Finally to run/test any tutorial test case
first download the test case from svFSI-test repository to any directory where you want to run a case
navigate to any particular case (for eg. svFSI-Tests/04-fluid/02-dye_AD/)
create soft links to the installed svFSI (location might change according to where you have built the code)
Now you can run case the in series as
or in parallel (for eg. with 8 procs)
In case in the test case, if the preconditioner is Trillinos, you can replace it to FSILS in the .inp file and proceed the run.
------------------------------------------------------------------------------------------------------
Most of the things are available in the different parts of simvascular and svFSI websites. I have attempted to consolidate things in an orderly manner here.
Also, some of the things are very basic Linux commands, However, I hope this will be useful for someone who is very new to svFSI.
Thanks to Dave, for the responses during my earlier attempts.
Cheers
For beginners who want to install the svFSI without Trillnos in ubuntu 18.04 or 20.04, I am hereby posting the things that worked for me.
1.First, build the prerequisites just with apt
- install git, if you don't have done it previously
Code: Select all
sudo apt install git
- Install gcc, gfortran, lapack, liblas and open mpi
Code: Select all
sudo apt install gcc
sudo apt install gfortran
sudo apt install liblapack-dev
sudo apt install libblas-dev
sudo apt install libopenmpi-dev
sudo apt install openmpi-bin
- Install cmake (for ubuntu 20.04)
Code: Select all
sudo apt install cmake
sudo apt install cmake-curses-gui
- cmake (for ubuntu 18.04)
Note that, svFSI demands cmake version 3.12 or latest. However, in ubuntu 18.04 the default version of the cmake is 3.10, which is not sufficient to build svFSI. I suggest first check the default version of cmake if you have previously installed cmake for any other purpose.Code: Select all
cmake --version
- if you haven't installed cmake before, it will shows that
Command 'cmake' not found, but can be installed with:
sudo snap install cmake # version 3.23.1, or
sudo apt install cmake
then I recommend installing the desired very new version, with the snapCode: Select all
sudo snap install cmake --classic #version 3.23.1
- if it is below 3.10, we have to find a way to replace this default version with the latest versions. In my case, I followed the steps provided in the following link to do it https://askubuntu.com/questions/355565/ ... mmand-line. Just follow the section A. Using APT Repositories (which is recommended for normal users) . Same I am copying below.
Code: Select all
sudo apt remove --purge --auto-remove cmake sudo apt purge --auto-remove cmake
Code: Select all
sudo apt update && \ sudo apt install -y software-properties-common lsb-release && \ sudo apt clean all
Code: Select all
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
Code: Select all
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
Code: Select all
sudo apt update sudo apt install kitware-archive-keyring sudo rm /etc/apt/trusted.gpg.d/kitware.gpg
Now you can check the version againCode: Select all
sudo apt update sudo apt install cmake
Hopefully , it should be a latest version.Code: Select all
cmake --version
Code: Select all
mkdir svFSI && cd svFSI
git clone https://github.com/SimVascular/svFSI.git
mkdir build && cd build
ccmake ../svFSI
make
first download the test case from svFSI-test repository to any directory where you want to run a case
Code: Select all
git clone https://github.com/SimVascular/svFSI-Tests.git
Code: Select all
cd svFSI-Tests/04-fluid/02-dye_AD/
Code: Select all
ln -s /home/username/svFSI/build/svFSI-build/bin/svFSI
Code: Select all
./svFSI svFSI.inp
Code: Select all
mpirun -np 8 ./svFSI svFSI.inp
------------------------------------------------------------------------------------------------------
Most of the things are available in the different parts of simvascular and svFSI websites. I have attempted to consolidate things in an orderly manner here.
Also, some of the things are very basic Linux commands, However, I hope this will be useful for someone who is very new to svFSI.
Thanks to Dave, for the responses during my earlier attempts.
Cheers