Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Eigen3 as an optional alternative to Lapack #51

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

phcerdan
Copy link
Contributor

proxTV depends on either Eigen3 of Lapack
Add Eigen3 functions as alternative to lapack.

This should aid packaging proxTV for windows.
Even though Eigen3 is a lightweight and fast c++ linear algebra library,
a performance drop should be expected when compared with lapack,
but hasn't been quantified.
Neither any non-default, performance-increased option in Eigen3 has been tested.

The test show that proxTV is fast enough for 3D imaging processing,
which might suffice for a the majority of cases.

Add dummy test checking if linking works properly.

Add FindLAPACKE.cmake and export proxTVconfig.cmake.

FindLAPACKE.cmake is used to handle lapacke installations with no export targets.

Also complete the generation of proxTVconfig.cmake

Add a dummy project to test usage of proxTV from external project.

Add C Interface to Readme

Remove Foo_FOUND in the case FOO is REQUIRED

Update cmake required version to 3.5

This simplifies policy and version set up.

Require a modern lapacke and remove FIND_LAPACKE

This will look for a `lapacke-config.cmake`, that is generated since
lapacke version 3.6. And allow us to remove the buggy FIND_LAPACKE.

Add test for cmake in travis.

Restore FindLAPACKE.cmake

Because travis still uses ubuntu 14.04, with an old lapacke
which does not provide config.cmake.

Fix CMake

Added FindLAPACK
FindLAPACKE CONFIG is not populating LAPACK.

From @jcfr branch: https://github.com/jcfr/proxTV/tree/cmake_support_squashed

Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>

WIP: Avoid deploy in .travis

Also install cmake with pip (3.12)
Also use find_package(LAPACKE NOCONFIG) for old librart versions

Error:
```
+twine upload --repository-url https://test.pypi.org/legacy/ --username albarji dist/prox_tv-3.3.0-cp27-cp27mu-manylinux1_x86_64.whl
Enter your password:
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
```
Only two lapack functions are involved

cmake: Add compile definition depending on LAPACK/EIGEN

option: proxTV_USE_LAPACK (for consistency)
compile definition: PROXTV_USE_LAPACK

All instances of lapack calls have Eigen alternative

Working!
BUG: Add source_dir to include_directories

Fix cmake: remove installing config files in src/CMakeLists

Handled in top CMakelists.txt
@phcerdan phcerdan changed the title Add Eigen3 alternatives to Lapacke Add Eigen3 as an optional alternative to Lapacke Jan 15, 2019
@phcerdan phcerdan changed the title Add Eigen3 as an optional alternative to Lapacke Add Eigen3 as an optional alternative to Lapack Jan 15, 2019
@phcerdan
Copy link
Contributor Author

It uses the cmake_support branch introduced in #38

phcerdan and others added 3 commits April 9, 2019 13:13
Triggered when wrapping ITK

```bash
/usr/bin/ld: _deps/proxtv_fetch-build/src/libitkproxTV-5.0.a(lapackFunctionsWrap.cpp.o):
relocation R_X86_64_PC32 against symbol `_ZTVSt9bad_alloc@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
```
Using CXX_CMAKE_FLAGS+="-Wall -Wextra"
Plus Windows specific warnings
phcerdan and others added 8 commits April 11, 2019 14:59
COMP: OpenMP_CXX.lib does not exist with Visual Studio
_deps\proxtv_fetch-src\src\TVL1opt_tautstring.cpp(336): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
Note: LAMBDA_STEPS_TVLP is a a preprocessor definition set to 1.
This allows building proxTV with Eigen, when Eigen is an internal
target, instead of only allowing find_package(Eigen)

Closes
InsightSoftwareConsortium/ITKTotalVariation#21
with variables:
```cmake
proxTV_INSTALL_INCLUDE_DIR
proxTV_INSTALL_LIB_DIR
proxTV_INSTALL_BIN_DIR
proxTV_INSTALL_CMAKE_DIR
```

These variables where ignored, and other CACHE variables were
used.

`proxTV_INSTALL_CMAKE_DIR` was added with a default value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants