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

Update conda environments (Python 3.7 and 3.8) #409

Merged
merged 14 commits into from
May 8, 2020
Merged

Update conda environments (Python 3.7 and 3.8) #409

merged 14 commits into from
May 8, 2020

Conversation

bkpoon
Copy link
Member

@bkpoon bkpoon commented Nov 5, 2019

Test updated dependencies and add Python 3.7 (and maybe 3.8) support

List of changes

  1. Add cctbxlite environments (not yet enabled)
  2. Add pyside2, pyzmq and websocket-server for @Oeffner to cctbx environments
  3. Versioned conda environments for linux, macOS, and Windows for Python 2.7, 3.6, 3.7, and 3.8
  4. Updated CI build to build all versions of Python (12 builds)
    a) Windows
    b) CentOS 6
    c) macOS 10.14 (Xcode 11.3.1)
  5. Update Full build to build all versions of Python (40 builds)
    a) Windows
    b) CentOS 6, 7, 8
    c) Ubuntu 14.04, 16.04, 18.04 (will replace 14.04 with 20.04 when it's released later in April)
    d) macOS 10.14 Xcode 11.3.1 and 10.3, and macOS 10.15 Xcode 11.4
  6. Update Boost to 1.70 (source build), closes Boost 1.65: boost::python::numeric removed #70
    a) Match current version for conda
    b) Enables Python 3.7 and later support
    c) Enables support for latest versions of CUDA
  7. Bump macOS minimum deployment version from 10.7 to 10.9
    a) Match version for conda packages
  8. Add --python flag to bootstrap.py for selecting Python version
    a) Just passes argument to libtbx.install_conda
  9. scons moved into conda environment
  10. Add --no-boost-src flag to bootstrap.py to prevent downloading of Boost into modules during the update step.
  11. Add weekly builds of where -ffast-math (/fp:fast for Windows) is removed and -O0, -O1, -O2, and -O3 (/O1 and /O2 for Windows) are tested on the Full build (160 builds).

@Oeffner Can you double check the Windows builds are working for you?
@luc-j-bourhis @pcxod @Oeffner Are there any changes that you would like to the cctbxlite environments? Currently, these are the dependencies in cctbxlite

biopython
cython
docutils
future
ipython
libsvm
libsvm_py
matplotlib-base
mrcfile
nomkl
numpy
numpydoc
openblas
pillow
pip
psutil
pyopengl
pytest
reportlab
six
sphinx
wxpython
python.app # [osx]
py2app  # [osx]

We can probably cut down the number of dependencies for cctbxlite.

@bkpoon bkpoon force-pushed the newpy branch 5 times, most recently from d2034e0 to 588c797 Compare November 12, 2019 23:42
@bkpoon bkpoon force-pushed the newpy branch 6 times, most recently from e6386f0 to 03c96ad Compare November 20, 2019 23:56
@bkpoon bkpoon changed the title Update conda environments (Python 3.7 and maybe 3.8) Update conda environments (Python 3.7 and 3.8) Nov 21, 2019
@bkpoon bkpoon force-pushed the newpy branch 3 times, most recently from 9828ba1 to 5436f05 Compare November 24, 2019 22:03
@bkpoon bkpoon force-pushed the newpy branch 7 times, most recently from 018c86f to b0abfed Compare December 9, 2019 03:08
@bkpoon bkpoon force-pushed the newpy branch 5 times, most recently from dabbf68 to af6955e Compare December 14, 2019 02:36
@bkpoon bkpoon force-pushed the newpy branch 3 times, most recently from 2b01568 to 9d0b61c Compare January 21, 2020 23:33
@Oeffner
Copy link
Contributor

Oeffner commented Apr 17, 2020

Hi @bkpoon I just build this branch on my Windows10 workstation using VS2015 with the commandline
python3 bootstrap.py --builder=cctbx --nproc=10 --python3 --use_conda and it builds fine. But the cctbx.HKLviewer doesn't work as no stub file is created. So I added a change to bootstrap.py so that cctbx.HKLviewer works with the plain cctbx build. Committed in e520f19
The regression tests also seems to run fine:

  Tests run                    : 467
  Failures                     : 0
  Warnings (possible failures) : 0
  Known Failures (  8)         : 8
  Known Unstable (  2)         : 0
  Stderr output (discouraged)  : 10

See run_tests_parallel_zlog for full output.

Bootstrap success: tests

One detail that confused me was how to achieve a successful build of this branch. I ended up using the above command line and hitting the pause button on the keyboard as soon as the download of cctbx_project had completed so that I could manually switch branch from master to newpy. Then hit the return key to resume the boostrap build.

@bkpoon
Copy link
Member Author

bkpoon commented Apr 22, 2020

@Oeffner I don't normally download a completely new set of repositories. For this branch, since it changes dependencies, I'll make a symbolic link to an existing modules directory, check out the newpy branch in cctbx_project and the 1.70 branch in boost,and then run bootstrap.py with the base and build options.

python bootstrap.py base build --use-conda <extra options>

@pcxod
Copy link
Contributor

pcxod commented Apr 24, 2020

Hi @bkpoon , @luc-j-bourhis. I do not use conda for building cctbx for Olex2 - I rely on the old fashioned way that seems to have been working for a while bow. After getting the bundle (which is apparently missing on this page https://cctbx.github.io/installation.html#id3, but as I remember last time I got it with bootstrap), I typically use 'configure iotbx smtbx fast_linalg' and have to leave with the dependencies that come along them. But these are as close as a minimal set.

@Oeffner
Copy link
Contributor

Oeffner commented Apr 24, 2020

In porting python modules in our phaser repo to python3 I have encountered problems with the scitbx.suffixtree module. The regression test, cctbx_project\scitbx\suffixtree\test\tst_single.py, fails in a python3 build with lots of errors like OverflowError: Python int too large to convert to C long . The test passes fine in a python2 build.
@bkpoon, would you have any idea. I had a look at the output from the full cctbx regression test on windows with VS2015 of this branch and where it exercises this particular test it passes according to the log file. However, running the test manually from the command line with the environment from that build it still fails.

@bkpoon
Copy link
Member Author

bkpoon commented Apr 24, 2020

@Oeffner It's been failing on Windows, but shows up as a warning because of the stderr output. I looked briefly into it a while ago, but wasn't able find a fix. Also, the test is marked as an expected failure for newer versions of GCC. There is a segmentation fault. @gbunkoczi would know more about that code.

bkpoon referenced this pull request Apr 27, 2020
- Optimization changes lbfgs behavior in scitbx/lbfgs/tst_lbfgs_fem.py
- With the flag, minimization may take more steps than the fortran reference
bkpoon and others added 12 commits April 28, 2020 18:16
- Add Python 3.7 and 3.8 environments
- Add environments for cctbxlite
- Bulk update to latest versions
- Check self.use_conda against None
- scons is available as conda packages
- Use headers from https://github.com/chemeris/msinttypes
- Use commit 7636cabe55318824dc702d15b69711f5d7c30250, not the latest
- Stop Xcode 10.2.1 builds
- Add FLAGS parameter
- Set PYTHONLEGACYWINDOWSSTDIO for Windows tests
- This flags allows selection of a specific version of Python
- Just passes the argument to the --python flag of libtbx.install_conda.
- Removes the command-line flags for python3 and wxpython4
- Options still remain and python3 will be enabled for install_base_packages.py by using the --python flag with "36", "37", or "38" as arugments
- wxpython4 will be enabled by python3 or macOS >= 10.14
- Removes -ffast-math and tests -O0, -O1, -O2, and -O3 for linux and macOS
- Removes /fp:fast and tests /O1 and /O2 for Windows
- Add "MODULES" variable and "modules" parameter to select modules artifact name
- Change ubuntu-16.04 to ubuntu-latest

[skip ci]
@Anthchirp
Copy link
Member

I raised a question in our group meeting today: The next DIALS release is coming up in May. For planning purposes only - do you have a date in mind when you plan to merge this?

@bkpoon
Copy link
Member Author

bkpoon commented Apr 29, 2020

@Anthchirp How about next Friday, May 8th at 3 pm Pacific? I'll make the changes to just use the master branch of boost before merging.

I made the changes to remove the --python3 and --wxpython4 command-line options for bootstrap.py, but install_base_packages.py should still be able to build Python 3.7 and install wxPython 4. And I added a flag to not download the Boost source package. It's --no-boost-src, but the flag name can be changed. This flag will be useful for building conda packages where boost will come from conda-forge.

@pcxod @luc-j-bourhis I'll try to construct a minimal set of dependencies for the iotbx, smtbx, and fast_linalg modules. It may just be boost, numpy, six, and future. Maybe matplotlib-base for plotting. It'll be useful for building a cctbx-base conda package that is barebones and then the regular cctbx package with all the other useful options for general users. And for Olex2, since boost is in the modules directory, it may be possible to use any Python virtual environment and just use pip to install the other dependencies.

@Anthchirp
Copy link
Member

The suggested timestamp works well and leaves us plenty of time to iron out any potential issues before the release. Thank you!

@bkpoon bkpoon merged commit 9d71cd8 into master May 8, 2020
@bkpoon bkpoon deleted the newpy branch May 17, 2020 21:33
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.

Boost 1.65: boost::python::numeric removed
6 participants