AvtechScientific / ASL

Advanced Simulation Library - hardware accelerated multiphysics simulation platform.
http://asl.org.il
GNU Affero General Public License v3.0
217 stars 55 forks source link

Update CMakeLists to newest vtk (>=7.0) #20

Closed arcan1s closed 8 years ago

arcan1s commented 8 years ago

First of all need to update version in module search because in other hand exception will arise. The second issue is the fact that vtkftgl component has been dropped (and seems is not required anymore by ASL).

AvtechScientific commented 8 years ago

Dear @arcan1s ,

Thank you very much for your patch! Just a few things to mention:

  1. Could you, please, provide the error output? Is there incompatibility of VTK6.1 and VTK7.0 and cmake produces errors or it builds and you get "exceptions" while running the binaries?

(Note: Merging your changes as they are will cut off all the guys on the conservative distros (Debian, CentOS, etc). In the case the issue is with incompatibility of VTK6.1 and VTK7.0 - could you, please, make them in the form: find_package(... 6.1 COMPONENTS...) ... if(NOT VTK_FOUND) find_package(...7.0 REQUIRED COMPONENTS...) endif()

Thank you!

arcan1s commented 8 years ago

Hi @AvtechScientific team,

Sure, here is cmake log:

-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - found
-- Found OpenCL: /usr/lib64/libOpenCL.so (found suitable version "2.0", minimum required is "1.1")
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   program_options
--   filesystem
--   system
CMake Warning at CMakeLists.txt:55 (find_package):
  Could not find a configuration file for package "VTK" that is compatible
  with requested version "6.1".

  The following configuration files were considered but not accepted:

    /usr/lib64/cmake/vtk-7.0/VTKConfig.cmake, version: 7.0.0
    /usr/lib/cmake/vtk-7.0/VTKConfig.cmake, version: 7.0.0
    /lib64/cmake/vtk-7.0/VTKConfig.cmake, version: 7.0.0
    /lib/cmake/vtk-7.0/VTKConfig.cmake, version: 7.0.0

CMake Error at CMakeLists.txt:56 (include):
  include called with wrong number of arguments.  include() only takes one
  file.

-- Found MATIO: /usr/lib64/libmatio.so (found suitable version "1.5.6", minimum required is "1.5.2")
-- Configuring incomplete, errors occurred!
See also "/home/arcanis/libasl/src/build/CMakeFiles/CMakeOutput.log".

Here is full CMakeOutput.log if you need.

Sorry, I didn't take care about old version support, I've updated the pr to check vtk twice. I've run test and no error occurs:

Running tests...
Test project /home/arcanis/libasl/src/build
      Start  1: testABDFormat
 1/10 Test  #1: testABDFormat ....................   Passed    0.64 sec
      Start  2: testVectorOfElements
 2/10 Test  #2: testVectorOfElements .............   Passed    0.76 sec
      Start  3: testMatrixOfElements
 3/10 Test  #3: testMatrixOfElements .............   Passed    0.66 sec
      Start  4: testKernel
 4/10 Test  #4: testKernel .......................   Passed    1.17 sec
      Start  5: testOperators
 5/10 Test  #5: testOperators ....................   Passed    0.48 sec
      Start  6: testKernelMerger
 6/10 Test  #6: testKernelMerger .................   Passed    0.35 sec
      Start  7: testPrivateVar
 7/10 Test  #7: testPrivateVar ...................   Passed   88.90 sec
      Start  8: testASLData
 8/10 Test  #8: testASLData ......................   Passed    0.66 sec
      Start  9: testDistanceFunction
 9/10 Test  #9: testDistanceFunction .............   Passed    3.16 sec
      Start 10: testReductionFunction
10/10 Test #10: testReductionFunction ............   Passed    1.49 sec

100% tests passed, 0 tests failed out of 10

Label Time Summary:
DoublePrecision    =   5.83 sec (3 tests)
Performance        =  88.90 sec (1 test)

Total Test time (real) =  98.27 sec
AvtechScientific commented 8 years ago

Thank you very much, @arcan1s, for the detailed info.

  1. Could you, please, update the second call of find_package to be: find_package(...7.0 REQUIRED COMPONENTS...). REQUIRED instead of QUIET, so cmake will not move on without any error message if both 6.1 and 7.0 versions are missing.
  2. Could you, please, follow the steps outlined bellow so we can accept your PR and credit your contribution: http://asl.org.il/copyright_assignment/ . While it looks like a bureaucratic formality - it is the only mechanism we have to enforce AGPL and thus protect ASL (including your contributions) from being exploited. This needs to be done only once for the first pull request.

Welcome to the ASL community!

arcan1s commented 8 years ago

Hi guys,

PR has been updated, and I've just sent you signed ASCA. Please feel free to ask me again if you will have some additional requests.

AvtechScientific commented 8 years ago

Премного благодарны!

opoplawski commented 7 years ago

I'm going to be wanting to update Fedora rawhide to vtk 7.1.0 when it is released. Would be nice to have this supported.