Skip to content

[Kokkos] Porting Op_Dift_VDF_Elem_base::calculer_dt_stab_elem - #22

Draft
fmgjcoppens wants to merge 9 commits into
ledac/next_gpu_rebasedfrom
coppens/port_Op_Dift_VDF_Elem_base__calculer_dt_stab_elem
Draft

[Kokkos] Porting Op_Dift_VDF_Elem_base::calculer_dt_stab_elem#22
fmgjcoppens wants to merge 9 commits into
ledac/next_gpu_rebasedfrom
coppens/port_Op_Dift_VDF_Elem_base__calculer_dt_stab_elem

Conversation

@fmgjcoppens

@fmgjcoppens fmgjcoppens commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

This PR implements the Kokkos port of Op_Dift_VDF_Elem_base::calculer_dt_stab_elem

Regression tests do not all pass.

Thu Jul 23 08:40:07 UTC 2026 : Test results with the version dated Jul 23 08:40
Binary: /workspace/trust-dev-cuda/exec/TRUST_mpi_opt
 -------------------------------------------------------------------------------------------
| START  | END    |  CPU | NP | SPU | NDT |  GCP | ELEM | MEM  | PLOTS | STATE | NAME
 -------------------------------------------------------------------------------------------
|08:40:08|08:40:09| 0.5s|..1.|.....|....0|.....0|..8400|.638Mo|.......| 3 ecarts |CANAL_QC_Timposees_dt20K
|08:40:09|08:40:10|  0.4s|..4.|1.125|....0|.....0|..8400|2422Mo|....6/6| OK    |PAR_CANAL_QC_Timposees_dt20K
|08:40:10|08:40:11| 0.5s|..1.|.....|....0|.....0|..8400|.633Mo|.......| 3 ecarts |CANAL_QC_Timposees_dt20K_Turb_Null
|08:40:11|08:40:12|  0.4s|..4.|1.101|....0|.....0|..8400|2408Mo|....6/6| OK    |PAR_CANAL_QC_Timposees_dt20K_Turb_Null
|08:40:13|08:40:13|  0.2s|..1.|.....|....0|.....0|...100|.616Mo|.......| OK    |Constituants_Turb_Null
|08:40:13|08:40:14|  0.2s|..2.|0.902|....0|.....0|...100|1200Mo|....7/7| OK    |PAR_Constituants_Turb_Null
|08:40:15|08:40:16|  0.7s|..1.|.....|....0|.....0|..4752|.641Mo|.......| OK    |Couplage_champ_cl_VDF
|08:40:16|08:40:17|  0.7s|..2.|0.826|....0|.....0|..4752|1238Mo|..12/12| OK    |PAR_Couplage_champ_cl_VDF
|08:40:18|08:40:19|  0.7s|..1.|.....|....0|.....0|..8320|.637Mo|.......| OK    |Couplage_champ_cl_VDF_Turb_Null
|08:40:19|08:40:20|  0.7s|..2.|0.858|....0|.....0|..8320|1233Mo|..12/12| OK    |PAR_Couplage_champ_cl_VDF_Turb_Null
|08:40:20|08:40:20|  0.2s|..1.|.....|....0|.....0|....63|.624Mo|.......| OK    |Extraction_Front_VDF
|08:40:22|08:40:23|  0.3s|..1.|.....|....0|.....0|..2650|.775Mo|.......| OK    |Marche3D_les_jdd5
|08:40:23|08:40:24|  0.4s|..4.|0.867|....0|.....0|..2650|3193Mo|....6/6| OK    |PAR_Marche3D_les_jdd5
|08:40:25|08:40:26|  0.3s|..1.|.....|....0|.....0|..2650|.774Mo|.......| OK    |Marche3D_les_jdd6
|08:40:26|08:40:27|  0.4s|..4.|0.947|....0|.....0|..2650|3203Mo|....6/6| OK    |PAR_Marche3D_les_jdd6
|08:40:27|%%:%%:%%|%%%%%%|%%%%|%%%%%|%%%%%|%%%%%%|%%%%%%|%%%%%%|%%%%%%%| CORE |QC_Turb_VDF_diff_impl
|08:40:28|%%:%%:%%|%%%%%%|%%%%|%%%%%|%%%%%|%%%%%%|%%%%%%|%%%%%%|%%%%%%%| CORE |PAR_QC_Turb_VDF_diff_impl
|08:40:29|%%:%%:%%|%%%%%%|%%%%|%%%%%|%%%%%|%%%%%%|%%%%%%|%%%%%%|%%%%%%%| CORE |QC_VDF_diff_impl_Turb_Null
|08:40:30|%%:%%:%%|%%%%%%|%%%%|%%%%%|%%%%%|%%%%%%|%%%%%%|%%%%%%|%%%%%%%| CORE |PAR_QC_VDF_diff_impl_Turb_Null
|08:40:32|08:40:33| 0.9s|..1.|.....|....0|.....0|...320|.622Mo|.......| 4 ecarts |QC_centre4_VDF
|08:40:33|08:40:37| 2.6s|..6.|.....|....0|.....0|...320|3554Mo|....5/6| FALSE |PAR_QC_centre4_VDF
|08:40:37|08:40:38| 0.9s|..1.|.....|....0|.....0|...320|.618Mo|.......| 6 ecarts |QC_centre4_VDF_Turb_Null
|08:40:38|08:40:42| 2.4s|..6.|.....|....0|.....0|...320|3549Mo|....5/6| FALSE |PAR_QC_centre4_VDF_Turb_Null
|08:40:42|08:40:43| 0.2s|..1.|.....|....0|.....0|...500|.623Mo|.......| 6 ecarts |Quasi_Comp_ThHyd_Sutherland
|08:40:43|08:40:44|  0.3s|..2.|0.623|....0|.....0|...500|1215Mo|....6/6| OK    |PAR_Quasi_Comp_ThHyd_Sutherland
|08:40:44|08:40:44| 0.4s|..1.|.....|....0|.....0|..4524|.628Mo|.......| 3 ecarts |TP_Profils_VDF
|08:40:45|08:40:45|  0.2s|..1.|.....|....0|.....0|...819|.621Mo|.......| OK    |WALE_Canal_ThHyd_VDF
|08:40:45|08:40:46|  0.2s|..2.|0.698|....0|.....0|...819|1210Mo|....6/6| OK    |PAR_WALE_Canal_ThHyd_VDF
|08:40:47|08:40:50|  2.7s|..1.|.....|....0|.....0|..3136|.623Mo|.......| OK    |quick_ThHyd_VDF
|08:40:50|08:40:54|  3.8s|..2.|0.705|....0|.....0|..3136|1214Mo|....6/6| OK    |PAR_quick_ThHyd_VDF
 -----------------------------------------------------------------------------------------

Successful tests cases :8/16

Successful tests cases in parallel mode :10/14

26 test cases run in 21.2 s ( 1 s/test), so less than 1 hours

1 test cases skipped

List of unsuccessful tests cases :
CANAL_QC_Timposees_dt20K
CANAL_QC_Timposees_dt20K_Turb_Null
QC_Turb_VDF_diff_impl
QC_VDF_diff_impl_Turb_Null
QC_centre4_VDF
QC_centre4_VDF_Turb_Null
Quasi_Comp_ThHyd_Sutherland
TP_Profils_VDF

List of skipped tests cases :
Turbulence/DYN_plans_paralleles_Turb_Null/DYN_plans_paralleles_Turb_Null.lml.gz

Comparing last iteration of the first function call of the reference branch and the development branch (using test case QC_Turb_VDF_diff_impl):

DEBUG: run = 0  DEBUG: run = 0
DEBUG: thread = 3374, rcp = 597.654606  DEBUG: thread = 3374, rcp = 597.654606
DEBUG: thread = 3374, moy = 169222523.811348    DEBUG: thread = 3374, moy = 169222523.811348
DEBUG: thread = 3374, alpha_local = 11912.282195        DEBUG: thread = 3374, alpha_local = 11912.282195
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = -inf
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = 11912.282195
DEBUG: coef = 11912.282195      DEBUG: coef = inf
DEBUG: coef = 11912.282195      DEBUG: coef = inf
DEBUG: dt_stab = 0.000042       DEBUG: dt_stab = 0.000000
DEBUG: run = 1  DEBUG: run = 1
DEBUG: thread = 3374, rcp = 597.654606  DEBUG: thread = 3374, rcp = 597.654606
DEBUG: thread = 3374, moy = 169222523.811348    DEBUG: thread = 3374, moy = 169222523.811348
DEBUG: thread = 3374, alpha_local = 11912.282195        DEBUG: thread = 3374, alpha_local = 11912.282195
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = -inf
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = 11912.282195
DEBUG: coef = 11912.282195      DEBUG: coef = inf
DEBUG: coef = 11912.282195      DEBUG: coef = inf
DEBUG: dt_stab = 0.000042       DEBUG: dt_stab = 0.000000
DEBUG: run = 2  DEBUG: run = 2
DEBUG: thread = 3374, rcp = 597.654606  DEBUG: thread = 3374, rcp = 597.654606
DEBUG: thread = 3374, moy = 169222523.811348    DEBUG: thread = 3374, moy = 169222523.811348
DEBUG: thread = 3374, alpha_local = 11912.282195        DEBUG: thread = 3374, alpha_local = 11912.282195
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = -inf
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = 11912.282195
DEBUG: coef = 11912.282195      DEBUG: coef = 11912.282195
DEBUG: coef = 11912.282195      DEBUG: coef = 11912.282195
DEBUG: dt_stab = 0.000042       DEBUG: dt_stab = 0.000042

Some executions there are only 3 function calls instead of 23. In this case the values of the variables in both cases match up, but only for the first call:

DEBUG: run = 0  DEBUG: run = 0
DEBUG: thread = 3374, rcp = 597.654606  DEBUG: thread = 3374, rcp = 597.654606
DEBUG: thread = 3374, moy = 169222523.811348    DEBUG: thread = 3374, moy = 169222523.811348
DEBUG: thread = 3374, alpha_local = 11912.282195        DEBUG: thread = 3374, alpha_local = 11912.282195
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = -inf
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = 11912.282195
DEBUG: coef = 11912.282195      DEBUG: coef = 11912.282195
DEBUG: coef = 11912.282195      DEBUG: coef = 11912.282195
DEBUG: dt_stab = 0.000042       DEBUG: dt_stab = 0.000042
DEBUG: run = 1  DEBUG: run = 1
DEBUG: thread = 3374, rcp = 597.654606  DEBUG: thread = 3374, rcp = 597.654606
DEBUG: thread = 3374, moy = 169222523.811348    DEBUG: thread = 3374, moy = 169222523.811348
DEBUG: thread = 3374, alpha_local = 11912.282195        DEBUG: thread = 3374, alpha_local = 11912.282195
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = -inf
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = 11912.282195
DEBUG: coef = 11912.282195      DEBUG: coef = inf
DEBUG: coef = 11912.282195      DEBUG: coef = inf
DEBUG: dt_stab = 0.000042       DEBUG: dt_stab = 0.000000
DEBUG: run = 2  DEBUG: run = 2
DEBUG: thread = 3374, rcp = 597.654606  DEBUG: thread = 3374, rcp = 597.654606
DEBUG: thread = 3374, moy = 169222523.811348    DEBUG: thread = 3374, moy = 169222523.811348
DEBUG: thread = 3374, alpha_local = 11912.282195        DEBUG: thread = 3374, alpha_local = 11912.282195
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = -inf
DEBUG: thread = 3374, coef = 11912.282195       DEBUG: thread = 3374, l_coef = 11912.282195
DEBUG: coef = 11912.282195      DEBUG: coef = inf
DEBUG: coef = 11912.282195      DEBUG: coef = inf
DEBUG: dt_stab = 0.000042       DEBUG: dt_stab = 0.000000

@fmgjcoppens
fmgjcoppens marked this pull request as draft July 24, 2026 14:52
@fmgjcoppens fmgjcoppens changed the title Coppens/port op dift vdf elem base calculer dt stab elem [Kokkos] Porting Op_Dift_VDF_Elem_base::calculer_dt_stab_elem Jul 24, 2026
@fmgjcoppens
fmgjcoppens requested a review from pledac July 24, 2026 15:16
fmgjcoppens and others added 9 commits July 27, 2026 16:39
Changed loop structure. Pulled out the branch for !is_concentration and
put the loops inside it. Regression tests still pass.
Final value of `coef` is infinite, after the parallel reduction is
finished.
@fmgjcoppens
fmgjcoppens force-pushed the coppens/port_Op_Dift_VDF_Elem_base__calculer_dt_stab_elem branch from 4d790b7 to 66faeca Compare July 27, 2026 14:41
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.

1 participant