GraphBLAS / LAGraph

This is a library plus a test harness for collecting algorithms that use the GraphBLAS. For test coverage reports, see https://graphblas.org/LAGraph/ . Documentation: https://lagraph.readthedocs.org
Other
229 stars 61 forks source link

Support OS X on Travis #76

Closed szarnyasg closed 4 years ago

szarnyasg commented 4 years ago

Based on @michelp's work in PR #73 and continuing the work of PR #70. The build now uses the -DGBCOMPACT flag, introduced in the latest SuiteSparse:GraphBLAS (after v3.2.0) which cuts compile time considerably.

In my fork, this branch compiled for both OS X (~10 minutes) and Ubuntu (~5 minutes). An important change is the addition of parentheses around CMPLX macros. When omitting these, the OS X build fails as follows:

image

szarnyasg commented 4 years ago

This is strange. On a separate branch, which is only ahead of master by a single commit, this works fine. Yet, when creating a PR, it fails and refers to code that has been fixed. E.g. it fails on line 300, citing the lack of parens which are in the code - see https://github.com/szarnyasg/LAGraph/blob/feature/travis-ci-linux-osx3/Test/Complex/complextest.c#L300

/Users/travis/build/GraphBLAS/LAGraph/LAGraph/Test/Complex/complextest.c:300:16: error: too many arguments provided to function-like macro invocation
    TEST_BINOP(LL, RR, LAGraph_MAX_ComplexFP64, RR);
               ^
/Users/travis/build/GraphBLAS/LAGraph/LAGraph/Test/Complex/complextest.c:133:12: note: expanded from macro 'LL'
#define LL CMPLX(1.0, 1.0)
           ^
/usr/include/complex.h:60:32: note: expanded from macro 'CMPLX'
    (double _Complex){(__real),(__imag)} \
                               ^
/Users/travis/build/GraphBLAS/LAGraph/LAGraph/Test/Complex/complextest.c:111:9: note: macro 'SET' defined here
#define SET(M, I, J, V)                         \
        ^
/Users/travis/build/GraphBLAS/LAGraph/LAGraph/Test/Complex/complextest.c:300:5: note: parentheses are required around macro argument containing braced initializer list
    TEST_BINOP(LL, RR, LAGraph_MAX_ComplexFP64, RR);
    ^
               (
/Users/travis/build/GraphBLAS/LAGraph/LAGraph/Test/Complex/complextest.c:138:5: note: expanded from macro 'TEST_BINOP'
    SET(A, 1, 1, L);                                        \
    ^
szarnyasg commented 4 years ago

I've found the culprit: using the $TRAVIS_REPO_SLUG environment variable in the Travis configuration caused an incorrect branch to be checked out, hence the weird error. I'm doing a few more tests, then, hopefully, marking this as ready to merge.