View Issue Details

IDProjectCategoryView StatusLast Update
0001549OpenFOAMBugpublic2015-03-07 15:10
Reporteruser507Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86-64OSLinux MintOS Version17.1
Summary0001549: Paraview build fail with -mpi flag and MPICH
DescriptionTrying to build the Paraview supplied with ThirdParty-2.3.1 with the 'makeParaView4' script with flag '-mpi' fail if using MPICH supplied with the Linux Mint / Ubuntu package repositories, even when all environment variables is set correctly.
Steps To Reproduce1) Install MPICH from the Ubuntu/Linux Mint repositories as your only MPI version
2) Alter the OpenFOAM environment variables accordingly (override some of the variables set by the etc/bashrc script)
3) Try to build ParaView with './buildParaView4 -mpi'
Additional InformationThe cause of this error is in the etc/tools/ParaView4Functions file, line 169 and 174, where the script sets two CMAKE variables:

169: addCMakeVariable "MPI_LIBRARY=$MPI_ARCH_PATH/lib/libmpi.so"
174: addCMakeVariable "VTK_MPIRUN_EXE=$MPI_ARCH_PATH/bin/mpirun"

These are not correct for MPICH, since the MPI library is called 'libmpich.so' and the mpirun binary is not found in '$MPI_ARCH_PATH/bin/mpirun'.

They are however not needed at all, CMake will on its own find the neccesary MPI libraries to link against and find the mpirun binary, as long as the desired mpirun is the first in $PATH etc. Just commenting away these two lines makes the compilation successful.
TagsNo tags attached.

Activities

wyldckat

2015-02-28 21:00

updater   ~0003923

Greetings hakostra,

Which exact environment variables did you modify in OpenFOAM's "bashrc" file?

Best regards,
Bruno

Note: This seems somewhat related to issue #1167: http://www.openfoam.org/mantisbt/view.php?id=1167

user507

2015-03-01 19:39

  ~0003926

I actually use "modulefiles", via the "enviromnent-modules" package in the Ubuntu/Linux Mint repos. I think this is a great way to manage different source-compiled software. The variables are however mostly the same as set by etc/bashrc. I attach my modulefile for reference.

And I totally agree that the build system by OpenFOAM is a pain. Just look at the modulefile. So many variables? Why??? Why not use CMake?

user507

2015-03-01 19:40

 

modulefile.txt (3,998 bytes)   

henry

2015-03-01 20:34

manager   ~0003928

@Bruno, does removing the addCMakeVariable lines work for your builds?

wyldckat

2015-03-01 21:07

updater   ~0003932

@Henry: I haven't tested that yet. And probably I will only be able to do it next weekend, namely a few battery of tests for a few MPI versions (custom Open-MPI, system Open-MPI, system MPICH and custom MPICH).


@Hakostra: There's SCONS, Gyp and a few other alternatives to CMake, precisely because CMake isn't the solution for all situations ;)
In addition, if I'm not mistaken, CMake is 10 or more years younger than "wmake": http://en.wikipedia.org/wiki/CMake

wyldckat

2015-03-07 13:58

updater  

ParaViewFunctions (14,136 bytes)   

wyldckat

2015-03-07 13:58

updater  

ParaView4Functions (13,494 bytes)   

wyldckat

2015-03-07 14:09

updater   ~0003996

Last edited: 2015-03-07 14:14

Attached are the updated files "ParaView*Functions" for "ThirdParty-2.3.x/etc/tools".

I've tested in Ubuntu 14.04 and the system's CMake 2.8.12.2, with:
 - system's MPICH2
 - system's Open-MPI
 - Custom Open-MPI

CMake is able to pick up automatically the include folder, library paths and mpiexec/mpirun binaries respective to the active MPI toolbox, without us telling it.

henry

2015-03-07 15:10

manager   ~0003998

Thanks Bruno for testing the change with a selection of MPI versions.

Resolved commit 3bb1c31947821f891f85dfebeddedb311f9a8c9d

Issue History

Date Modified Username Field Change
2015-02-27 08:55 user507 New Issue
2015-02-28 21:00 wyldckat Note Added: 0003923
2015-03-01 19:39 user507 Note Added: 0003926
2015-03-01 19:40 user507 File Added: modulefile.txt
2015-03-01 20:34 henry Note Added: 0003928
2015-03-01 21:07 wyldckat Note Added: 0003932
2015-03-07 13:58 wyldckat File Added: ParaViewFunctions
2015-03-07 13:58 wyldckat File Added: ParaView4Functions
2015-03-07 14:09 wyldckat Note Added: 0003996
2015-03-07 14:14 wyldckat Note Edited: 0003996
2015-03-07 15:10 henry Note Added: 0003998
2015-03-07 15:10 henry Status new => resolved
2015-03-07 15:10 henry Resolution open => fixed
2015-03-07 15:10 henry Assigned To => henry