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

CUDA threads/block via config_str, git downloads #110

Closed

Conversation

martinschwinzerl
Copy link
Contributor

@martinschwinzerl martinschwinzerl commented Nov 7, 2019

TL;DR:

Adds support for explicitly stating the default grid dimensions for cuda kernels during the creation of a track-job via a TOML encoded config_str. Provides a new method to sync local copies of external libraries with upstream git repositories. Fixes a bug introduced in #108 concerning disabling nodes for OpenCL. Passes all tests on my machine and should not produce any new conflicts

Detailed Changes

  • CudaTrackJob now allows to set a default value for the threads/block value via the config_str parameter during track_job creation. Cf. minimal python example:
default_threads_per_block = 256
default_track_threads_per_block = 512

config_str = f"""
cuda.threads_per_block = {default_threads_per_block}\r\n
cuda.track_threads_per_block = {default_track_threads_per_block}\r\n
"""    
track_job = pyst.CudaTrackJob(lattice, particles, 0, config_str=config_str)

This can be used to investigate the effects of the current fixed-size grid on the run-time performance of CUDA tracking.

  • Introduce support for parsing TOML config files and strings. To this end, the toml11 library is embedded and used. The config_str variable for the CudaTrackJob is the first use-case for this method, since most objects in SixTrackLib take a config_str during creation, further uses of this feature are anticipated

  • There are problems with the download of external projects like the OpenCL headers in newer versions of CMake with the "works also on CMake < 3.11" approach that is currently employed. To not mandate very bleeding-edge versions of CMake that supports the new FetchContent approach, a function is provided in cmake/SetupGit.cmake to clone or optionally sync a locally cloned repository with upstream. The function Git_sync_with_repo tries to only fetch the project if the ref's differ and be configured to also track a branch different than master.

  • Fixes a bug in the SIXTRACKLIB_DEVICES parsing of devices if there are more than one devices available that match a certain token in the string

Problems

On CMake >= 3.15, a problem occurs with the linking of the host interface to cuda Kernels. Cf #109 for further details. If possible, please try to build with CMake < 3.15 until this is resolved.

kparasch and others added 30 commits December 5, 2019 11:10
…ity for various functions to the C99 interface
- adds feature flags, pairs of key-value strings that can be translated
  into compiler options for the OpenCL runtime compiler
- adds handling for the default compiler options stored in the Controller
… compile option handling

- removes "enable/disable" beam-beam tracking boolean flag - this is now
  handled as a combination of the SIXTRL_TRACK_BEAMBEAM4D and SIXTRL_TRACK_BEAMBEAM6D
  feature flags

- adds a skip beam-beam tracking setter
- uses feature flags for all compiler option generation
- properly uses the default compiler options
- exposes the default compiler options to C99 api
… to the ClController python implementation
Note: this addresses the problem described in issue SixTrack#125
- updates the names and API of the space-charge API
- performs cosmetic changes
- applies linter to for pep8 conformity
…ific file

- moves the python LineDensityProfileData implementation from interpol.py to
  sc_line_density.py .

- renames the buffer assignment creation function to get a shorter name
- reflects the updated API names for the space-charge elements
- uses updated/streamlined line-density profile data API
@martinschwinzerl
Copy link
Contributor Author

Re-merged with #132, seems to pass all tests on my machine

The SIXTRL_OPTIONAL decorating attribute is removed since the
doInitCudaTrackJob method has a corresponding parameter -> the
currently not used degree of freedom can be handled more cleanly there
@martinschwinzerl
Copy link
Contributor Author

Merged into Pr #132 -> close

@martinschwinzerl martinschwinzerl deleted the cuda_grid_dims branch November 5, 2020 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants