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

[icon] Adds variant 'gpu' #782

Merged
merged 14 commits into from
Jul 13, 2023
Merged

[icon] Adds variant 'gpu' #782

merged 14 commits into from
Jul 13, 2023

Conversation

dominichofer
Copy link
Contributor

@dominichofer dominichofer commented Jun 30, 2023

The variant "gpu" follows closer the configure of icon.
This change is required to use --enable-gpu=openacc for the configure script in ICON

@dominichofer dominichofer changed the title [icon] Adds variant 'gpu'. [icon] Adds variant 'gpu' and dependency on hip Jun 30, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 30, 2023

PR Preview Action v1.4.4
Preview removed because the pull request was closed.
2023-07-13 15:27 UTC

@lxavier
Copy link
Contributor

lxavier commented Jul 4, 2023

when I compile icon I would like to have only: +gpu=openacc+cuda would this be the case, or do I also need to set +cuda ?

@dominichofer
Copy link
Contributor Author

+gpu=openacc+cuda conflicts with ~cuda, so it should cause +cuda automatically.

@lxavier
Copy link
Contributor

lxavier commented Jul 4, 2023

+gpu=openacc+cuda conflicts with ~cuda, so it should cause +cuda automatically.

ok , is this the spack behavior, is not going to give an error because default is ~cuda ?
Should we not have a "depends_on" like depends_on(cuda,when='openacc+cuda' ?

@dominichofer
Copy link
Contributor Author

No, no error.
depends_on('cuda', when='gpu=openacc+cuda') would only make the package depend on the cuda library. The variant cuda would be unaffected. But the variant 'cuda_arch' in spack.CudaPackage is only available when +cuda. Therefore I think it's simpler to make the variant cuda follow the variant gpu to leverage spack.CudaPackage's functionality.

@dominichofer
Copy link
Contributor Author

launch jenkins icon

@dominichofer dominichofer changed the title [icon] Adds variant 'gpu' and dependency on hip [icon] Adds variant 'gpu' Jul 4, 2023
@jenkins-apn
Copy link

tsa

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec

@jenkins-apn
Copy link

balfrin

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec
🟢 system test
Test
🟢Icon-install_nwp_cpu
🟢Icon-install_nwp_gpu

@jenkins-apn
Copy link

daint

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec
🔴 system test
Test
🔴daint_cpu_cce
🟢daint_cpu_gcc
🟢daint_cpu_nvhpc
🟢daint_cpu_nvhpc_out_of_source
🟢daint_gpu_nvhpc

WARNING: Serial tests did not run for system tests

@dominichofer
Copy link
Contributor Author

launch jenkins icon

@jenkins-apn
Copy link

tsa

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec

@jenkins-apn
Copy link

balfrin

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec
🟢 system test
Test
🟢Icon-install_nwp_cpu
🟢Icon-install_nwp_gpu

@jenkins-apn
Copy link

daint

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec
🔴 system test
Test
🟢daint_cpu_cce
🔴daint_cpu_gcc
🟢daint_cpu_nvhpc
🟢daint_cpu_nvhpc_out_of_source
🟢daint_gpu_nvhpc

WARNING: Serial tests did not run for system tests

@dominichofer dominichofer marked this pull request as ready for review July 6, 2023 15:17
@dominichofer
Copy link
Contributor Author

daint_cpu_cce and daint_cpu_cce both passed once, for the same commit. We think that the tests are just flaky and it's not within the scope of this PR to fix that.
@jonasjucker Do you agree? Can we merge?

@dominichofer dominichofer requested a review from jonasjucker July 6, 2023 15:21
Copy link
Contributor

@jonasjucker jonasjucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far this variant has no effect. There is no logic bound to it.

Is this on purpose?
I cannot make sense of it.

@lxavier
Copy link
Contributor

lxavier commented Jul 10, 2023

@jonasjucker this is my request: in the current mast the "gpu" build is named "cuda" which is specific to nvidia gpu's and do not reflect the configure script of ICON. Now we have in icon a --enable-gpu=openacc configure option. I need this PR to use it, the corresponding ICON PR is here: https://gitlab.dkrz.de/icon/icon-nwp/-/merge_requests/950
I already reviewed this. The request was not to review but to notify you that we are going to merge although the CI is red on daint. @PanicSheep run it multiple time with out changing the PR and all test succeeded at list once, so we assume this PR is not breaking anything on daint, but there is an issue with the testing. Do you agree ?
I have updated the description

@jonasjucker
Copy link
Contributor

Our tests for ICON are not complete yet.
icon-exclaim with dsl builds are still missing.
I need to understand the changes in this PR to adapt the recipes there.

So my question:
How is the gpu-compilation switch on/off in the env in MR: https://gitlab.dkrz.de/icon/icon-nwp/-/merge_requests/950#139ea4d5ba0b7d8948ab82cd264f57550c4ec414

gpu=openacc+cuda does not do it, since no logic bound to this variant.
I suspect that spack evaluates gpu=openacc+cuda as gpu=openacc and +cuda, so you are setting variant cuda unwillingly to True. This could be because variant gpu uses spack-spec-dsl syntax as possible values.

Alternatively it works because we only check for
if '+cuda' in self.spec: in the recipe.

If so this is very blurry: does +cuda now comes from CudaPackage or from the variant gpu?
If the latter is the case we could remove CudaPackage again from the recipe of icon.

@lxavier
Copy link
Contributor

lxavier commented Jul 10, 2023

Actually I think we need to pass the openacc+cuda to the configure script, this has other side effects which are needed

@lxavier
Copy link
Contributor

lxavier commented Jul 10, 2023

  • I made a try to set --enable-gpu=openacc+gpu

@jonasjucker
Copy link
Contributor

launch jenkins icon

@jenkins-apn
Copy link

tsa

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec

@jenkins-apn
Copy link

balfrin

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec
🟢 system test
Test
🟢Icon-install_nwp_cpu
🟢Icon-install_nwp_gpu

@jenkins-apn
Copy link

daint

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec
🟢 system test
Test
🟢daint_cpu_cce
🟢daint_cpu_gcc
🟢daint_cpu_nvhpc
🟢daint_cpu_nvhpc_out_of_source
🟢daint_gpu_nvhpc

@jonasjucker jonasjucker self-requested a review July 11, 2023 08:05
@jonasjucker
Copy link
Contributor

LGTM.
Is compatible with existing spack.yaml of ICON

@dominichofer
Copy link
Contributor Author

launch jenkins icon

@jenkins-apn
Copy link

tsa

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec

@jenkins-apn
Copy link

balfrin

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec
🟢 system test
Test
🟢Icon-install_nwp_cpu
🟢Icon-install_nwp_gpu

@jenkins-apn
Copy link

daint

🟢 unit test
Test
🟢summary
🟢 integration test
Test
🟢icon-spack_info
🟢icon-spack_spec
🟢icon_serialization=create_claw=std-spack_spec
🔴 system test
Test
🔴daint_cpu_cce
🔴daint_cpu_gcc
🟢daint_cpu_nvhpc
🟢daint_cpu_nvhpc_out_of_source
🟢daint_gpu_nvhpc

WARNING: Serial tests did not run for system tests

@lxavier
Copy link
Contributor

lxavier commented Jul 11, 2023

I still need to run the test with ICON: https://gitlab.dkrz.de/icon/icon-nwp/-/merge_requests/950 before this can be merged

@C2SM C2SM deleted a comment from jenkins-apn Jul 11, 2023
@C2SM C2SM deleted a comment from jenkins-apn Jul 11, 2023
@C2SM C2SM deleted a comment from jenkins-apn Jul 11, 2023
@lxavier
Copy link
Contributor

lxavier commented Jul 12, 2023

@PanicSheep the test is running here https://gitlab.dkrz.de/icon/icon-nwp/-/pipelines/39788 , you can merge if green, otherwise I'll need to look at it.

@lxavier
Copy link
Contributor

lxavier commented Jul 13, 2023

We have a workaround for the issue in the ICON MR, with this the test is green : https://bb-prod8.dkrz.de/#/builders/87/builds/22 you can merge and create the release

@dominichofer dominichofer merged commit 5c54ccd into main Jul 13, 2023
@dominichofer dominichofer deleted the icon_gpu branch July 13, 2023 15:27
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.

4 participants