Installing svFSI from source code

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Jijo Derick Abraham
Posts: 13
Joined: Thu Aug 05, 2021 6:29 am

Installing svFSI from source code

Post by Jijo Derick Abraham » 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
  • 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 snap

    Code: 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
    

    Code: Select all

    sudo apt update
    sudo apt install cmake
    
    Now you can check the version again

    Code: Select all

    cmake --version
    Hopefully , it should be a latest version.
2. Once, the prerequisites are ready just follow the following steps to build the svFSI

Code: Select all

mkdir svFSI  && cd svFSI
git clone https://github.com/SimVascular/svFSI.git
mkdir build && cd build
ccmake ../svFSI
make
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

Code: Select all

git clone https://github.com/SimVascular/svFSI-Tests.git
navigate to any particular case (for eg. svFSI-Tests/04-fluid/02-dye_AD/)

Code: Select all

cd 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)

Code: Select all

ln -s /home/username/svFSI/build/svFSI-build/bin/svFSI
Now you can run case the in series as

Code: Select all

./svFSI svFSI.inp
or in parallel (for eg. with 8 procs)

Code: Select all

mpirun -np 8 ./svFSI svFSI.inp
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
Last edited by Jijo Derick Abraham on Mon May 16, 2022 7:08 pm, edited 2 times in total.

User avatar
David Parker
Posts: 1742
Joined: Tue Aug 23, 2005 2:43 pm

Re: Installing svFSI from source code

Post by David Parker » Thu Mar 03, 2022 11:38 am

Hi Jijo,

Thanks for sharing your knowledge! I'm sure this will be useful for other users.

I will have a look at updating the svFSI build information on the SV website.

Cheers,
Dave

User avatar
Krashn Kumar Dwivedi
Posts: 4
Joined: Fri Feb 10, 2023 10:58 am

Re: Installing svFSI from source code

Post by Krashn Kumar Dwivedi » Thu Feb 23, 2023 10:14 am

Hi Jijo Derick Abraham
It is a really a nice step wise explanation to install the svFSI, I did follow the same step as mentioned by you in SIMTK. But, I am getting error as shown in attached images 1 and 2.
I try to other ways also but not able to resolve these issue. What should I do complete the installation
I am using latest version of cmake 3.25.2

Thank you
Attachments
2.jpg
File 2
2.jpg (74.11 KiB) Viewed 6200 times
1.jpg
File One
1.jpg (238.67 KiB) Viewed 6200 times

User avatar
pawan pal
Posts: 18
Joined: Wed Jun 07, 2023 12:21 am

Re: Installing svFSI from source code

Post by pawan pal » Wed Apr 03, 2024 4:06 am

hello Jijo Derick Abraham sir

i follow all the instruction as share by you it is very help full for all new beginner like me.

sir as i reached at step 2 Once, the prerequisites are ready just follow the following steps to build the svFSI
using this code (mkdir svFSI && cd svFSI
git clone https://github.com/SimVascular/svFSI.git
mkdir build && cd build
ccmake ../svFSI
make) my terminal look like this in image 1

then after downloading tutorial test case form step 3
using series code and parallel code dint not work in image 2 and image 3 i have attached can you please help me out that so i can run svFSI

thanks again
Attachments
Image_3.png
apply parallel code
Image_3.png (294.33 KiB) Viewed 5833 times
image_2.png
apply series code
image_2.png (259.81 KiB) Viewed 5833 times
image_1.png
apply step 2
image_1.png (108.68 KiB) Viewed 5833 times

User avatar
Jijo Derick Abraham
Posts: 13
Joined: Thu Aug 05, 2021 6:29 am

Re: Installing svFSI from source code

Post by Jijo Derick Abraham » Mon Apr 15, 2024 5:34 am

Hi Pawan,
From your image_1.png, looks like you haven't proceeded with the configure and generate options in the cmake.
I mean press the "c" key so that it will configure the files and once the configuration is successful, cmake shows the option to generate.
press the "g" key at that time accordingly,

Cheers
Jijo

User avatar
pawan pal
Posts: 18
Joined: Wed Jun 07, 2023 12:21 am

Re: Installing svFSI from source code

Post by pawan pal » Fri May 10, 2024 4:02 am

Thank you Jijo Derick Abraham sir

POST REPLY