-
Notifications
You must be signed in to change notification settings - Fork 369
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
Add ROCMClang as an LLVM compiler to cmake #2184
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since CMake >= 3.21, ROCm is identified as ROCMClang.
Until we get ROCM 4.4, we need to work around this new detection: https://gitlab.kitware.com/cmake/cmake/-/blob/v3.21.0/Modules/CMakeDetermineCompilerId.cmake#L153-159
ax3l
approved these changes
Jul 21, 2021
ax3l
added a commit
to ax3l/WarpX
that referenced
this pull request
Jul 21, 2021
Include HIP ROCMClang recog. in AMReX: AMReX-Codes/amrex#2184
ax3l
added a commit
to ECP-WarpX/WarpX
that referenced
this pull request
Jul 21, 2021
* AMReX: 91fa2b7e6ff33117bd537635c8c55192359863a2 Include HIP ROCMClang recog. in AMReX: AMReX-Codes/amrex#2184 * HIP CI: Use clang++ directly Looks like the C++14 flags are missing
5 tasks
EtherealMC-Bit
pushed a commit
to ModernElectron/WarpX
that referenced
this pull request
Jul 23, 2021
* Python - add new particle attributes at runtime (ECP-WarpX#2112) * exposes AddRealComp to Python to allow extra particle attributes to be added at runtime; also includes a new function to grab a particle data array from the name of the component rather than the index * added function to get index of a particle component given the PID name * changed new get component index and get_particle_arrays_from_comp_name functions to take species name as argument rather than species id * changed warpx_addRealComp to accept a species name as input and only add the new component for that species * Use new boundary input (ECP-WarpX#2110) * support only new boundary interface. set pml flags to 0 as default * use new boundary interface in Examples/Modules/ * use new boundary interface in the input for tests in Examples/Physical_applications * use new boundary interface in the input for tests in Examples/Tests * use new bc * fix typo * fix typo * Update Examples/Tests/SingleParticle/inputs_2d * fix bc in input * specific bc for electrostatic inputs * resetting benchmark for PEC particle CI test after fixing the default pml flags from 1 to 0 * Update Examples/Physics_applications/laser_acceleration/inputs_2d_rz * remove documentation on previous boundary input * Comment to clarify where in the code is_periodic is appended and how it is defined * add default parameters for BC in doc * Implements a periodically repeating plasma lenses (ECP-WarpX#2080) * Implements a periodically repeating plasma lens * Added documentation for plasma lenses * Added m_n_lenses to avoid use of size in device code * Change arrays to device arrays * Put DeviceVectors in the MultiParticleContainer * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/Gather/GetExternalFields.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Added CI test * Updated CI test * LGTM clean up * Moved literal namespace inside the routine Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Use only species name in libwarpx (ECP-WarpX#2119) * changed all particle interacting functions in libwarpx to use the species name rather than id, also changed the functions to get particle array data to use the component name rather than index * removed unneeded function declaration * AMReX/PICSAR: Weekly Update (ECP-WarpX#2107) Update AMReX to AMReX-Codes/amrex@ee8facf No changes im PICSAR since last update. ``` ./Tools/Release/updatePICSAR.py ./Tools/Release/updateAMReX.py ``` * ChecksumAPI: yt 4+ ds.force_periodicity() (ECP-WarpX#2117) * ChecksumAPI: yt 4+ ds.force_periodicity() Mitigate issues of the form ``` RuntimeError: yt attempted to read outside the boundaries of a non-periodic domain along dimension 0. Region left edge = -7.5e-06 code_length, Region right edge = 7.500000000000002e-06 code_length Dataset left edge = -7.5e-06 code_length, Dataset right edge = 7.5e-06 code_length This commonly happens when trying to compute ghost cells up to the domain boundary. Two possible solutions are to select a smaller region that does not border domain edge (see https://yt-project.org/docs/analyzing/objects.html?highlight=region) or override the periodicity with ds.force_periodicity() ``` * make yt3 compatible * simplify code (ECP-WarpX#2108) * assert that the NCI corrector is used with Esirkepov only (ECP-WarpX#2114) * Update picmi.py for new injection_style default (ECP-WarpX#2109) * AMReX: ROCMClang CMake (ECP-WarpX#2120) * AMReX: 91fa2b7e6ff33117bd537635c8c55192359863a2 Include HIP ROCMClang recog. in AMReX: AMReX-Codes/amrex#2184 * HIP CI: Use clang++ directly Looks like the C++14 flags are missing * Multi-J Algo: Make div(E)/div(B) Cleaning Optional (ECP-WarpX#2116) * Multi-J Algo: Make div(E)/div(B) Cleaning Optional * Remove Unnecessary Newlines * Use IntVect Flags for F and G Index Types (ECP-WarpX#2118) * Particle injection callback for ElectrostaticSolver (ECP-WarpX#2096) * Particle injection callback for ElectrostaticSolver * Move warpx_py_particleinjection to line 162, removed from OneStep_nosub * Space above particleinjection callback * PICMI - Embedded boundary (ECP-WarpX#2104) * added functionality to picmi.py to allow an embedded boundary to be set from a python run script * added test: embedded sphere run from python (the test is the same as ElectrostaticSphereEB) * added a line to prepare_file_travis.py so that tests with USE_EB=True are not included in Python CI test list * fixed import path in analysis.py file for new test * added WarpX_EB flag to setup.py so that embedded boundary functionality can be included in pip installs of pywarpx * Add particle diag to diag_store * Make Doc Strings for the Particle Diag wrapper * new line Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Co-authored-by: David Grote <grote1@llnl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Luca Fedeli <luca.fedeli@cea.fr> Co-authored-by: MaxThevenet <maxence.thevenet@desy.de> Co-authored-by: Peter Scherpelz <31747262+peterscherpelz@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Roelof <roelof.groenewald@modernelectron.com>
peterscherpelz
added a commit
to ModernElectron/WarpX
that referenced
this pull request
Jul 28, 2021
* Copied ArrayPlot and utility functions over Currently plotting does not work * Moved plotting utilities into plotting.py * Fixed issue with ghost cells, saved plot file * Changed to Peter's plot parameters * Added functionality to plot at diag steps and after simulation end * Removed old debug print outs * Removed some wrappers in favor of directly calling from mwxrun * Removed unneeded SimInfo class, instead use mwxrun * Removed unused get non gathered rho and phi functions * fixed long lines in mwxrun * Include ghosts in get_gathered_phi() for plotting * Revert "Include ghosts in get_gathered_phi() for plotting" This reverts commit 280df77. * Don't include ghosts when plotting rho * Removed 2 single line wrappers and readded upstream function * Readded line breaks in the get_mesh_charge_density_fp comment * Used mepicmi.Species instead of picmi.Species * Revert 'Used mepicmi.Species instead of picmi.Species' * Correctly used mepicmi species (import after init_libwarpx) * Added field diagnostic wrapper * Requested changes and refactoring * Nruof/particle diag wrap (#30) * Python - add new particle attributes at runtime (ECP-WarpX#2112) * exposes AddRealComp to Python to allow extra particle attributes to be added at runtime; also includes a new function to grab a particle data array from the name of the component rather than the index * added function to get index of a particle component given the PID name * changed new get component index and get_particle_arrays_from_comp_name functions to take species name as argument rather than species id * changed warpx_addRealComp to accept a species name as input and only add the new component for that species * Use new boundary input (ECP-WarpX#2110) * support only new boundary interface. set pml flags to 0 as default * use new boundary interface in Examples/Modules/ * use new boundary interface in the input for tests in Examples/Physical_applications * use new boundary interface in the input for tests in Examples/Tests * use new bc * fix typo * fix typo * Update Examples/Tests/SingleParticle/inputs_2d * fix bc in input * specific bc for electrostatic inputs * resetting benchmark for PEC particle CI test after fixing the default pml flags from 1 to 0 * Update Examples/Physics_applications/laser_acceleration/inputs_2d_rz * remove documentation on previous boundary input * Comment to clarify where in the code is_periodic is appended and how it is defined * add default parameters for BC in doc * Implements a periodically repeating plasma lenses (ECP-WarpX#2080) * Implements a periodically repeating plasma lens * Added documentation for plasma lenses * Added m_n_lenses to avoid use of size in device code * Change arrays to device arrays * Put DeviceVectors in the MultiParticleContainer * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/Gather/GetExternalFields.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Added CI test * Updated CI test * LGTM clean up * Moved literal namespace inside the routine Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Use only species name in libwarpx (ECP-WarpX#2119) * changed all particle interacting functions in libwarpx to use the species name rather than id, also changed the functions to get particle array data to use the component name rather than index * removed unneeded function declaration * AMReX/PICSAR: Weekly Update (ECP-WarpX#2107) Update AMReX to AMReX-Codes/amrex@ee8facf No changes im PICSAR since last update. ``` ./Tools/Release/updatePICSAR.py ./Tools/Release/updateAMReX.py ``` * ChecksumAPI: yt 4+ ds.force_periodicity() (ECP-WarpX#2117) * ChecksumAPI: yt 4+ ds.force_periodicity() Mitigate issues of the form ``` RuntimeError: yt attempted to read outside the boundaries of a non-periodic domain along dimension 0. Region left edge = -7.5e-06 code_length, Region right edge = 7.500000000000002e-06 code_length Dataset left edge = -7.5e-06 code_length, Dataset right edge = 7.5e-06 code_length This commonly happens when trying to compute ghost cells up to the domain boundary. Two possible solutions are to select a smaller region that does not border domain edge (see https://yt-project.org/docs/analyzing/objects.html?highlight=region) or override the periodicity with ds.force_periodicity() ``` * make yt3 compatible * simplify code (ECP-WarpX#2108) * assert that the NCI corrector is used with Esirkepov only (ECP-WarpX#2114) * Update picmi.py for new injection_style default (ECP-WarpX#2109) * AMReX: ROCMClang CMake (ECP-WarpX#2120) * AMReX: 91fa2b7e6ff33117bd537635c8c55192359863a2 Include HIP ROCMClang recog. in AMReX: AMReX-Codes/amrex#2184 * HIP CI: Use clang++ directly Looks like the C++14 flags are missing * Multi-J Algo: Make div(E)/div(B) Cleaning Optional (ECP-WarpX#2116) * Multi-J Algo: Make div(E)/div(B) Cleaning Optional * Remove Unnecessary Newlines * Use IntVect Flags for F and G Index Types (ECP-WarpX#2118) * Particle injection callback for ElectrostaticSolver (ECP-WarpX#2096) * Particle injection callback for ElectrostaticSolver * Move warpx_py_particleinjection to line 162, removed from OneStep_nosub * Space above particleinjection callback * PICMI - Embedded boundary (ECP-WarpX#2104) * added functionality to picmi.py to allow an embedded boundary to be set from a python run script * added test: embedded sphere run from python (the test is the same as ElectrostaticSphereEB) * added a line to prepare_file_travis.py so that tests with USE_EB=True are not included in Python CI test list * fixed import path in analysis.py file for new test * added WarpX_EB flag to setup.py so that embedded boundary functionality can be included in pip installs of pywarpx * Add particle diag to diag_store * Make Doc Strings for the Particle Diag wrapper * new line Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Co-authored-by: David Grote <grote1@llnl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Luca Fedeli <luca.fedeli@cea.fr> Co-authored-by: MaxThevenet <maxence.thevenet@desy.de> Co-authored-by: Peter Scherpelz <31747262+peterscherpelz@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Roelof <roelof.groenewald@modernelectron.com> * Readded accidently removed check for self.check_timestep() for diag plotting * updated particle data calls for new upstream API * Moved diag plotting test into /tests and fixed typo * Made reqested changes * Fixed an error when running on more than one proc * Diag step plotting unit test - Also includes commented out code for post processing unit test * Functionality and testing for plotting yt diagnostic files * Wrapped yt loading with pytest.warns(ResourceWarning) * Renamed test to show what file is being tested * Utilized diode_setup template * Small cleanup * Fix test_custom_criteria because it causes CircleCI to fail * Suggested changes * A few more suggested changes * Fixed issue in _libwarpx Co-authored-by: nruof <86024944+nruof@users.noreply.github.com> Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Co-authored-by: David Grote <grote1@llnl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Luca Fedeli <luca.fedeli@cea.fr> Co-authored-by: MaxThevenet <maxence.thevenet@desy.de> Co-authored-by: Peter Scherpelz <31747262+peterscherpelz@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Roelof <roelof.groenewald@modernelectron.com>
ax3l
reviewed
Sep 17, 2021
@@ -43,6 +43,7 @@ function ( generate_config_header ) | |||
set(COMPILER_ID_MACRO __PGI) | |||
elseif ( ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) OR | |||
("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" ) OR | |||
("${CMAKE_CXX_COMPILER_ID}" STREQUAL "ROCMClang" ) OR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Introduced in 3.21.0, this will be fixed in 3.21.3+:
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6533
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since CMake >= 3.21,
hipcc
is identified as ROCMClang and unwrapped toclang++
.AMD's
clang++
is still identified as vanillaClang
.References
Checklist
The proposed changes: