Building ParaView 5.7.0 and 5.8.0 on the Power 9 Architecture under Linux (Update)

Here is revised version of my previous post

Building ParaView 5.8.0 on the Power 9 Architecture under Linux

in which I have narrowed down the compilation problems, and improved my fixes,
based on feedback from the previous post to allow easier building of the Mesa and OSMesa versions of ParaView 5.8.0 while adding the issues and fixes that will also allow building ParaView 5.7.0 Mesa and OSMesa versions on the Power 9 architecture as well.

  • 5.8.0

The following changes were necessary to compile ParaView 5.8.0 Mesa and OSMesa versions
on the Power 9 Architecture under Linux.

I used the ParaView superbuild with these flags to build Python 3

-DENABLE_python3=ON
-DENABLE_python=ON
-DUSE_SYSTEM_python=OFF

It was necesary to add -Dmesa_USE_SWR=OFF to one’s cmake build script or otherwise Mesa and OSMesa will try to build with SWR which requires AVX

For the files superbuild/python3/src/Lib/shutil.py and install/lib/python3.7/shutil.py, I found an error within the _copyxattr function making it necessary to replace lines 167-169:

if e.errno not in (errno.EPERM, errno.ENOTSUP, errno.ENODATA,
                   errno.EINVAL):
    raise

with

if e.errno is 13 :
    print("Please fix this Python OSError errno.EACCES on Power 9 Architecture")
elif e.errno not in (errno.EPERM, errno.ENOTSUP, errno.ENODATA,
                   errno.EINVAL):
    raise

I do not know why that this is throwing an error here on the Power 9 Architecture

For Silo support it was necessary to add the lines

ppc64le:Linux:*:*)
    echo powerpc64-unknown-linux-gnu
    exit ;;

after line 954 of the file superbuild/silo/src/config/config.guess

For the Mesa version of ParaView 5.8.0 (the OSMesa version does not need use this) it was necessary to modify file superbuild/paraview/src/Qt/Core/pqServerConfiguration.cxx
starting on line 216 changing this:
#if defined(__linux)
to this
#if defined(__linux__)
as it seems that __linux is a typo and it should have been linux.

These changes will allow compilation but should really be replaced with better detection routines,
and fixes for missing or broken functions.

  • 5.7.0

I have also succeeded in building the Mesa and OSmesa versions of ParaView version 5.7.0

It was again necessary again to add -Dmesa_USE_SWR=OFF to one’s cmake build script or otherwise Mesa and OSMesa will try to build with SWR which requires AVX.

I used these flags with the ParaView 5.7.0 superbuild script to build Python 2 for ParaView

-DENABLE_python3=OFF
-DENABLE_python=ON
-DUSE_SYSTEM_python=OFF

as I ran into an issue when attempting to build ffi in version 5.7.0 for Python 3

ffi was not detecting the system architecture of Power 9 in the file superbuild/ffi/src/config.guess. So, I attempted to correct it as follows. After line 913 adding:

ppc64le:Linux::)
echo powerpc64-unknown-linux-gnu
exit ;;

but, ffi still failed to build, with error ABI version 1 is not compatible with ABI version 2 output, so I disabled ffi with -DENABLE_ffi=OFF for 5.7.0 which also forced a switch to Python 2 as ffi is
required for Python 3 but not for Python 2.

I also had to disable boxlib for Paraview version 5.7.0 -DENABLE_boxlib=OFF as attempting to build boxlib failed with the error: "We do not yet support FAB I/O on this machine"

For Silo support it was necessary to add the lines

ppc64le:Linux:*:*)
    echo powerpc64-unknown-linux-gnu
    exit ;;

after line 954 of the file superbuild/silo/src/config/config.guess.

Again, for the Mesa version of ParaView 5.7.0 (the OSMesa version does not need use this)
it was necessary to modify file superbuild/paraview/src/Qt/Core/pqServerConfiguration.cxx
starting on line 216 changeing this
#if defined(__linux)
to this
#if defined(__linux__)
as it seems that __linux is a typo and it should have been linux.
So it seems this error has been around for awhile as the error effects versions
5.7.0 - 5.8.0 at least.

for xmdf3 support in the OSMesa version of ParaView 5.7.0 it was necessary to correct the file
install/lib/cmake/paraview-5.7/vtk/VTK-targets.cmake
by changing line 833 from
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/paraview-5.7/vtkxdfm3/core"
to
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/paraview-5.7/vtkxdmf3/core"
to fix what seems to be a typo.

Again, these changes will allow compilation but should really be replaced with better detection routines,
and fixes for missing or broken functions.

1 Like

Thanks @joeh. I took the liberty to edit and improve the formatting.

Also, I think some of these should be sourced back into ParaView.

Mathieu,

Thanks for improving the formatting, I agree that some of these fixes should be sourced back into ParaView. Others will take more effort to track down the underlying issues. But at least I have made some reasonable subsets of ParaView’s functionality available on the Power 9 Architecture.

Thanks,

Joe

1 Like

Joe,

Thanks for the detailed changes. For your ParaView 5.8 fixes, I have pushed the following changes:

Python’s master branch does not handle errono.EACCESS as far as I can tell (see here]. I don’t understand the change well enough to submit a patch to upstream Python.

Cory,

I have found that ParaView 5.8.1 builds much easier on the Power 9 Architecture with these changes pushed then ParaView 5.8.0 did without them.

Thanks,

Joe

Awesome, thanks for the feedback, Joe!