Giter Site home page Giter Site logo

[CI] setup macOS testing about dbcsr HOT 4 CLOSED

dev-zero avatar dev-zero commented on August 20, 2024
[CI] setup macOS testing

from dbcsr.

Comments (4)

dev-zero avatar dev-zero commented on August 20, 2024

PoC is here: https://github.com/dev-zero/dbcsr/tree/feature/ci-testing-scripts

Test failure on Mac: https://travis-ci.org/dev-zero/dbcsr/jobs/454047973
@alazzaro seems we actually have some strange things going on on macOS

from dbcsr.

alazzaro avatar alazzaro commented on August 20, 2024

I see several issues:

  1. ranlib warning: it seems we can avoid this message by doing https://stackoverflow.com/questions/44124219/what-does-library-has-no-symbol-mean

in particular:

https://stackoverflow.com/questions/32319369/how-can-i-pass-arguments-to-ranlib-using-cmake#answer-33067038

My understanding is that dbcsr_list.F is just an interface, it doesn't have internal symbols.

  1. I don't have any idea about the other problem:

Undefined symbols for architecture x86_64

Looks like we are linking to a wrong library...

  1. Failing tests: are you using Accelerate?

from dbcsr.

alazzaro avatar alazzaro commented on August 20, 2024

I have installed DBCSR (develop branch) on my Mac (High Sierra).
I have used brew to install gcc and mpich, plus Mac Command Line Developer Tools.

I noticed that gcc -v gives:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Therefore gcc is pointing to LLVM (while gcc is reachable via gcc-8). The gfortran is correct.

Finally, I have added

-D__NO_STATM_ACCESS

to the FCFLAGS. I use ACCELERATE library from MAC for LAPACK and BLAS.

I compile with make -j all (no cmake as a first test).

I get the warning

/Library/Developer/CommandLineTools/usr/bin/ranlib: file: /Users/alazzaro/Work/dbcsr/dbcsr-1.0.0-rc.1/lib/libdbcsr.a(dbcsr_list.o) has no symbols

which is harmless (see my previous post).

The make test gives error on the add test:

test_name add_1
residual 0.10842E-18, b_norm -0.00000E+00
a_norm_in 0.36893E+20, a_norm_out -0.20000E+01, a_norm_dbcsr -0.20000E+01
Checking the norm of the difference against reference ADD
-- ||A_dbcsr-A_dense||_oo/((||A||_oo+||B||_oo).N.eps)= Infinity
The solution is suspicious !


-- TESTING dbcsr_add ( 5 , N, N) ................. FAILED !


ABORT in dbcsr_test_add.F:366 Test failed

Therefore I have tried -D__ACCELERATE, as suggested by Iain. The compilation fails at

/Users/alazzaro/Work/dbcsr/dbcsr-1.0.0-rc.1/src/ops/dbcsr_operations.F:1991:26:

               nrm_s = SQRT(SDOT(SIZE(data_s), data_s(1), 1, data_s(1), 1))
                      1

Error: Possible change of value in conversion from REAL(8) to REAL(4) at (1) [-Werror=conversion]

I have changed (and committed) the code to make the explicit conversion. Now the make test works.

In summary, the changes to get the makefile to compile and pass the tests on MacOS are:

  1. remove -Werror=conversion
  2. add -D__NO_STATM_ACCESS -D__ACCELERATE

Now, the second problem you see in your CI is related to the compilation of the C++ example. I think the problem is due to what I mentioned before, namely mpicxx is pointing to LLVM instead of GNU.
For solving this problem I have set the variables

export HOMEBREW_CC=gcc-8
export HOMEBREW_CXX=g++-8

and called brew reinstall mpich --build-from-source to make sure mpich is pointing to the right compiler plus a bunch of symbolic links inside /usr/local/bin to make GNU v8 the default compiler in the path:

ln -s g++-8 g++
ln -s gcc-8 gcc
ln -s gcc-ar-8 gcc-ar
ln -s c++-8 c++
ln -s cpp-8 cpp
ln -s gcov-8 gcov

With the CXX example works fine. However, it seems that the problem is due to the Coverage linking (flag -fprofile-arcs -ftest-coverage), but I tried it too and it works.

Please, let me know if you get the CI to work with the MacOS

from dbcsr.

dev-zero avatar dev-zero commented on August 20, 2024

solved via #98

from dbcsr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.