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

Automatic nbatches #111

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c72ba08
refactoring to have both sets with cell lists
lmiq Dec 9, 2024
7d92ef1
use Bool swap instead of type-parameter
lmiq Dec 10, 2024
a868499
update calls to read_pdb
lmiq Dec 10, 2024
6ec07c8
restructure data of CellListPair to carry the two cell lists
lmiq Dec 10, 2024
580d3ac
loop over cells in CellListPair
lmiq Dec 10, 2024
f310e7c
fix some calls, remove autoswap
lmiq Dec 10, 2024
025a68b
reorganize code and adjust cross inner loop
lmiq Dec 10, 2024
e0fa83e
fix indexing of current cell
lmiq Dec 10, 2024
69f8a57
fix serial cell indexing
lmiq Dec 10, 2024
cb54416
if x coordinates are updated, now we need to update lists
lmiq Dec 10, 2024
506818a
add additional tests for resizing
lmiq Dec 10, 2024
5aedd56
update doctests
lmiq Dec 10, 2024
093e681
update docs
lmiq Dec 11, 2024
38ff37c
update pdbtools compat entry
lmiq Dec 11, 2024
19a5f6b
drop compatibility for Julia < 1.10
lmiq Dec 11, 2024
58502ad
update downgrade CI
lmiq Dec 11, 2024
91cec4b
update downgrade CI
lmiq Dec 11, 2024
c57e0a0
fix doctest for the number of threads run on CI
lmiq Dec 11, 2024
fe06c95
update precompiletools compat entry
lmiq Dec 11, 2024
f560948
implement mapping of coordinates to list. Needs testing and updated d…
lmiq Dec 11, 2024
a342ff8
add method to support matrix in new function
lmiq Dec 11, 2024
0868571
renamed internal function
lmiq Dec 11, 2024
64a01bd
fix case where particle is outside computing box of target cell list
lmiq Dec 11, 2024
ac664b6
nicer test for cartesian position of the cell
lmiq Dec 11, 2024
c3f6ff3
fix allocation, add some documenation, and a jldoctest
lmiq Dec 12, 2024
d7ac3eb
add BenchmarkTools to docs project
lmiq Dec 12, 2024
2ac7d4e
better precompilation setup
lmiq Dec 12, 2024
7171249
remove conditional running of precompilation for Julai versions
lmiq Dec 12, 2024
c211971
add tests for new cross_x_vs_sys function
lmiq Dec 12, 2024
74dbf5f
add test for output_threaded=nothing
lmiq Dec 12, 2024
4b6b57c
add test for output of nbatches
lmiq Dec 12, 2024
0f0f788
throw @warn and test setting nbatches with parallel=false
lmiq Dec 12, 2024
604dae3
add test for updateing celllistpair with parallel=false
lmiq Dec 12, 2024
1ee4cdd
add test for internal argument error
lmiq Dec 12, 2024
bcd3087
add additional pathological coordinate and avoid NaN comparison
lmiq Dec 12, 2024
0e1d7de
add tests for show methods
lmiq Dec 12, 2024
83b24cf
throw message for test_show changed
lmiq Dec 12, 2024
4bc6047
document new single-cell list cross interaction method
lmiq Dec 12, 2024
92e95f4
starting implementing automatic nbatches updating
lmiq Dec 12, 2024
a3a806d
update structure and updating scheme of nbatches (WIP)
lmiq Dec 13, 2024
4a7ee10
fix nbatches initialization
lmiq Dec 13, 2024
9aff819
define nbatches for particle systems
lmiq Dec 13, 2024
f56b7fe
run CI with 10 julia threads for better testing
lmiq Dec 13, 2024
9e63707
split set and update number of batches
lmiq Dec 13, 2024
bf01912
fix karg forwarding
lmiq Dec 13, 2024
b1aa831
fix signature of update number of batches for CellListPair
lmiq Dec 14, 2024
924fe92
initialize default value for _nbatches
lmiq Dec 14, 2024
d6b479d
fix initialization of batches for CellListPair
lmiq Dec 14, 2024
9f06c0a
fix doctest
lmiq Dec 14, 2024
195e606
remove testitem block
lmiq Dec 15, 2024
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
5 changes: 2 additions & 3 deletions .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ jobs:
strategy:
matrix:
version:
- '1.6'
- '^1.6'
- '1.10.0'
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: cjdoris/julia-downgrade-compat-action@v1
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
- push
- pull_request
env:
JULIA_NUM_THREADS: 2
JULIA_NUM_THREADS: 10
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
Expand All @@ -12,16 +12,12 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6'
- 'lts'
- 'pre'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
exclude:
- version: '1.6'
os: macOS-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand Down
12 changes: 6 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ Compat = "4.14.0"
DocStringExtensions = "0.9"
Documenter = "1.2.1"
ForwardDiff = "0.10.13"
LinearAlgebra = "1.6"
LinearAlgebra = "1.10"
Measurements = "2.11"
NearestNeighbors = "0.4.16"
PDBTools = "1.1"
PDBTools = "2"
Parameters = "0.12"
PrecompileTools = "1"
PrecompileTools = "1.2.1"
ProgressMeter = "1.6"
Random = "1.6"
Random = "1.10"
Setfield = "0.7, 0.8, 0.9, 1"
StaticArrays = "1.6"
Test = "1.6"
Test = "1.10"
TestItemRunner = "0.2"
TestItems = "0.1, 1"
Unitful = "1.19"
julia = "1.6"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ USER GUIDE: <br>

## Installation

Download and install Julia for your platform from [this http url](https://julialang.org/downloads/). Version 1.6 or greater is required.
Download and install Julia for your platform from [this http url](https://julialang.org/downloads/).
Version 1.10 or greater is required.

Install it as usual for registered Julia packages:

Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CellListMap = "69e1c6dd-3888-40e6-b3c8-31ac5f578864"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Expand Down
8 changes: 4 additions & 4 deletions docs/src/LowLevel.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ To control these steps, set manually the `output_threaded` and `reduce` optional

By default, we define:
```julia
output_threaded = [ deepcopy(output) for i in 1:nbatches(cl) ]
output_threaded = [ deepcopy(output) for i in 1:nbatches(cl, :map) ]
```
where `nbatches(cl)` is the number of batches into which the computation will be divided. The number of batches is *not* necessarily equal to the number of threads available (an heuristic is used to optimize performance, as a function of the workload per batch), but can be manually set, as described in the **Number of batches** section below.
where `nbatches(cl, :map)` is the number of batches into which the mapped computation will be divided. The number of batches is *not* necessarily equal to the number of threads available (an heuristic is used to optimize performance, as a function of the workload per batch), but can be manually set, as described in the **Number of batches** section below.

The default reduction function just assumes the additivity of the results obtained by each batch:
```julia
Expand Down Expand Up @@ -398,7 +398,7 @@ At the same time, the homogeneity of the computation of the mapped function may

Both the above considerations can be used to tunning the `nbatches` parameter of the cell list. This parameter is initialized from a tuple of integers, defining the number of batches that will be used for constructing the cell lists and for the mapping of the computations.

By default, the number of batches for the computation of the cell lists is smaller than `nthreads()` if the number of particles per cell is small. The default value by the internal function `CellListMap._nbatches_build_cell_lists(cl::CellList)`.
By default, the number of batches for the computation of the cell lists is smaller than `nthreads()` if the number of particles per cell is small. The default value is defined by the internal function `CellListMap._nbatches_build_cell_lists(cl::CellList)`.

The values assumed for each number of batches can bee seen by printing the `nbatches` parameter of the cell lists:
```julia-repl
Expand Down Expand Up @@ -610,7 +610,7 @@ CollapsedDocStrings = true

```@autodocs
Modules = [CellListMap]
Pages = ["Box.jl", "CellListMap.jl", "CellLists.jl", "CellOperations.jl", "CoreComputing.jl"]
Pages = ["Box.jl", "CellListMap.jl", "CellLists.jl", "CellOperations.jl", "./core_computing/self.jl", "./core_computing/cross.jl"]
Order = [:type, :function]
```

Expand Down
Loading
Loading