MantisBT - ParaView
View Issue Details
0014821ParaView(No Category)public2014-06-24 11:252015-01-11 08:16
Vadim SANDLER 
Tristan Coulange 
normalminorhave not tried
closedfixed 
4.1 
4.2 
ParaViS
usability
0014821: Long compilation of ParaView with early versions of gcc 4.4
The compilation of ParaView takes very long time on some Linux distributions.

The analysis has shown that this problem takes place with some versions of gcc compiler. For example, this problem is reproduced on:
- Mandriva 2010.0 64bits: gcc version 4.4.1.
- CentOS 5.5 64bits: gcc version 4.4.0.

The 'make' process freezes at compilation of ParaViewCore/ServerManager/SMApplication/vtkInitializationHelper.cxx file.
The compilation, if not stopped, might take more than a week!!! :)
In the end, the compilation of this file is successfully finished and rest of build procedure is done as usual.
During the compilation of this file, CPU shows ~100% of loading (on multi-core systems only one core is loaded).

The analysis has shown that the problem is caused by ParaView_build/ParaViewCore/ServerManager/SMApplication/vtkSMGeneratedModules.h file that is generated by kwProcessXML tool. Namely, this (very big) file operates with huge hard-coded string variables, e.g.

...
// From file /data/mnt/vsr/tmp/ParaView-4.1.0_SRC/ParaViewCore/ServerManager/SMApplication/Resources/filters.xml
static const char* const vtkSMDefaultModulesfiltersInterface0 =
"<ServerManagerConfiguration>\n"
" <ProxyGroup name=\"internal_filters\">\n"
...

This problem can be fixed by patching of the Utilities/ProcessXML/ProcessXML.cxx file, in "void PrintHeader(const char* title, const char* file)" function, by replacing (in line 53)

      << "static const char* " << this->Prefix.c_str() << title << this->Suffix.c_str() << this->Count

with

      << "static const char* const " << this->Prefix.c_str() << title << this->Suffix.c_str() << this->Count

With this patch, the compilation of mentioned file takes just a second. No any negative side effect has been found after applying of this patch.
No tags attached.
Issue History
2014-06-24 11:25Vadim SANDLERNew Issue
2014-07-17 03:37Tristan CoulangeAssigned To => Tristan Coulange
2014-07-25 04:46Tristan CoulangeStatusbacklog => active development
2014-07-28 12:54Tristan CoulangeNote Added: 0033107
2014-07-28 12:54Tristan CoulangeStatusactive development => gatekeeper review
2014-07-31 08:59Utkarsh AyachitFixed in Version => git-master
2014-07-31 09:00Utkarsh AyachitStatusgatekeeper review => customer review
2014-07-31 09:00Utkarsh AyachitNote Added: 0033165
2014-08-19 18:13Alan ScottNote Added: 0033261
2014-08-19 18:13Alan ScottStatuscustomer review => closed
2014-08-19 18:13Alan ScottResolutionopen => fixed
2014-08-29 10:59Utkarsh AyachitFixed in Versiongit-master => 4.2
2015-01-11 08:16Tristan CoulangeSource_changeset_attached => ParaView master 245c75c8

Notes
(0033107)
Tristan Coulange   
2014-07-28 12:54   
The change was approved on gerrit :

http://review.source.kitware.com/#/t/4445/ [^]

Fix slow compilation via processxml

The compilation was very slow (days) with some linux and gcc versions:
- Mandriva 2010.0 64bits: gcc version 4.4.1.
- CentOS 5.5 64bits: gcc version 4.4.0.
This change fixed the problem. See issue 0014821.

Change-Id: I4b54f17140a56ae22b8e1af8532723e7c8a755b0
(0033165)
Utkarsh Ayachit   
2014-07-31 09:00   
SUMMARY
---------------------------------------------
Topics merged into master:
(VTK) 14599_fix_double_range_issues
        14789_fix_border
        14831_log_scaling_crash
        14848_fix_mutlselection
        appdata-file
        catalyst-dependencies
        catalyst-kits
        compilation_issue_processxml
        excess-moc-wrapping
        fix-cache-doc
        fix-catalyst-python
        kit-libraries
(VTK) newest-xdmf
        pass_connectid_to_autompi
        remove-mpi4py
(VTK) update-vtk-20140729


---------------------------------------------
Topics reverted from next:
  14813_fix_mode_shapes_range
  fix_proxy_widget_dialog_apply
  pvweb-fixes
(0033261)
Alan Scott   
2014-08-19 18:13   
Trusting that Vadim and Tristan tested.