Accepting request 287947 from home:dkxls:cfd

The proposed changes compile VTK with MPI support.

Considering that pretty much any computer nowadays has several CPU cores it just makes sense to enable parallel computation support for a toolkit like VTK.

The changes are small and straight forward. I tested the serial and parallel versions (vtkpython and pvtkpython) and both work as expected.

OBS-URL: https://build.opensuse.org/request/show/287947
OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=50
This commit is contained in:
Matthias Mailänder 2015-02-26 20:21:48 +00:00 committed by Git OBS Bridge
parent b6a86bca1b
commit 7c6b312611
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 26 12:30:11 UTC 2015 - dkxls23@gmail.com
- Add MPI support
-------------------------------------------------------------------
Thu Sep 11 01:52:56 UTC 2014 - badshah400@gmail.com

View File

@ -1,7 +1,7 @@
#
# spec file for package vtk
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -61,6 +61,7 @@ BuildRequires: libpng-devel
BuildRequires: libqt4-devel
BuildRequires: libtheora-devel
BuildRequires: libtiff-devel
BuildRequires: openmpi-devel
BuildRequires: python-devel
BuildRequires: python-qt4-devel
BuildRequires: tcl-devel
@ -69,7 +70,7 @@ BuildRequires: wget
BuildRequires: zlib-devel
%if %{?sles_version}
BuildRequires: libxml2-devel
%else
%else
BuildRequires: pkgconfig(libxml-2.0)
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -101,6 +102,7 @@ Requires: libpng-devel
Requires: libqt4-devel
Requires: libtheora-devel
Requires: libtiff-devel
Requires: openmpi-devel
Requires: python-%{name} = %{version}
Requires: python-%{name}-qt = %{version}
@ -241,6 +243,8 @@ export CXXFLAGS="%{optflags}"
mkdir build
pushd build
cmake .. \
-DCMAKE_CXX_COMPILER:STRING='mpicxx' \
-DCMAKE_C_COMPILER:STRING='mpicc' \
-DBUILD_DOCUMENTATION:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
@ -265,6 +269,7 @@ cmake .. \
-DVTK_WRAP_JAVA:BOOL=ON \
-DVTK_WRAP_PYTHON_SIP:BOOL=ON \
-DVTK_WRAP_TCL:BOOL=ON \
-DVTK_Group_MPI:BOOL=ON \
-DVTK_Group_Imaging:BOOL=ON \
-DVTK_Group_Qt:BOOL=ON \
-DModule_vtkTestingCore:BOOL=ON \
@ -399,6 +404,7 @@ chrpath -d %{buildroot}%{_bindir}/*
%files -n python-%{name}
%defattr(-,root,root,-)
%{_bindir}/%{name}python
%{_bindir}/p%{name}python
%{_bindir}/%{name}WrapPython
%{_bindir}/%{name}WrapPythonInit
%{_libdir}/%{name}/*Python*.so.*