Skip to content

Commit 41c2680

Browse files
[bp] POSIX compliant poll.h and mmap (dmlc#10767) (dmlc#10890)
* [bp] POSIX compliant `poll.h` and `mmap` (dmlc#10767) * Freeze hypothesis. --------- Co-authored-by: Samuel Marks <[email protected]>
1 parent e36d361 commit 41c2680

File tree

10 files changed

+12
-12
lines changed

10 files changed

+12
-12
lines changed

rabit/include/rabit/internal/socket.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
#if !defined(_WIN32)
3737

38-
#include <sys/poll.h>
38+
#include <poll.h>
3939

4040
using SOCKET = int;
4141
using sock_size_t = size_t; // NOLINT

src/common/io.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#if defined(__unix__) || defined(__APPLE__)
1717
#include <fcntl.h> // for open, O_RDONLY
18-
#include <sys/mman.h> // for mmap, mmap64, munmap
18+
#include <sys/mman.h> // for mmap, munmap, madvise
1919
#include <unistd.h> // for close, getpagesize
2020
#elif defined(xgboost_IS_WIN)
2121
#define WIN32_LEAN_AND_MEAN
@@ -233,9 +233,9 @@ std::unique_ptr<MMAPFile> Open(std::string path, std::size_t offset, std::size_t
233233

234234
#if defined(__linux__) || defined(__GLIBC__)
235235
int prot{PROT_READ};
236-
ptr = reinterpret_cast<std::byte*>(mmap64(nullptr, view_size, prot, MAP_PRIVATE, fd, view_start));
237-
madvise(ptr, view_size, MADV_WILLNEED);
236+
ptr = reinterpret_cast<std::byte*>(mmap(nullptr, view_size, prot, MAP_PRIVATE, fd, view_start));
238237
CHECK_NE(ptr, MAP_FAILED) << "Failed to map: " << path << ". " << SystemErrorMsg();
238+
madvise(ptr, view_size, MADV_WILLNEED);
239239
auto handle =
240240
std::make_unique<MMAPFile>(fd, ptr, view_size, offset - view_start, std::move(path));
241241
#elif defined(xgboost_IS_WIN)

tests/ci_build/Dockerfile.gpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN \
2727
"nccl>=${NCCL_SHORT_VER}" \
2828
dask \
2929
dask-cuda=$RAPIDS_VERSION_ARG* dask-cudf=$RAPIDS_VERSION_ARG* cupy \
30-
numpy pytest pytest-timeout scipy scikit-learn pandas matplotlib wheel python-kubernetes urllib3 graphviz hypothesis \
30+
numpy pytest pytest-timeout scipy scikit-learn pandas matplotlib wheel python-kubernetes urllib3 graphviz "hypothesis<=6.112" \
3131
"pyspark>=3.4.0" cloudpickle cuda-python && \
3232
mamba clean --all && \
3333
conda run --no-capture-output -n gpu_test pip install buildkite-test-collector

tests/ci_build/conda_env/aarch64_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
- matplotlib
1515
- dask
1616
- distributed
17-
- hypothesis
17+
- hypothesis<=6.112
1818
- graphviz
1919
- python-graphviz
2020
- codecov

tests/ci_build/conda_env/linux_cpu_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies:
2020
- dask
2121
- distributed
2222
- python-graphviz
23-
- hypothesis>=6.46
23+
- hypothesis<=6.112
2424
- astroid
2525
- sh
2626
- mock

tests/ci_build/conda_env/linux_sycl_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies:
1313
- scipy
1414
- scikit-learn
1515
- pandas
16-
- hypothesis>=6.46
16+
- hypothesis<=6.112
1717
- pytest
1818
- pytest-timeout
1919
- pytest-cov

tests/ci_build/conda_env/macos_cpu_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies:
1818
- distributed
1919
- graphviz
2020
- python-graphviz
21-
- hypothesis
21+
- hypothesis<=6.112
2222
- astroid
2323
- sphinx
2424
- sh

tests/ci_build/conda_env/python_lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ dependencies:
1717
- isort
1818
- cloudpickle
1919
- pytest
20-
- hypothesis
20+
- hypothesis<=6.112
2121
- hatchling
2222
- pyspark>=3.4.0

tests/ci_build/conda_env/win64_cpu_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
- python-graphviz
1515
- pytest
1616
- jsonschema
17-
- hypothesis
17+
- hypothesis<=6.112
1818
- python-graphviz
1919
- pip
2020
- py-ubjson

tests/ci_build/conda_env/win64_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
- pandas
1111
- pytest
1212
- boto3
13-
- hypothesis
13+
- hypothesis<=6.112
1414
- jsonschema
1515
- cupy
1616
- python-graphviz

0 commit comments

Comments
 (0)