scisoftdev-tmp-HiPOP 1.0.7__tar.gz → 1.0.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/.github/workflows/ci.yaml +7 -2
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/.github/workflows/deploy.yaml +0 -2
- scisoftdev_tmp_hipop-1.0.10/PKG-INFO +145 -0
- scisoftdev_tmp_hipop-1.0.10/README.md +117 -0
- scisoftdev_tmp_hipop-1.0.10/VERSION.txt +1 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/src/shortest_path.cpp +7 -18
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/pyproject.toml +21 -12
- scisoftdev_tmp_hipop-1.0.10/python/hipop/shortest_path.py +68 -0
- scisoftdev_tmp_hipop-1.0.7/PKG-INFO +0 -80
- scisoftdev_tmp_hipop-1.0.7/README.md +0 -53
- scisoftdev_tmp_hipop-1.0.7/VERSION.txt +0 -1
- scisoftdev_tmp_hipop-1.0.7/python/hipop/shortest_path.py +0 -1
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/.gitignore +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/CMakeLists.txt +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/LICENSE +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/conda/env.yaml +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/CMakeLists.txt +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/cmake/HipopConfig.cmake.in +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/examples/CMakeLists.txt +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/examples/ParallelKShortestPath.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/include/hipop/create.h +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/include/hipop/graph.h +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/include/hipop/shortest_path.h +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/src/create.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/src/graph.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/CMakeLists.txt +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/helpers.h +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testCopyGraph.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testDijkstra1.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testDijkstra2.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testGraph.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testGraphMerge.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testKShortestPath.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testManhattan.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testYenKShortestPath.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testparallelKShortestPath.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/pytest.toml +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/CMakeLists.txt +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/examples/UpdateCosts.py +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/examples/ksp.py +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/examples/merge.py +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/examples/test.py +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/hipop/__init__.py.template +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/hipop/cpp/graph.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/hipop/cpp/main.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/hipop/cpp/shortest_path.cpp +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/hipop/graph.py +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/hipop/render.py +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/tests/test_Graph.py +0 -0
- {scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/tests/test_VersionConsistency.py +0 -0
|
@@ -7,10 +7,12 @@ on:
|
|
|
7
7
|
pull_request:
|
|
8
8
|
branches:
|
|
9
9
|
- main
|
|
10
|
+
workflow_dispatch: # Manual trigger
|
|
10
11
|
|
|
11
12
|
jobs:
|
|
12
13
|
build-and-test:
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
name: Build & test (py ${{ matrix.python-version }} on ${{ matrix.os }})
|
|
14
16
|
runs-on: ${{ matrix.os }}
|
|
15
17
|
|
|
16
18
|
strategy:
|
|
@@ -20,13 +22,16 @@ jobs:
|
|
|
20
22
|
- ubuntu-latest # Arch: x64
|
|
21
23
|
- windows-latest # Arch: x64
|
|
22
24
|
- macos-latest # Arch: arm64
|
|
25
|
+
python-version:
|
|
26
|
+
- '3.10' # Oldest supported version (must be kept consistent with the classifiers in `pyproject.toml`).
|
|
27
|
+
- '3.14' # Most recent supported version (must be kept consistent with the classifiers in `pyproject.toml`).
|
|
23
28
|
|
|
24
29
|
steps:
|
|
25
30
|
- uses: actions/checkout@v7
|
|
26
31
|
|
|
27
32
|
- uses: actions/setup-python@v7
|
|
28
33
|
with:
|
|
29
|
-
python-version:
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
30
35
|
|
|
31
36
|
- name: Install OpenMP (macOS only)
|
|
32
37
|
if: runner.os == 'macOS'
|
|
@@ -4,7 +4,6 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
tags:
|
|
6
6
|
- 'v*.*.*' # Trigger on version tags like v1.2.3
|
|
7
|
-
# TODO define the trigger with EMobLab once the workflow is stable
|
|
8
7
|
|
|
9
8
|
jobs:
|
|
10
9
|
|
|
@@ -88,7 +87,6 @@ jobs:
|
|
|
88
87
|
- check-version
|
|
89
88
|
- build-wheels
|
|
90
89
|
- build-sdist
|
|
91
|
-
# TODO keep? if: github.event_name == 'release'
|
|
92
90
|
|
|
93
91
|
environment:
|
|
94
92
|
name: pypi-env
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scisoftdev-tmp-HiPOP
|
|
3
|
+
Version: 1.0.10
|
|
4
|
+
Summary: High Performance Optimal Path module
|
|
5
|
+
Keywords: graph,graph-theory,shortest-path,dijkstra
|
|
6
|
+
License-Expression: LGPL-3.0-only
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Operating System :: MacOS
|
|
12
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: C++
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Project-URL: Repository, https://github.com/EMob-Lab/HiPOP
|
|
25
|
+
Project-URL: Issues, https://github.com/EMob-Lab/HiPOP/issues
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# HiPOP
|
|
30
|
+
|
|
31
|
+
High Performance Optimal Path module
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Description
|
|
35
|
+
|
|
36
|
+
HiPOP is the C++ graph library used by [MnMS](https://github.com/EMob-Lab/MnMS.git).
|
|
37
|
+
It is composed of:
|
|
38
|
+
- a C++ core library implementing a graph data-structure and several shortest path search algorithms,
|
|
39
|
+
- a Python wrapper exposing the C++ classes and functions to the Python world.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Install HiPOP
|
|
43
|
+
|
|
44
|
+
### Install prebuilt distribution
|
|
45
|
+
|
|
46
|
+
This is the recommended (and most simple!) method to install HiPOP:
|
|
47
|
+
a prebuilt distribution adapted to your Python version and OS / system architecture
|
|
48
|
+
is downloaded from [PyPI](https://pypi.org/project/scisoftdev-tmp-HiPOP).
|
|
49
|
+
|
|
50
|
+
```shell
|
|
51
|
+
pip install scisoftdev-tmp-HiPOP # TODO change package name (and links in the whole page)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This installation method requires your OS / system architecture to be one of these:
|
|
55
|
+
- Windows on x86_64 architecture (i.e. Intel/AMD CPU)
|
|
56
|
+
- Linux on x86_64 architecture (i.e. Intel/AMD CPU)
|
|
57
|
+
- MacOS (≥ 14 Sonoma) on ARM64 architecture (i.e. Apple M* CPU)
|
|
58
|
+
|
|
59
|
+
The exact list of prebuilt distributions is available on
|
|
60
|
+
https://pypi.org/project/scisoftdev-tmp-HiPOP/#files.
|
|
61
|
+
If none of them matches your environment, please contact the package maintainers,
|
|
62
|
+
or try the local build installation method.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Install from local build
|
|
66
|
+
|
|
67
|
+
This method requires the following components to be available on your system:
|
|
68
|
+
|
|
69
|
+
- C++ compiler that supports C++17 and [OpenMP](https://www.openmp.org/)
|
|
70
|
+
- [CMake](https://cmake.org/)
|
|
71
|
+
|
|
72
|
+
Then, here is the local build install procedure:
|
|
73
|
+
|
|
74
|
+
1. Download the latest HiPOP sources from https://github.com/EMob-Lab/HiPOP/archive/refs/heads/main.zip
|
|
75
|
+
or by cloning the git repository:
|
|
76
|
+
```shell
|
|
77
|
+
git clone https://github.com/EMob-Lab/HiPOP.git
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
2. From the root directory of the HiPOP sources:
|
|
81
|
+
```shell
|
|
82
|
+
pip install .
|
|
83
|
+
|
|
84
|
+
# Optionally, to run the tests:
|
|
85
|
+
pip install --group dev
|
|
86
|
+
pytest
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Remarks:
|
|
90
|
+
|
|
91
|
+
- The `--group <group-name>` option requires pip ≥ 25.1. If you have an older version,
|
|
92
|
+
the install command above will fail with an error message such as `no such option: --group`.
|
|
93
|
+
In this case, try to upgrade pip beforehand with:
|
|
94
|
+
```shell
|
|
95
|
+
pip install --upgrade pip
|
|
96
|
+
```
|
|
97
|
+
Alternatively, install the test runner `pytest` manually (or skip the optional test running step).
|
|
98
|
+
|
|
99
|
+
- Editable install mode can be used. The install command then becomes:
|
|
100
|
+
```shell
|
|
101
|
+
pip install --group dev --editable .
|
|
102
|
+
```
|
|
103
|
+
Please note that using the `--group dev` option (or equivalent, to install the dev dependencies)
|
|
104
|
+
is mandatory for HiPOP editable installs.
|
|
105
|
+
|
|
106
|
+
- If you don't have the prerequisite C++/OpenMP/CMake components available on your system,
|
|
107
|
+
but you have [Conda](https://docs.conda.io/) available, a Conda environment with these components
|
|
108
|
+
is provided with the HiPOP sources. Install and activate it with:
|
|
109
|
+
```shell
|
|
110
|
+
conda create -f conda/env.yaml
|
|
111
|
+
conda activate hipop-dev
|
|
112
|
+
```
|
|
113
|
+
Please note that the use of this Conda environment is optional. HiPOP can be used with regular
|
|
114
|
+
(non-Conda) set-ups.
|
|
115
|
+
|
|
116
|
+
- If you are using MacOS and the Apple Clang C++ compiler, please note that OpenMP
|
|
117
|
+
may not be available by default. You may install it with:
|
|
118
|
+
```shell
|
|
119
|
+
brew install libomp
|
|
120
|
+
OpenMP_ROOT=$(brew --prefix libomp)
|
|
121
|
+
```
|
|
122
|
+
Alternatively, you may also use the Conda environment provided with the HiPOP sources
|
|
123
|
+
(cf. previous remark).
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Install the C++ core library only (from local build)
|
|
127
|
+
|
|
128
|
+
This installation procedure allows you to build locally and install only the HiPOP C++ core library.
|
|
129
|
+
The Python wrapper is neither built nor installed here.
|
|
130
|
+
This procedure is intended for advanced users.
|
|
131
|
+
|
|
132
|
+
For this procedure, same requirements as mentioned in the previous section
|
|
133
|
+
in terms of C++/OpenMP/CMake components.
|
|
134
|
+
However, you don't need to have Python installed on your system.
|
|
135
|
+
|
|
136
|
+
Then, from the root directory of the HiPOP sources:
|
|
137
|
+
```shell
|
|
138
|
+
mkdir build
|
|
139
|
+
cd build
|
|
140
|
+
cmake .. -DCMAKE_INSTALL_PREFIX=<install-directory>
|
|
141
|
+
make
|
|
142
|
+
make test # Optionally, to run the tests
|
|
143
|
+
make install
|
|
144
|
+
```
|
|
145
|
+
... where `<install-directory>` is the path to the location where you want to install HiPOP.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# HiPOP
|
|
2
|
+
|
|
3
|
+
High Performance Optimal Path module
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Description
|
|
7
|
+
|
|
8
|
+
HiPOP is the C++ graph library used by [MnMS](https://github.com/EMob-Lab/MnMS.git).
|
|
9
|
+
It is composed of:
|
|
10
|
+
- a C++ core library implementing a graph data-structure and several shortest path search algorithms,
|
|
11
|
+
- a Python wrapper exposing the C++ classes and functions to the Python world.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Install HiPOP
|
|
15
|
+
|
|
16
|
+
### Install prebuilt distribution
|
|
17
|
+
|
|
18
|
+
This is the recommended (and most simple!) method to install HiPOP:
|
|
19
|
+
a prebuilt distribution adapted to your Python version and OS / system architecture
|
|
20
|
+
is downloaded from [PyPI](https://pypi.org/project/scisoftdev-tmp-HiPOP).
|
|
21
|
+
|
|
22
|
+
```shell
|
|
23
|
+
pip install scisoftdev-tmp-HiPOP # TODO change package name (and links in the whole page)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This installation method requires your OS / system architecture to be one of these:
|
|
27
|
+
- Windows on x86_64 architecture (i.e. Intel/AMD CPU)
|
|
28
|
+
- Linux on x86_64 architecture (i.e. Intel/AMD CPU)
|
|
29
|
+
- MacOS (≥ 14 Sonoma) on ARM64 architecture (i.e. Apple M* CPU)
|
|
30
|
+
|
|
31
|
+
The exact list of prebuilt distributions is available on
|
|
32
|
+
https://pypi.org/project/scisoftdev-tmp-HiPOP/#files.
|
|
33
|
+
If none of them matches your environment, please contact the package maintainers,
|
|
34
|
+
or try the local build installation method.
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Install from local build
|
|
38
|
+
|
|
39
|
+
This method requires the following components to be available on your system:
|
|
40
|
+
|
|
41
|
+
- C++ compiler that supports C++17 and [OpenMP](https://www.openmp.org/)
|
|
42
|
+
- [CMake](https://cmake.org/)
|
|
43
|
+
|
|
44
|
+
Then, here is the local build install procedure:
|
|
45
|
+
|
|
46
|
+
1. Download the latest HiPOP sources from https://github.com/EMob-Lab/HiPOP/archive/refs/heads/main.zip
|
|
47
|
+
or by cloning the git repository:
|
|
48
|
+
```shell
|
|
49
|
+
git clone https://github.com/EMob-Lab/HiPOP.git
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
2. From the root directory of the HiPOP sources:
|
|
53
|
+
```shell
|
|
54
|
+
pip install .
|
|
55
|
+
|
|
56
|
+
# Optionally, to run the tests:
|
|
57
|
+
pip install --group dev
|
|
58
|
+
pytest
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Remarks:
|
|
62
|
+
|
|
63
|
+
- The `--group <group-name>` option requires pip ≥ 25.1. If you have an older version,
|
|
64
|
+
the install command above will fail with an error message such as `no such option: --group`.
|
|
65
|
+
In this case, try to upgrade pip beforehand with:
|
|
66
|
+
```shell
|
|
67
|
+
pip install --upgrade pip
|
|
68
|
+
```
|
|
69
|
+
Alternatively, install the test runner `pytest` manually (or skip the optional test running step).
|
|
70
|
+
|
|
71
|
+
- Editable install mode can be used. The install command then becomes:
|
|
72
|
+
```shell
|
|
73
|
+
pip install --group dev --editable .
|
|
74
|
+
```
|
|
75
|
+
Please note that using the `--group dev` option (or equivalent, to install the dev dependencies)
|
|
76
|
+
is mandatory for HiPOP editable installs.
|
|
77
|
+
|
|
78
|
+
- If you don't have the prerequisite C++/OpenMP/CMake components available on your system,
|
|
79
|
+
but you have [Conda](https://docs.conda.io/) available, a Conda environment with these components
|
|
80
|
+
is provided with the HiPOP sources. Install and activate it with:
|
|
81
|
+
```shell
|
|
82
|
+
conda create -f conda/env.yaml
|
|
83
|
+
conda activate hipop-dev
|
|
84
|
+
```
|
|
85
|
+
Please note that the use of this Conda environment is optional. HiPOP can be used with regular
|
|
86
|
+
(non-Conda) set-ups.
|
|
87
|
+
|
|
88
|
+
- If you are using MacOS and the Apple Clang C++ compiler, please note that OpenMP
|
|
89
|
+
may not be available by default. You may install it with:
|
|
90
|
+
```shell
|
|
91
|
+
brew install libomp
|
|
92
|
+
OpenMP_ROOT=$(brew --prefix libomp)
|
|
93
|
+
```
|
|
94
|
+
Alternatively, you may also use the Conda environment provided with the HiPOP sources
|
|
95
|
+
(cf. previous remark).
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Install the C++ core library only (from local build)
|
|
99
|
+
|
|
100
|
+
This installation procedure allows you to build locally and install only the HiPOP C++ core library.
|
|
101
|
+
The Python wrapper is neither built nor installed here.
|
|
102
|
+
This procedure is intended for advanced users.
|
|
103
|
+
|
|
104
|
+
For this procedure, same requirements as mentioned in the previous section
|
|
105
|
+
in terms of C++/OpenMP/CMake components.
|
|
106
|
+
However, you don't need to have Python installed on your system.
|
|
107
|
+
|
|
108
|
+
Then, from the root directory of the HiPOP sources:
|
|
109
|
+
```shell
|
|
110
|
+
mkdir build
|
|
111
|
+
cd build
|
|
112
|
+
cmake .. -DCMAKE_INSTALL_PREFIX=<install-directory>
|
|
113
|
+
make
|
|
114
|
+
make test # Optionally, to run the tests
|
|
115
|
+
make install
|
|
116
|
+
```
|
|
117
|
+
... where `<install-directory>` is the path to the location where you want to install HiPOP.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.10
|
|
@@ -381,12 +381,10 @@ namespace hipop
|
|
|
381
381
|
std::vector<std::string> origins,
|
|
382
382
|
std::vector<std::string> destinations,
|
|
383
383
|
std::vector<std::unordered_map<std::string, std::string> > vecMapLabelCosts,
|
|
384
|
-
std::string cost,
|
|
385
|
-
int
|
|
384
|
+
std::string cost,
|
|
385
|
+
int,
|
|
386
386
|
std::vector<setstring> vecAvailableLabels)
|
|
387
387
|
{
|
|
388
|
-
omp_set_num_threads(threadNumber);
|
|
389
|
-
|
|
390
388
|
int nbPath = origins.size();
|
|
391
389
|
std::vector<int> emptyV;
|
|
392
390
|
std::vector<int> uniqueIndices;
|
|
@@ -436,11 +434,9 @@ namespace hipop
|
|
|
436
434
|
std::vector<std::string> origins,
|
|
437
435
|
std::vector<std::unordered_map<std::string, std::string> > vecMapLabelCosts,
|
|
438
436
|
std::string cost,
|
|
439
|
-
int
|
|
437
|
+
int,
|
|
440
438
|
std::vector<setstring> vecAvailableLabels)
|
|
441
439
|
{
|
|
442
|
-
omp_set_num_threads(threadNumber);
|
|
443
|
-
|
|
444
440
|
int nbSPTs = origins.size();
|
|
445
441
|
std::vector<ShortestPathsTree> res(nbSPTs);
|
|
446
442
|
|
|
@@ -478,11 +474,9 @@ namespace hipop
|
|
|
478
474
|
std::vector<std::string> destinations,
|
|
479
475
|
std::vector<std::unordered_map<std::string, std::string> > vecMapLabelCosts,
|
|
480
476
|
std::vector<std::string> costs,
|
|
481
|
-
int
|
|
477
|
+
int,
|
|
482
478
|
std::vector<setstring> vecAvailableLabels)
|
|
483
479
|
{
|
|
484
|
-
omp_set_num_threads(threadNumber);
|
|
485
|
-
|
|
486
480
|
std::vector<int> emptyV;
|
|
487
481
|
std::vector<int> uniqueIndices;
|
|
488
482
|
std::unordered_map<int, int> duplicateIndices;
|
|
@@ -704,9 +698,8 @@ namespace hipop
|
|
|
704
698
|
const std::vector<std::vector<std::vector<std::string>>> &paths,
|
|
705
699
|
const std::string &cost,
|
|
706
700
|
const std::unordered_map<std::string, std::string> mapLabelCost,
|
|
707
|
-
int
|
|
701
|
+
int)
|
|
708
702
|
{
|
|
709
|
-
omp_set_num_threads(threadNumber);
|
|
710
703
|
int nbBatches = paths.size();
|
|
711
704
|
|
|
712
705
|
std::vector<std::vector<double>> res(nbBatches);
|
|
@@ -1106,10 +1099,8 @@ namespace hipop
|
|
|
1106
1099
|
double costMultiplier,
|
|
1107
1100
|
int maxRetry,
|
|
1108
1101
|
const std::vector<int> &kPaths,
|
|
1109
|
-
int
|
|
1102
|
+
int)
|
|
1110
1103
|
{
|
|
1111
|
-
omp_set_num_threads(threadNumber);
|
|
1112
|
-
|
|
1113
1104
|
int nbODs = origins.size();
|
|
1114
1105
|
std::vector<std::vector<pathCost>> res(nbODs);
|
|
1115
1106
|
OrientedGraph *privateG;
|
|
@@ -1317,7 +1308,7 @@ namespace hipop
|
|
|
1317
1308
|
std::vector<std::string> destinations,
|
|
1318
1309
|
std::vector<std::unordered_map<std::string, std::string> > vecMapLabelCosts,
|
|
1319
1310
|
std::string cost,
|
|
1320
|
-
int
|
|
1311
|
+
int,
|
|
1321
1312
|
std::pair<std::unordered_set<std::string>, std::unordered_set<std::string>> pairMandatoryLabels,
|
|
1322
1313
|
double maxDiffCost,
|
|
1323
1314
|
double maxDistInCommon,
|
|
@@ -1447,8 +1438,6 @@ namespace hipop
|
|
|
1447
1438
|
}
|
|
1448
1439
|
|
|
1449
1440
|
// Launch dijkstra algo for each OD in parallel
|
|
1450
|
-
omp_set_num_threads(threadNumber);
|
|
1451
|
-
|
|
1452
1441
|
int nbOD = origins.size();
|
|
1453
1442
|
std::vector<std::vector<pathCost>> res(nbOD);
|
|
1454
1443
|
|
|
@@ -17,18 +17,19 @@ classifiers = [
|
|
|
17
17
|
"Development Status :: 5 - Production/Stable",
|
|
18
18
|
"Intended Audience :: Developers",
|
|
19
19
|
"Intended Audience :: Science/Research",
|
|
20
|
-
"
|
|
20
|
+
"Operating System :: MacOS",
|
|
21
|
+
"Operating System :: Microsoft :: Windows",
|
|
22
|
+
"Operating System :: POSIX :: Linux",
|
|
21
23
|
"Programming Language :: C++",
|
|
22
24
|
"Programming Language :: Python :: 3",
|
|
23
|
-
"Programming Language :: Python :: 3
|
|
25
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
26
|
+
"Programming Language :: Python :: 3.10", # Oldest supported version (must be kept consistent with `ci.yaml`).
|
|
24
27
|
"Programming Language :: Python :: 3.11",
|
|
25
28
|
"Programming Language :: Python :: 3.12",
|
|
26
29
|
"Programming Language :: Python :: 3.13",
|
|
27
|
-
"Programming Language :: Python :: 3.14",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"Operating System :: Microsoft :: Windows",
|
|
31
|
-
"Operating System :: POSIX :: Linux",
|
|
30
|
+
"Programming Language :: Python :: 3.14", # Most recent supported version (must be kept consistent with `ci.yaml`).
|
|
31
|
+
"Topic :: Scientific/Engineering",
|
|
32
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
32
33
|
]
|
|
33
34
|
|
|
34
35
|
[project.urls]
|
|
@@ -36,12 +37,12 @@ Repository = "https://github.com/EMob-Lab/HiPOP"
|
|
|
36
37
|
Issues = "https://github.com/EMob-Lab/HiPOP/issues"
|
|
37
38
|
|
|
38
39
|
[dependency-groups]
|
|
39
|
-
build = [ # Dependencies needed for build tasks. Must be
|
|
40
|
+
build = [ # Dependencies needed for build tasks. Must be kept identical to "build-system".requires
|
|
40
41
|
"dynamic-metadata >= 0.5",
|
|
41
42
|
"pybind11 >= 3.1",
|
|
42
43
|
"scikit-build-core >= 1.0",
|
|
43
44
|
]
|
|
44
|
-
test = [ # Dependencies needed for test tasks. Must be
|
|
45
|
+
test = [ # Dependencies needed for test tasks. Must be kept identical to tool.cibuildwheel."test-requires"
|
|
45
46
|
"pytest >= 9.1",
|
|
46
47
|
]
|
|
47
48
|
dev = [ # All dependencies needed for development tasks.
|
|
@@ -53,8 +54,12 @@ distrib = [ # Dependencies needed to build distribution files (wheels & source d
|
|
|
53
54
|
"cibuildwheel >= 4.2",
|
|
54
55
|
]
|
|
55
56
|
|
|
57
|
+
|
|
58
|
+
# ------------------------------------------------------------------------------
|
|
59
|
+
# Configuration of the build
|
|
60
|
+
|
|
56
61
|
[build-system]
|
|
57
|
-
requires = [ # Must be
|
|
62
|
+
requires = [ # Must be kept identical to "dependency-groups".build
|
|
58
63
|
"dynamic-metadata >= 0.5",
|
|
59
64
|
"pybind11 >= 3.1",
|
|
60
65
|
"scikit-build-core >= 1.0",
|
|
@@ -85,8 +90,12 @@ HIPOP_WITH_EXAMPLES = "OFF"
|
|
|
85
90
|
path = "hipop/__init__.py"
|
|
86
91
|
template-path = "python/hipop/__init__.py.template"
|
|
87
92
|
|
|
93
|
+
|
|
94
|
+
# ------------------------------------------------------------------------------
|
|
95
|
+
# Configuration of distribution file generation wheels & source distributions)
|
|
96
|
+
|
|
88
97
|
[tool.cibuildwheel]
|
|
89
|
-
build = [
|
|
98
|
+
build = [
|
|
90
99
|
"*-manylinux_x86_64",
|
|
91
100
|
"*-win_amd64",
|
|
92
101
|
"*-macosx_arm64",
|
|
@@ -94,7 +103,7 @@ build = [ # Build Linux + Win for x64, and MacOS for ARM64. TODO is it enough?
|
|
|
94
103
|
skip = [
|
|
95
104
|
"cp3??t-*", # Free-threaded standard interpreter (https://docs.python.org/3/glossary.html#term-free-threading).
|
|
96
105
|
]
|
|
97
|
-
test-requires = [ # Must be
|
|
106
|
+
test-requires = [ # Must be kept identical to "dependency-groups".test
|
|
98
107
|
"pytest >= 9.1",
|
|
99
108
|
]
|
|
100
109
|
test-command = "pytest {project}"
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import functools
|
|
2
|
+
import time
|
|
3
|
+
|
|
4
|
+
from hipop.cpp.shortest_path import (
|
|
5
|
+
dijkstra,
|
|
6
|
+
dijkstra_single_source,
|
|
7
|
+
floyd_warshall,
|
|
8
|
+
parallel_dijkstra,
|
|
9
|
+
parallel_dijkstra_single_source,
|
|
10
|
+
parallel_dijkstra_heterogeneous_costs,
|
|
11
|
+
parallel_k_intermodal_shortest_path,
|
|
12
|
+
k_shortest_path,
|
|
13
|
+
parallel_k_shortest_path,
|
|
14
|
+
astar_euclidian_dist,
|
|
15
|
+
compute_path_length,
|
|
16
|
+
compute_path_cost,
|
|
17
|
+
compute_paths_costs,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
_EXPORTED_FUNCTIONS = (
|
|
21
|
+
"dijkstra",
|
|
22
|
+
"dijkstra_single_source",
|
|
23
|
+
"floyd_warshall",
|
|
24
|
+
"parallel_dijkstra",
|
|
25
|
+
"parallel_dijkstra_single_source",
|
|
26
|
+
"parallel_dijkstra_heterogeneous_costs",
|
|
27
|
+
"parallel_k_intermodal_shortest_path",
|
|
28
|
+
"k_shortest_path",
|
|
29
|
+
"parallel_k_shortest_path",
|
|
30
|
+
"astar_euclidian_dist",
|
|
31
|
+
"compute_path_length",
|
|
32
|
+
"compute_path_cost",
|
|
33
|
+
"compute_paths_costs",
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
_stats = {name: {"calls": 0, "total_time": 0.0} for name in _EXPORTED_FUNCTIONS}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _track_calls(func):
|
|
40
|
+
|
|
41
|
+
@functools.wraps(func)
|
|
42
|
+
def wrapper(*args, **kwargs):
|
|
43
|
+
stats = _stats[func.__name__]
|
|
44
|
+
start = time.perf_counter()
|
|
45
|
+
try:
|
|
46
|
+
return func(*args, **kwargs)
|
|
47
|
+
finally:
|
|
48
|
+
stats["calls"] += 1
|
|
49
|
+
stats["total_time"] += time.perf_counter() - start
|
|
50
|
+
|
|
51
|
+
return wrapper
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
for _name in _EXPORTED_FUNCTIONS:
|
|
55
|
+
globals()[_name] = _track_calls(globals()[_name])
|
|
56
|
+
del _name
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def report_hipop_call_stats():
|
|
60
|
+
"""Log the number of invocations and cumulative C++ execution time for each
|
|
61
|
+
exported function that has been called at least once."""
|
|
62
|
+
at_least_one_call = False
|
|
63
|
+
for name, stats in _stats.items():
|
|
64
|
+
if stats["calls"] > 0:
|
|
65
|
+
at_least_one_call = True
|
|
66
|
+
print(f"HiPOP fun {name:<40}: #calls = {stats['calls']:>7}, run time = {stats['total_time']:>12.6f}")
|
|
67
|
+
if not at_least_one_call:
|
|
68
|
+
print("No HiPOP functions were called.")
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: scisoftdev-tmp-HiPOP
|
|
3
|
-
Version: 1.0.7
|
|
4
|
-
Summary: High Performance Optimal Path module
|
|
5
|
-
Keywords: graph,graph-theory,shortest-path,dijkstra
|
|
6
|
-
License-Expression: LGPL-3.0-only
|
|
7
|
-
License-File: LICENSE
|
|
8
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
-
Classifier: Intended Audience :: Developers
|
|
10
|
-
Classifier: Intended Audience :: Science/Research
|
|
11
|
-
Classifier: Topic :: Scientific/Engineering
|
|
12
|
-
Classifier: Programming Language :: C++
|
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.15
|
|
20
|
-
Classifier: Operating System :: MacOS
|
|
21
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
22
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
23
|
-
Project-URL: Repository, https://github.com/EMob-Lab/HiPOP
|
|
24
|
-
Project-URL: Issues, https://github.com/EMob-Lab/HiPOP/issues
|
|
25
|
-
Requires-Python: >=3.10
|
|
26
|
-
Description-Content-Type: text/markdown
|
|
27
|
-
|
|
28
|
-
# HiPOP
|
|
29
|
-
High Performance Optimal Path module
|
|
30
|
-
|
|
31
|
-
## Install Hipop
|
|
32
|
-
|
|
33
|
-
HiPOP is the C++ graph library used by [MnMS](https://github.com/EMob-Lab/MnMS.git).
|
|
34
|
-
You must have `CMake` and `make` installed on your computer.
|
|
35
|
-
|
|
36
|
-
## WARNING
|
|
37
|
-
If you are using MacOS ARM64, install the openmp library using Homebrew:
|
|
38
|
-
```shell
|
|
39
|
-
brew install libomp
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### C++ only
|
|
43
|
-
|
|
44
|
-
Inside your conda environment go to the cpp folder, and install the code using cmake:
|
|
45
|
-
|
|
46
|
-
```shell
|
|
47
|
-
cd cpp
|
|
48
|
-
mkdir build
|
|
49
|
-
cd build
|
|
50
|
-
cmake .. -DCMAKE_PREFIX_PATH=<PREFIX>\
|
|
51
|
-
-DCMAKE_INSTALL_PREFIX=<PREFIX>\
|
|
52
|
-
-DCMAKE_BUILD_TYPE=Release\
|
|
53
|
-
-DBUILD_TESTS=ON
|
|
54
|
-
cmake --build . --target install --config Release
|
|
55
|
-
```
|
|
56
|
-
Where `<PREFIX>` is the path to your prefix.
|
|
57
|
-
|
|
58
|
-
If you used conda to install the dependencies, replace it by `$CONDA_PREFIX`.
|
|
59
|
-
|
|
60
|
-
If you used venv to install the dependencies, replace it by the path to your venv.
|
|
61
|
-
|
|
62
|
-
You can then lauch the tests in the `build` directory:
|
|
63
|
-
|
|
64
|
-
```shell
|
|
65
|
-
ctest --output-on-failure
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
### Python
|
|
70
|
-
|
|
71
|
-
To install C++ code use the script `install_cpp.py`:
|
|
72
|
-
|
|
73
|
-
```shell
|
|
74
|
-
python python/install_cpp.py
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Then install the python lib:
|
|
78
|
-
```shell
|
|
79
|
-
python -m pip install python/
|
|
80
|
-
```
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# HiPOP
|
|
2
|
-
High Performance Optimal Path module
|
|
3
|
-
|
|
4
|
-
## Install Hipop
|
|
5
|
-
|
|
6
|
-
HiPOP is the C++ graph library used by [MnMS](https://github.com/EMob-Lab/MnMS.git).
|
|
7
|
-
You must have `CMake` and `make` installed on your computer.
|
|
8
|
-
|
|
9
|
-
## WARNING
|
|
10
|
-
If you are using MacOS ARM64, install the openmp library using Homebrew:
|
|
11
|
-
```shell
|
|
12
|
-
brew install libomp
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### C++ only
|
|
16
|
-
|
|
17
|
-
Inside your conda environment go to the cpp folder, and install the code using cmake:
|
|
18
|
-
|
|
19
|
-
```shell
|
|
20
|
-
cd cpp
|
|
21
|
-
mkdir build
|
|
22
|
-
cd build
|
|
23
|
-
cmake .. -DCMAKE_PREFIX_PATH=<PREFIX>\
|
|
24
|
-
-DCMAKE_INSTALL_PREFIX=<PREFIX>\
|
|
25
|
-
-DCMAKE_BUILD_TYPE=Release\
|
|
26
|
-
-DBUILD_TESTS=ON
|
|
27
|
-
cmake --build . --target install --config Release
|
|
28
|
-
```
|
|
29
|
-
Where `<PREFIX>` is the path to your prefix.
|
|
30
|
-
|
|
31
|
-
If you used conda to install the dependencies, replace it by `$CONDA_PREFIX`.
|
|
32
|
-
|
|
33
|
-
If you used venv to install the dependencies, replace it by the path to your venv.
|
|
34
|
-
|
|
35
|
-
You can then lauch the tests in the `build` directory:
|
|
36
|
-
|
|
37
|
-
```shell
|
|
38
|
-
ctest --output-on-failure
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Python
|
|
43
|
-
|
|
44
|
-
To install C++ code use the script `install_cpp.py`:
|
|
45
|
-
|
|
46
|
-
```shell
|
|
47
|
-
python python/install_cpp.py
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Then install the python lib:
|
|
51
|
-
```shell
|
|
52
|
-
python -m pip install python/
|
|
53
|
-
```
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.0.7
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from hipop.cpp.shortest_path import (dijkstra, dijkstra_single_source, floyd_warshall, parallel_dijkstra, parallel_dijkstra_single_source, parallel_dijkstra_heterogeneous_costs, parallel_k_intermodal_shortest_path, k_shortest_path, parallel_k_shortest_path, astar_euclidian_dist, compute_path_length, compute_path_cost, compute_paths_costs)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/examples/ParallelKShortestPath.cpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/include/hipop/shortest_path.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testYenKShortestPath.cpp
RENAMED
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/cpp/tests/testparallelKShortestPath.cpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/hipop/__init__.py.template
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/hipop/cpp/shortest_path.cpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scisoftdev_tmp_hipop-1.0.7 → scisoftdev_tmp_hipop-1.0.10}/python/tests/test_VersionConsistency.py
RENAMED
|
File without changes
|