m-reuter / arpackpp

Arpack++ with patches (C++ interface to ARPACK)
Other
61 stars 26 forks source link

Enable CMake testing #28

Closed wo80 closed 1 year ago

wo80 commented 1 year ago

This pull request enables testing features:

I compared the Github and Travis logs for the Mac OS build. Both use

I haven't enabled ctest on Travis, but using the default BLAS/LAPACK provider (Accelerate.framework) some tests on the Github workflow failed (see https://github.com/wo80/arpackpp/actions/runs/6453199699/job/17516350173). I had to explicitly specify BLA_VENDOR=OpenBLAS and CMAKE_PREFIX_PATH="/usr/local/opt/lapack;/usr/local/opt/openblas".

So in case you don't want to ditch the Travis job completely, it needs to be updated accordingly. Not sure what's the cause of the problem, though. Since I don't have a Mac, I cannot debug it.

wo80 commented 1 year ago

We might also want to get rid of file(GLOB ...) in the test setup. This would allow more control setting up the tests that rely on input test data (specifically the tests in the harwell folder).

m-reuter commented 1 year ago

Nice! Happy to get rid of Travis. Not sure what you mean about how getting rid of glob helps?

wo80 commented 1 year ago

CMake doesn't recommend using GLOB, see CMake docs, but since everything is working fine, I guess we can ignore that.

The problem with the Harwell examples (now that they are run as tests) is, that they require input data. Doing, for example,

file(GLOB harwell_complex harwell/complex/*.cc)

we get both hcompstd.cc and hcompgen.cc, but those two files require different command line arguments, so we cannot use GLOB here. I fixed that in the latest commits.

This should be ready to merge. I haven't removed the .travis.yml file. Please check if anything has to be done on the Travis side, first.