From 7c6b312611d9f3f53214897533fb34a6ce9158af1fc034bfa556d2808422cba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 26 Feb 2015 20:21:48 +0000 Subject: [PATCH] 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 --- vtk.changes | 5 +++++ vtk.spec | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/vtk.changes b/vtk.changes index 414e894..9f7fff6 100644 --- a/vtk.changes +++ b/vtk.changes @@ -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 diff --git a/vtk.spec b/vtk.spec index bae4bf1..e2bb92f 100644 --- a/vtk.spec +++ b/vtk.spec @@ -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.*