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

Naming global/local/total offset #128

Closed
ax3l opened this issue Jan 14, 2014 · 10 comments
Closed

Naming global/local/total offset #128

ax3l opened this issue Jan 14, 2014 · 10 comments
Labels
documentation regarding documentation or wiki discussions

Comments

@ax3l
Copy link
Member

ax3l commented Jan 14, 2014

We have to make namings within PIConGPU more consistent.

So far we used:

  • local offset: a cells position to the zero point within the same GPU (local size: domain on this GPU)
  • global offset: the same offset + the offset regarding "all GPUs" (local size: domain on all GPUs)
  • total offset: global offset + offset due to sliding window

I just made the name "total" offset up. maybe we can find more useful (but significant and short!) names.

@Heikman @PrometheusPi what do you propose?

P.S.: Not related: We used an slightly different scheme in libSplash since it lives somewhere between hdf5-speech and ours.
https://github.com/ComputationalRadiationPhysics/libSplash/blob/dev/doc/manual/UserManual.pdf?raw=true (chapter 3 / page 9)

@f-schmitt-zih Its like this, am I right?

  • local: on the same GPU (like PIConGPU) but localOffset describes the offset of this local GPU domain to the global (data complete) domain
  • global offset: offset of the all-GPU domain due to sliding window (and globalSize is the all-GPU domain size)

Actually I like the libSplash notion a bit more since it is more consistent. It of course lacks the "PIConGPU local offset" since it does not need it.


Of course it is always the question if the "next" locality should include or exclude the one before, but I think exclusive (e.g. a GPU-cell-number is between [0;GPU-cell-size) and not in the range [GPUoffset + slideoffset; same+size)) is quite useful since most of the operations will need less precision and queries.

@f-schmitt
Copy link
Member

I like the idea of renaming those offsets, I was thinking about that myself recently when working on the parallel I/O restart. We don't need to create especially short names, this is not the 70's anymore. It's much more important to make them clear and significant.

How about ?

  • local offset: local to the data of this GPU ((local size: domain on this GPU)
  • global/simulation offset: offset to the start of the current computation, i.e. moving window, since it is the part that is currently simulated
  • physical offset: offset to the start of the physical domain that is simulated over all iteration

Your notion of libSplash naming scheme is correct!
I agree that domains/offsets should be exclusive (even though this is not the case in libSplash, but we can just add both if necessary)

@ax3l
Copy link
Member Author

ax3l commented Jan 15, 2014

I think putting the influence of the moving window in the physical offset instead of the global offset is more useful.

the question for sliding window is also: how to refer to the offset slide + virtual window offset? (maybe that is the thing you were talking about in point 2?). because it is a difference between the total data offset due to re-hanged GPUs and the continuous motion of the virtual window.

I do not like the name "physical" offset sooo much, any other ideas?
Names do not need to be extraordinary short, but type-able (isIsNotTheJava90sAnymoreEither) :)

Let us us add a svg to this thread to describe the notion in the draft phase.

@f-schmitt
Copy link
Member

how about renaming localDomainOffset to movingWindowOffset since it only matters with the moving window

@f-schmitt
Copy link
Member

Draft of our definitions

participants: @f-schmitt-zih @psychocoderHPC @ax3l

objects

  • domain = contiguous volume on one or all GPUs
  • window = any part of a domain

object attributes

attribute type notes
.size uint size of an object
.offset int offset of an object to its next higher hierarchy
  • offsets are exclusive and always relative to the element that is above it in the hierarchy

hierarchy

  • local = the object is located on the current ("my") GPU, no guards
  • global = the currently simulated volume over all GPUs, no guards
  • total = takes parts into account that are not in the global volume, e.g. previous areas that have been gone due to the sliding window

this results in

  • global:
    • globalDomain.size = size of currently simulation volume on all GPUs
    • globalDomain.offset = offset caused due to slides: offset to the totalDomain
    • globalWindow.size = size of the current/selected moving window (cutting away areas of the globalDomain that are before/after the window)
    • globalWindow.offset = offset of moving window from the first GPU: offset to the globalDomain
  • local:
    • localDomain.size = size of my GPU
    • localDomain.offset = beginning of my local domain in the global Domain
    • localWindow.size = size of the volume of the moving window on my GPU
    • localWindow.offset = offset of my moving window part from the start of the global window

Special use cases

  • My GPU is not contained in the moving window.
    • localWindow.size == 0
    • localWindow.offset == undefined
  • An interface, lets say the gasProfiles, may needs an inclusive domain offset like
    • localDomain.offset+globalDomain.offset (1)
    • how to name the result (1) in the interface?
    • suggestion: localDomainToTotal = (1)
    • note: usually, as defined above, localDomain means localDomainToGlobal because global is the next higher hierarchy.

@f-schmitt
Copy link
Member

domains

@f-schmitt
Copy link
Member

@ComputationalRadiationPhysics/picongpu-maintainers
No new comments in 5 days ... I guess this is a common agreement?

@PrometheusPi
Copy link
Member

👍

1 similar comment
@ax3l
Copy link
Member Author

ax3l commented Apr 30, 2014

👍

@f-schmitt
Copy link
Member

I updated the wiki with our new definitions. Feel free to correct or clarify anything if necessary.

@ax3l
Copy link
Member Author

ax3l commented May 9, 2014

Ah that's excellent.
It might be useful to get it a bit closer to the proposed implementation in #403. E.g. the word object could be replaced with Selection.

psychocoderHPC pushed a commit to psychocoderHPC/picongpu that referenced this issue Feb 6, 2017
977b55f Merge pull request ComputationalRadiationPhysics#141 from ax3l/doc-usagelink
0f79cd5 Link Usage.md
8415cb1 Merge pull request ComputationalRadiationPhysics#140 from psychocoderHPC/topic-makeAllocatorSelfConstistent
ee6f58e update examples
8822cb0 remove `finalizeHeap()` from `creationPolicies`
ebb37f5 update `Usage.md`
66785ac selfe consistent allocator
a036d5c Merge pull request ComputationalRadiationPhysics#135 from psychocoderHPC/fix-missingPoolSizeReset
449bc7b Merge pull request ComputationalRadiationPhysics#136 from psychocoderHPC/topic-destructiveResize
b2e0d76 add `destructiveResize` method
d0ecb62 fix missing local size change in `finalizeHeap()`
9c58f4d Merge pull request ComputationalRadiationPhysics#133 from psychocoderHPC/fix-ptxSpecialRegisterUsage
4cd47f0 fix missing '%%' to use ptx special register
cee846f Merge pull request ComputationalRadiationPhysics#127 from slizzered/documentation-add-thesis
b92f67f Merge pull request ComputationalRadiationPhysics#128 from slizzered/travis-fix_Werror
53e86b4 simpler handling of CXX_FLAGS
d2c4e08 Merge pull request ComputationalRadiationPhysics#126 from slizzered/fix_115
85143c0 Updated Readme.md
5f84db9 fixed string concatenation
eb1ad2d Fix to travis file: -Werror
ad72a61 Check heap pointer in Scatter creation policy
ffa4f7e Merge pull request ComputationalRadiationPhysics#125 from ComputationalRadiationPhysics/slizzered-patch-1
368478c moar fixes
a0bd2eb Update Usage.md
69a6973 Merge pull request ComputationalRadiationPhysics#109 from Flamefire/staticConstexpr
638fa5b Use BOOST_STATIC_CONSTEXPR
c0c6450 Merge pull request ComputationalRadiationPhysics#116 from slizzered/issue113-separate_object_host_device
4070f40 some renamig and freeing at end of examples
b9fe440 added implicit conversion to device handle
7f742b8 fixed OldMalloc policy to comply with new interface
0de5416 removed unnecessary inheritance
28c52c2 fixed a return type to comply with defined interface
503f0bd changed pointer to handle
d281cbe replaced initHeap function with constructor
74ba8aa Replaced the global __device__ object
4fa2d75 Merge pull request ComputationalRadiationPhysics#121 from ax3l/fix-cincludes
d99a6f3 Fix: Includes from C headers
b52c2b2 Merge pull request ComputationalRadiationPhysics#119 from ax3l/fix-travis
eb096f7 Updating to Travis-CI Trusty Beta
93ab74b Merge pull request ComputationalRadiationPhysics#112 from slizzered/issue110-error-handling
90881fd Fixed problems leading to uninitialized pointers
8980ead Merge pull request ComputationalRadiationPhysics#108 from Flamefire/exampleC++11
a92d4e1 Rename some shadowed variables in C++11 mode

git-subtree-dir: thirdParty/mallocMC
git-subtree-split: 977b55f98fe0e6e4545f6e092660b7b4f1b54493
psychocoderHPC pushed a commit to psychocoderHPC/picongpu that referenced this issue Oct 28, 2019
4578ae151 Merge pull request ComputationalRadiationPhysics#128 from psychocoderHPC/topic-updateAlpakaToCurrent0.4.0dev
0c090e536 Merge commit 'dd8afa5cec90a1398b8da3f9cd7d30aa59664cb5' into topic-updateAlpakaToCurrent0.4.0dev
dd8afa5ce Squashed 'alpaka/' changes from 0a2b6161..d5e59590
767768a88 rename alpaka queue names
8c227fbb6 Merge pull request ComputationalRadiationPhysics#130 from psychocoderHPC/fix-configHeaderTest
a6c3da536 fix `config header` test
a439c9d6b Merge pull request ComputationalRadiationPhysics#129 from psychocoderHPC/topic-updateTravisCMakeTo3.15.4
2e0daaf1b update tavis CMake to 3.15.4
04698e9c6 Merge pull request ComputationalRadiationPhysics#123 from SimeonEhrig/ci_enable_backends
25e64b623 time command add to ci test
c559bf432 Merge pull request ComputationalRadiationPhysics#107 from SimeonEhrig/init-gitlab-ci
488a2e95f Merge pull request ComputationalRadiationPhysics#117 from tdd11235813/pr-fixes-atomics
c2916be68 Adds atomicAnd, atomicXor, atomicOr.
7c330a5a9 Merge pull request ComputationalRadiationPhysics#112 from psychocoderHPC/topic-standaloneHeader
d84f2fdea configuration header
6a97c1cf1 Merge pull request ComputationalRadiationPhysics#113 from fwyzard/dev_cuplaGetErrorName
d210a37a0 Add cuplaGetErrorName with the same functionality as cuplaGetErrorString
d050bf3cd Merge pull request ComputationalRadiationPhysics#111 from tdd11235813/doc-subtree
19cf46913 Describes how to pull subtree as generic git author.
4ecc143f4 Merge pull request ComputationalRadiationPhysics#103 from tdd11235813/dev
16c806e68 Merge pull request ComputationalRadiationPhysics#104 from tdd11235813/dev-targets
43fd52319 Add gitlab-ci.yml for GitLab CI tests
fd37e7b7d Alpaka as git subtree instead of git submodule.
16b455107 Squashed 'alpaka/' content from commit 0a2b6161
69b79bd95 Merge commit '16b4551075f93cdd71309433b02936a152dfee9f' as 'alpaka'
fa5cc5260 Removes alpaka git module.
67485d510 Some stylistic changes.
4f2b9c019 CUPLA_ADD_EXECUTABLE links cupla target. Target provides c++11.

git-subtree-dir: thirdParty/cupla
git-subtree-split: 4578ae151ee6ac5c7810f76ff0c3a4506158807d
psychocoderHPC pushed a commit to psychocoderHPC/picongpu that referenced this issue Jan 8, 2020
0594a68a0 Merge pull request ComputationalRadiationPhysics#140 from psychocoderHPC/topic-cuplaTargetBehavior
0991f2c6e compile cupla interfaces into static cupla library
914a87133 Merge pull request ComputationalRadiationPhysics#136 from psychocoderHPC/topic-refactorKernelExecution
0027076c7 Merge pull request ComputationalRadiationPhysics#137 from psychocoderHPC/topic-supportForAlpakaOMP4Backend
d2b118662 Merge pull request ComputationalRadiationPhysics#139 from psychocoderHPC/fix-configHeader
16c084970 support for alpaka OMP4 backend
e990d63c5 fix config header
e2048f565 refactor cupla kernel execution
d5f969a93 Merge pull request ComputationalRadiationPhysics#132 from sbastrakov/doc-clarifyIncludeOrder
cca400a60 Clarify documentation of inclusion order
4578ae151 Merge pull request ComputationalRadiationPhysics#128 from psychocoderHPC/topic-updateAlpakaToCurrent0.4.0dev
0c090e536 Merge commit 'dd8afa5cec90a1398b8da3f9cd7d30aa59664cb5' into topic-updateAlpakaToCurrent0.4.0dev
dd8afa5ce Squashed 'alpaka/' changes from 0a2b6161..d5e59590
767768a88 rename alpaka queue names
8c227fbb6 Merge pull request ComputationalRadiationPhysics#130 from psychocoderHPC/fix-configHeaderTest
a6c3da536 fix `config header` test
a439c9d6b Merge pull request ComputationalRadiationPhysics#129 from psychocoderHPC/topic-updateTravisCMakeTo3.15.4
2e0daaf1b update tavis CMake to 3.15.4
04698e9c6 Merge pull request ComputationalRadiationPhysics#123 from SimeonEhrig/ci_enable_backends
25e64b623 time command add to ci test
c559bf432 Merge pull request ComputationalRadiationPhysics#107 from SimeonEhrig/init-gitlab-ci
488a2e95f Merge pull request ComputationalRadiationPhysics#117 from tdd11235813/pr-fixes-atomics
c2916be68 Adds atomicAnd, atomicXor, atomicOr.
7c330a5a9 Merge pull request ComputationalRadiationPhysics#112 from psychocoderHPC/topic-standaloneHeader
d84f2fdea configuration header
6a97c1cf1 Merge pull request ComputationalRadiationPhysics#113 from fwyzard/dev_cuplaGetErrorName
d210a37a0 Add cuplaGetErrorName with the same functionality as cuplaGetErrorString
d050bf3cd Merge pull request ComputationalRadiationPhysics#111 from tdd11235813/doc-subtree
19cf46913 Describes how to pull subtree as generic git author.
4ecc143f4 Merge pull request ComputationalRadiationPhysics#103 from tdd11235813/dev
16c806e68 Merge pull request ComputationalRadiationPhysics#104 from tdd11235813/dev-targets
43fd52319 Add gitlab-ci.yml for GitLab CI tests
fd37e7b7d Alpaka as git subtree instead of git submodule.
16b455107 Squashed 'alpaka/' content from commit 0a2b6161
69b79bd95 Merge commit '16b4551075f93cdd71309433b02936a152dfee9f' as 'alpaka'
fa5cc5260 Removes alpaka git module.
67485d510 Some stylistic changes.
4f2b9c019 CUPLA_ADD_EXECUTABLE links cupla target. Target provides c++11.

git-subtree-dir: thirdParty/cupla
git-subtree-split: 0594a68a0d9bdbfc949391f83473d4734575a7f5
psychocoderHPC pushed a commit to psychocoderHPC/picongpu that referenced this issue Mar 10, 2020
36f6ca909 refactor cupla kernel execution
d5f969a93 Merge pull request ComputationalRadiationPhysics#132 from sbastrakov/doc-clarifyIncludeOrder
cca400a60 Clarify documentation of inclusion order
4578ae151 Merge pull request ComputationalRadiationPhysics#128 from psychocoderHPC/topic-updateAlpakaToCurrent0.4.0dev
0c090e536 Merge commit 'dd8afa5cec90a1398b8da3f9cd7d30aa59664cb5' into topic-updateAlpakaToCurrent0.4.0dev
dd8afa5ce Squashed 'alpaka/' changes from 0a2b6161..d5e59590
767768a88 rename alpaka queue names
8c227fbb6 Merge pull request ComputationalRadiationPhysics#130 from psychocoderHPC/fix-configHeaderTest
a6c3da536 fix `config header` test
a439c9d6b Merge pull request ComputationalRadiationPhysics#129 from psychocoderHPC/topic-updateTravisCMakeTo3.15.4
2e0daaf1b update tavis CMake to 3.15.4
04698e9c6 Merge pull request ComputationalRadiationPhysics#123 from SimeonEhrig/ci_enable_backends
25e64b623 time command add to ci test
c559bf432 Merge pull request ComputationalRadiationPhysics#107 from SimeonEhrig/init-gitlab-ci
488a2e95f Merge pull request ComputationalRadiationPhysics#117 from tdd11235813/pr-fixes-atomics
c2916be68 Adds atomicAnd, atomicXor, atomicOr.
7c330a5a9 Merge pull request ComputationalRadiationPhysics#112 from psychocoderHPC/topic-standaloneHeader
d84f2fdea configuration header
6a97c1cf1 Merge pull request ComputationalRadiationPhysics#113 from fwyzard/dev_cuplaGetErrorName
d210a37a0 Add cuplaGetErrorName with the same functionality as cuplaGetErrorString
d050bf3cd Merge pull request ComputationalRadiationPhysics#111 from tdd11235813/doc-subtree
19cf46913 Describes how to pull subtree as generic git author.
4ecc143f4 Merge pull request ComputationalRadiationPhysics#103 from tdd11235813/dev
16c806e68 Merge pull request ComputationalRadiationPhysics#104 from tdd11235813/dev-targets
43fd52319 Add gitlab-ci.yml for GitLab CI tests
fd37e7b7d Alpaka as git subtree instead of git submodule.
16b455107 Squashed 'alpaka/' content from commit 0a2b6161
69b79bd95 Merge commit '16b4551075f93cdd71309433b02936a152dfee9f' as 'alpaka'
fa5cc5260 Removes alpaka git module.
67485d510 Some stylistic changes.
4f2b9c019 CUPLA_ADD_EXECUTABLE links cupla target. Target provides c++11.

git-subtree-dir: thirdParty/cupla
git-subtree-split: 36f6ca90972028fbf45e0aa5ed4fd7c9ea50f03a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation regarding documentation or wiki discussions
Projects
None yet
Development

No branches or pull requests

3 participants