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

Test multiple PARI versions #31

Merged
merged 3 commits into from
Aug 22, 2017
Merged

Test multiple PARI versions #31

merged 3 commits into from
Aug 22, 2017

Conversation

jdemeyer
Copy link
Collaborator

@jdemeyer jdemeyer commented Aug 21, 2017

We should test:

  • PARI 2.8.1 (the oldest version supported)
  • PARI 2.9.3 (latest stable)
  • PARI master

@jdemeyer jdemeyer force-pushed the test_pari_versions branch 6 times, most recently from 5c687d6 to 5bdede8 Compare August 21, 2017 17:30
@jdemeyer jdemeyer changed the title [WIP] Test multiple PARI versions Test multiple PARI versions Aug 21, 2017
@jdemeyer
Copy link
Collaborator Author

@videlec Please review, it would be good to include this too in the next cypari2 release.

@videlec
Copy link
Collaborator

videlec commented Aug 21, 2017

What is the 2.8.beta version that is tested at https://travis-ci.org/defeo/cypari2/builds/266930844?

It would be better to do bash -x .travis-install-pari.sh to actually see the executed commands.

@videlec
Copy link
Collaborator

videlec commented Aug 21, 2017

travis is supporting caching: https://docs.travis-ci.com/user/caching/. Using it would significantly speed up pari download and compilation. Though I am not sure if a different cache is automatically used for each environment.

@jdemeyer
Copy link
Collaborator Author

What is the 2.8.beta version that is tested at https://travis-ci.org/defeo/cypari2/builds/266930844

Ask upstream, seriously. They have a strange version numbering scheme.

@jdemeyer
Copy link
Collaborator Author

Using it would significantly speed up pari download and compilation

For compilation, we could use ccache indeed.

For downloads, Travis CI documents that this is not the intended use of caching: https://docs.travis-ci.com/user/caching/#Things-not-to-cache

@jdemeyer jdemeyer force-pushed the test_pari_versions branch 6 times, most recently from 9e829e3 to 9f5e0d3 Compare August 22, 2017 08:22
@jdemeyer
Copy link
Collaborator Author

I tried to setup ccache, but I'm not entirely sure that it works. In any case, this shouldn't prevent this PR from being merged.

@jdemeyer jdemeyer force-pushed the test_pari_versions branch 2 times, most recently from 4d63e83 to b0c8210 Compare August 22, 2017 08:54
@videlec
Copy link
Collaborator

videlec commented Aug 22, 2017

It should work, though we won't notice a difference on the first build...

@videlec
Copy link
Collaborator

videlec commented Aug 22, 2017

It would be cleaner to have two environment variables PARI_VERSION PARI_URL instead of a if/else statement and a for loop in the script.

@jdemeyer
Copy link
Collaborator Author

It would be cleaner to have two environment variables PARI_VERSION PARI_URL instead of a if/else statement and a for loop in the script.

I don't know how you would do that, but feel free to implement it.

@jdemeyer
Copy link
Collaborator Author

Caching seems to work now.

@videlec
Copy link
Collaborator

videlec commented Aug 22, 2017

One good thing would actually be to activate ccache for PARI compilation but disable it for cypari2. These are big useless C and .so files that you do not want to keep.

@jdemeyer
Copy link
Collaborator Author

These are big useless C and .so files that you do not want to keep.

Why that? ccache can also speed up compilations of Cython-generated C files.

@videlec
Copy link
Collaborator

videlec commented Aug 22, 2017

I tried a simpler script version on the branch test_pari_versions-bis

@videlec
Copy link
Collaborator

videlec commented Aug 22, 2017

These are big useless C and .so files that you do not want to keep.

Why that? ccache can also speed up compilations of Cython-generated C files.

I was worried about the cache limit being set to 256M. With a quick du -sh

  • PARI is 187M
  • cypari2 is 41M

@videlec
Copy link
Collaborator

videlec commented Aug 22, 2017

In Travis, do you know why does $ pip install --verbose -r requirements.txt takes so long (~3 min)?

@jdemeyer
Copy link
Collaborator Author

In Travis, do you know why does $ pip install --verbose -r requirements.txt takes so long (~3 min)?

Cython takes a while to compile because it uses itself to compile itself to C. And cysignals also uses Cython, so it also needs to be compiled. But ccache should help here...

@jdemeyer
Copy link
Collaborator Author

I tried a simpler script version on the branch test_pari_versions-bis

See #32

@jdemeyer
Copy link
Collaborator Author

I was worried about the cache limit being set to 256M.

First of all, the limit can be changed. Second, it seems that the cache is only a bit over 100MB, so 256MB should be large enough.

@jdemeyer
Copy link
Collaborator Author

If Cython needs to be compiled then 256M is definitely a too low limit for ccache.

Why do you think so? Look at the build logs, you see something like

cache directory                     /home/travis/.ccache

cache hit (direct)                     0

cache hit (preprocessed)               0

cache miss                           170

called for link                       55

called for preprocessing               8

bad compiler arguments                 1

autoconf compile/link                  8

no input file                          5

files in cache                       205

cache size                         125.3 Mbytes

max cache size                     256.0 Mbytes

@jdemeyer
Copy link
Collaborator Author

I just realized that caching might not work properly with pip install because it uses a random temporary directory which changes every time. I'll try to fix this

See also https://ccache.samba.org/manual.html#_compiling_in_different_directories

@videlec
Copy link
Collaborator

videlec commented Aug 22, 2017

I just realized that caching might not work properly with pip install because it uses a random temporary directory which changes every time. I'll try to fix this

Don't the --build option of pip would settle that problem?

-b, --build <dir>           Directory to unpack packages into and build in.

@videlec
Copy link
Collaborator

videlec commented Aug 22, 2017

(not sure pypa/pip#4262)

@videlec
Copy link
Collaborator

videlec commented Aug 22, 2017

But travis does support pip cachig (https://docs.travis-ci.com/user/caching/)

language: python

cache: pip

@jdemeyer
Copy link
Collaborator Author

Don't the --build option of pip would settle that problem?

In theory, yes. In practice, it doesn't actually seem to work: pypa/pip#4242

@jdemeyer
Copy link
Collaborator Author

Hmm, the actual issue might be pypa/pip#804

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.

None yet

2 participants