Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,38 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-16.04", "ubuntu-18.04", "ubuntu-20.04", "macos-latest"]
compiler: [gcc-7, gcc-8, gcc-9, clang]
compiler: [gcc-7, gcc-9, gcc-10, clang]
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8"]
numpy-version: ["1.14", "1.16", "1.18"]
exclude:

# Only run with 'clang' on OSX
- os: "macos-latest"
compiler: gcc-7
- os: "macos-latest"
compiler: gcc-8
- os: "macos-latest"
compiler: gcc-9
- os: "macos-latest"
compiler: gcc-10

# Don't use 'clang' on linux
- os: "ubuntu-16.04"
compiler: clang
- os: "ubuntu-18.04"
compiler: clang
- os: "ubuntu-20.04"
compiler: clang
- os: "ubuntu-16.04"
compiler: clang

# only gcc-9 on 20.04
# only gcc-10 on 20.04
- os: "ubuntu-20.04"
compiler: gcc-7
compiler: gcc-9
- os: "ubuntu-20.04"
compiler: gcc-8
compiler: gcc-7

# only gcc-7 on 16.04
# only gcc-9 on 16.04
- os: "ubuntu-16.04"
compiler: gcc-8
compiler: gcc-7
- os: "ubuntu-16.04"
compiler: gcc-9
compiler: gcc-10

# python3.8 only on 20.04
- os: "ubuntu-16.04"
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Enhancements
------------
- In the theoretical VPF calculation (``theory.vpf``), the total volume of the random spheres can now exceed the volume of the sample [#238]
- Gridlink (the binning of particles into cells) now uses a parallel algorithm for the theory module [#239]
- Add detection of known-bad Cray hugepages library at NERSC [#246]

Bug fixes
---------
Expand Down
2 changes: 2 additions & 0 deletions Corrfunc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
from . import theory
from . import mocks

utils.check_runtime_env()


def read_text_file(filename, encoding="utf-8"):
"""
Expand Down
19 changes: 19 additions & 0 deletions Corrfunc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import sys
import os
import warnings
from os.path import exists as file_exists

import wurlitzer
from contextlib import contextmanager

Expand Down Expand Up @@ -1054,6 +1057,22 @@ def sys_pipes():
except:
yield


def check_runtime_env():
'''
Detect any computing environment conditions that may cause Corrfunc
to fail, and inform the user if there is any action they can take.
'''

# Check if Cray hugepages is enabled at NERSC, which will crash
# C Python extensions due to a hugepages bug
if 'NERSC_HOST' in os.environ and os.getenv('HUGETLB_DEFAULT_PAGE_SIZE'):
warnings.warn('Warning: Cray hugepages has a bug that may crash '
'Corrfunc. You might be able to fix such a crash with '
'`module unload craype-hugepages2M` (see '
'https://github.com/manodeep/Corrfunc/issues/245 '
'for details)')

if __name__ == '__main__':
import doctest
doctest.testmod()