Install via BuildWithMake

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Haifeng Wang
Posts: 14
Joined: Tue Aug 01, 2017 3:22 am

Install via BuildWithMake

Post by Haifeng Wang » Fri Nov 15, 2019 5:13 am

Dear Developers,

Currently I'm switching to using simVascular on Ubuntu.
When I install/compile the svSolver and svFSI (from GitHub), however, I'm facing with some errors as follows:

****************************************************
/usr/bin/ld: /home/whf/svsolver/externals/bin/gnu-4.8/x64/vtk-6.2.0/lib/libvtksys-6.2.a(RegularExpression.cxx.o): relocation R_X86_64_32S against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:68: recipe for target '../../../../BuildWithMake/Bin/svpost-gcc-gfortran.exe' failed

--> Question 1: How to solve this problem? The current gcc version in my notebook is 'gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)'. I tried to install gcc-4.8 and g++-4.8 but failed. How to recompile with -fPIC? Could you kindly give me some hints?

****************************************************
I also tried to install simvascular, svsolver and svFSI in another machine which has gcc.4.8.2. Then, I'm facing with another problem:
chmod a+rx mysolver-nompi
chmod: cannot access 'mysolver-nompi': No such file or directory
make: [post-build] Error 1 (ignored)

--> Question 2: Could you also kindly let me know how I can fix this issue?
****************************************************

Best wishes,
Haifeng

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

Re: Install via BuildWithMake

Post by David Parker » Fri Nov 15, 2019 9:19 am

Hi Haifeng,

Use CMake to build, not BuildWithMake, that is an internal hack that some developers use on HPC clusters where CMake has problems finding some libraries.

Cheers,
Dave

User avatar
Haifeng Wang
Posts: 14
Joined: Tue Aug 01, 2017 3:22 am

Re: Install via BuildWithMake

Post by Haifeng Wang » Fri Nov 15, 2019 3:19 pm

Thank you, Dave, for your time and patience!
I should have checked this forum carefully.

Cheers,
Haifeng

User avatar
Nathan Wilson
Posts: 46
Joined: Tue Jun 20, 2006 9:19 am

Re: Install via BuildWithMake

Post by Nathan Wilson » Sun Nov 17, 2019 11:43 pm

Dear Haifeng,

The error messages you were receiving were due to the precompiled binaries of VTK not being built with the -fPIC flag. The CMake build also failed on Ubuntu 18.

As VTK 6.2 was too old to build on Ubuntu 18, I've upgraded svSolver to use VTK version 8.1.1 just like the core SimVascular application uses.

I've also upgraded the Make build system to be like the Make build system for the core SV application.

Please update your git branch with the latest master branch in svSolver. This will fix the the issues for both the Make and CMake build. See the "README..." file in BuildWithMake to use the make build. It should build "out of the box" on your system using the "quick-build-linux.sh" script. Note that the default build using Make builds svSolver with the "dummy MPI" version. You need to override the flags as described to use MPICH or OPENMPI. You may also need to update MakeHelpers/2019.06/*mpi* scripts if your installation of MPI varies from the default.

The CMake build should build both the dummy MPI version of the solver and attempts to automatically find MPI installed on your system.

Nathan
SimVascular Support Team

User avatar
Haifeng Wang
Posts: 14
Joined: Tue Aug 01, 2017 3:22 am

Re: Install via BuildWithMake

Post by Haifeng Wang » Mon Nov 18, 2019 1:06 am

Hi Nathan,

many thanks for your update and detailed explanation!
I hope now I can successfully build SimVascular on my machines.

Cheers,
Haifeng

User avatar
Haifeng Wang
Posts: 14
Joined: Tue Aug 01, 2017 3:22 am

Re: Install via BuildWithMake

Post by Haifeng Wang » Tue Nov 19, 2019 1:51 am

Hello Nathan and Dave,

I try to compile/build the svSolver using the latest version. Unfortunately, another error occurs (see below):

------
/home/users/wanghach/storage/simVascular/svsolver/Code/FlowSolvers/ThreeDSolver/svSolver/main.cxx:271: undefined reference to `ompi_mpi_comm_world'
CMakeFiles/svsolver-nompi.dir/main.cxx.o:(.data.rel.ro._ZTVN3MPI8DatatypeE[_ZTVN3MPI8DatatypeE]+0x78): undefined reference to `MPI::Datatype::Free()'
CMakeFiles/svsolver-nompi.dir/main.cxx.o:(.data.rel.ro._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48): undefined reference to `MPI::Win::Free()'
CMakeFiles/svsolver-nompi.dir/write_restart_files.c.o: In function `write_restart_':
/home/users/wanghach/storage/simVascular/svsolver/Code/FlowSolvers/ThreeDSolver/svSolver/write_restart_files.c:172: undefined reference to `ompi_mpi_comm_world'
collect2: error: ld returned 1 exit status
FlowSolvers/ThreeDSolver/svSolver-nompi/CMakeFiles/svsolver-nompi.dir/build.make:489: recipe for target 'bin/svsolver-nompi' failed
make[5]: *** [bin/svsolver-nompi] Error 1
CMakeFiles/Makefile2:1168: recipe for target 'FlowSolvers/ThreeDSolver/svSolver-nompi/CMakeFiles/svsolver-nompi.dir/all' failed
make[4]: *** [FlowSolvers/ThreeDSolver/svSolver-nompi/CMakeFiles/svsolver-nompi.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/svSolver.dir/build.make:111: recipe for target 'svSolver-prefix/src/svSolver-stamp/svSolver-build' failed
make[2]: *** [svSolver-prefix/src/svSolver-stamp/svSolver-build] Error 2
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/svSolver.dir/all' failed
make[1]: *** [CMakeFiles/svSolver.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
------

I double-check and I am pretty sure that the mpiexec/openmpi is already installed:
------
/etc/alternatives/mpiexec
/etc/alternatives/mpiexec.1.gz
/usr/bin/mpiexec
/usr/bin/mpiexec.hydra
/usr/bin/mpiexec.mpich
/usr/bin/mpiexec.openmpi
/usr/share/man/man1/mpiexec.1.gz
/usr/share/man/man1/mpiexec.hydra.1.gz
/usr/share/man/man1/mpiexec.mpich.1.gz
/usr/share/man/man1/mpiexec.openmpi.1.gz
------

Could you kindly comment on this issue?

Best,
Haifeng

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

Re: Install via BuildWithMake

Post by David Parker » Tue Nov 19, 2019 10:33 am

Hi Haifeng,

You need to build svSolver using MPICH, not OpenMPI.

Cheers,
Dave

POST REPLY