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 clang testing in the CI. #43

Merged
merged 4 commits into from
Jul 27, 2017

Conversation

diaena
Copy link
Collaborator

@diaena diaena commented Jul 26, 2017

There will be subsequent commits. I do not know what else this changes requires yet as there is no way of triggering Travis before hand.

@diaena diaena requested a review from fpetrogalli July 26, 2017 13:32
@shibatch
Copy link
Owner

I don't fully understand your situation, but the check is failing because travis is trying to build on precise. You can just do checking on trusty.

@diaena
Copy link
Collaborator Author

diaena commented Jul 26, 2017

I understand it's failing because it's trying to build on Precise, but I don't understand why it's trying to build on Precise. I am specifically setting the distribution to "trusty" in the configuration file. And only two out of four jobs use the Precise instead of Trusty.

@diaena
Copy link
Collaborator Author

diaena commented Jul 26, 2017

Also, it there a reason for which we are using trusty in group: edge?

@shibatch
Copy link
Owner

The reason for specifying group:edge is that that was once required to build on Trusty. You don't need it anymore.
I am not an expert of travis, but I guess the reason why it is trying to build on Precise is that you specify include. The default build environment is still Precise.

Copy link
Owner

@shibatch shibatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry for confusion, but you should do testing on Trusty, not Precise. I think you need libgomp1 and libomp-dev. I don't know if clang is installed by default, but specifying it does not make any harm.

.travis.yml Outdated
- gcc
- clang

# Aditional testing on OSX with default compiler: should spawn one job
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

.travis.yml Outdated
- os: osx
env: COMPILER=clang
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this saying that we test on osx only with clang?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diaena Please carefully read the following page.
https://docs.travis-ci.com/user/languages/c/

Do you have Intel compiler installed at your environment?
Support for Intel compiler was added following requests from the users.
Even though they can use SVML, they still want to use SLEEF.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fpetrogalli-arm Sorry, no, that was just me trying to understand what the env does and what it affects.
@shibatch I think it is generally considered bad practice to specify commands (or install packages) if it's not required.

I will add gcc on OSX in my next patch, so we would test the following:

  • Sleef on Linux with gcc-v4.8.4 (default gcc on Trusty)
  • Sleef on Linux with clang-v3.5.0 (default clang on Trusty)
  • Sleef on OSX with Apple LLVM version 7.3.0 (clang-703.0.31) (default on OSX)
  • Sleef on OSC with gcc-6 (needs installing) -- Are we okay with using latest version?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a matter of preference, but I would tolerate small amount of deviance if it helps other things like ease of development.

gcc-4 has a problem with long double. clang earlier than v3.9 has problems with openmp.
gcc-6 should work without any problem.
gcc-7.1 doesn't compile DFT correctly. We need to remove -ffast-math for gcc-7.1.

@diaena diaena force-pushed the clang-on-travis branch 2 times, most recently from 1dd2227 to 99fe6c7 Compare July 27, 2017 09:43
@diaena
Copy link
Collaborator Author

diaena commented Jul 27, 2017

I know this has been approved, but I am not not yet merging it because I have double-checked and the OSX jobs are overwriting my CC variable and therefore both jobs build with Apple Clang. I am now trying to find a workaround this other Travis bug. It shouldn't be the case that the CC variable is re-exported after you evaluate the Matrix because the documentation specifically uses this as an example. I will submit another patch and hopefully this time we get the compilers we actually want to test.

@diaena
Copy link
Collaborator Author

diaena commented Jul 27, 2017

For reference, this is what I'm talking about:
image

And in this case, gcc is just a frontend for LLVM. The same is happening here:

image

@shibatch
Copy link
Owner

I don't know but can't you test that kind of things on your local environment?
Do you run cmake on your computer before testing on travis?

@diaena
Copy link
Collaborator Author

diaena commented Jul 27, 2017

Of course I do, but this is not related to cmake or SLEEF. This is Travis CI not selecting the compiler I am telling it to select.

@fpetrogalli
Copy link
Collaborator

It is not clear to me which compiler is being used from the logs... Maybe it is time to turn on VERBOSE=1 in the make libm-test invocation to see what is going on? To speed up things, you might want to turn off the testing and just run make VERBOSE=1 in this development branch.

@diaena
Copy link
Collaborator Author

diaena commented Jul 27, 2017

@fpetrogalli-arm To see the cmake configuration output, click on the arrow on line 1407 : https://travis-ci.org/shibatch/sleef/jobs/258097159

@diaena diaena merged commit fe73b34 into shibatch:cmake-transition Jul 27, 2017
@diaena diaena deleted the clang-on-travis branch July 27, 2017 14:15
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.

3 participants