Skip to content

Commit b0b50d7

Browse files
authored
Merge pull request #92 from IvanMary69/dev
Fast: detection interp O4 pour prevoir 2 passes transfert
2 parents c86acee + b367724 commit b0b50d7

File tree

7 files changed

+18
-10
lines changed

7 files changed

+18
-10
lines changed

Fast/Fast/Fast/PyTree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def warmup(t, tc=None, graph=None, infos_ale=None, Adjoint=False, tmy=None, list
214214
# Compactage arbre transfert et mise a jour FastC.HOOK
215215
#
216216
if tc is not None:
217-
X.miseAPlatDonorTree__(zones, tc, graph=graph, list_graph=list_graph)
217+
X.miseAPlatDonorTree__( t, tc, graph=graph, list_graph=list_graph)
218218

219219
FastC.HOOK['param_int_tc'] = Internal.getNodeFromName1( tc, 'Parameter_int' )[1]
220220
param_real_tc = Internal.getNodeFromName1( tc, 'Parameter_real')

Fast/FastC/FastC/Com/flux_conservatif_5eq_Recep.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
E_Int pt_bcs = param_int[ NoR ][PT_BC];
55
E_Int nb_bc = param_int[ NoR ][pt_bcs];
6-
E_Int idir = param_int[ NoR ][pt_bcs + 1 + nobcR +BC_IDIR];
6+
E_Int pt_bc = param_int[ NoR ][pt_bcs + 1 + nobcR];
7+
E_Int idir = param_int[ NoR ][pt_bc +BC_IDIR];
78
E_Int adrFlu = param_int[ NoR ][pt_bcs + 1 + nobcR + nb_bc] +3;
89
E_Float* fluxR = param_real[ NoR ] + adrFlu;
910
E_Float* ratio = fluxR-3;
@@ -16,7 +17,7 @@
1617

1718
E_Int shift = nvars_loc * (nbRcvPts + shift_fluR);
1819
shift_fluR += sizefluR;
19-
//printf("No raccord Recep %d , nbRcvPts: %d , sizefluR: %d, shift_fluR: %d \n", nobcR, nbRcvPts, sizefluR, shift_fluR);
20+
//printf("NoR: %d , No raccord Recep %d , sizefluD: %d , sizefluR: %d, shift_fluR: %d idir: %d ratio: %d %d %d \n", NoR, nobcR, sizefluD, sizefluR, shift_fluR, idir, ratio_i,ratio_j,ratio_k);
2021
#pragma omp for nowait
2122
for (E_Int l = 0; l < sizefluR*nvars_loc; l++)
2223
{

Fast/FastC/FastC/PyTree.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ def _buildOwnData(t, Padding):
11791179
size_omp = MX_OMP_SIZE_INT
11801180

11811181
nitCyclLBM = 2**(maxlevel-1)
1182-
dtdim = 12 + nitCyclLBM
1182+
dtdim = 13 + nitCyclLBM
11831183
#print('ncycl_LBM', nitCyclLBM, maxlevel)
11841184

11851185
datap = numpy.zeros((dtdim+ size_omp), Internal.E_NpyInt)
@@ -1195,13 +1195,14 @@ def _buildOwnData(t, Padding):
11951195
datap[9] = maxlevel
11961196
datap[10]= LBMCycleIteration # No it du cycle integration temporelle LBM
11971197
datap[11]= dtdim # shift pour acceder au info OMP
1198+
datap[12]= 1 # nbre de pass pour transfert
11981199

11991200
# level max pour chaque it du cycle LBM
12001201
for it in range(nitCyclLBM):
12011202
for level in range(maxlevel,0,-1):
12021203
it_tg = 2**(level-1)
12031204
if it%it_tg == 0:
1204-
datap[12+it] = level
1205+
datap[13+it] = level
12051206
#print('Nblevel',datap[12+it],'itCycl=',it )
12061207
break
12071208

@@ -2656,10 +2657,10 @@ def switchPointersLBM__(zones, dtloc):
26562657
level = param_int[VSHARE.LEVEL]
26572658
maxlevel = dtloc[ 9]
26582659
it_cycl_lbm = dtloc[10]
2659-
level_tg = dtloc[12 +it_cycl_lbm]
2660+
level_tg = dtloc[13 +it_cycl_lbm]
26602661
max_it = 2**( maxlevel-1)
26612662
level_next_it = maxlevel;
2662-
if it_cycl_lbm != max_it -1 : level_next_it = dtloc[12 +it_cycl_lbm +1]
2663+
if it_cycl_lbm != max_it -1 : level_next_it = dtloc[13 +it_cycl_lbm +1]
26632664

26642665
#if level==1 or (level >=2 and level <= level_next_it) :
26652666
if level <= level_next_it :

Fast/FastS/FastS/Compute/gsdr3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ E_Int nitcfg_stk = nitcfg;
363363
if(lexit_lu ==0 && layer_mode>=1)
364364
{
365365
//remplissage ghost transfert
366-
for (E_Int ipass = 0; ipass < 1; ipass++)
366+
for (E_Int ipass = 0; ipass < iptdtloc[12]; ipass++)
367367
{
368368
#include "FastS/Compute/transfert_multiblock.cpp"
369369
}

Fast/FastS/FastS/Compute/lhs.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ if( kimpli == 1 && param_int[0][LU_MATCH]==1 && param_int_tc != NULL)
152152

153153
if(param_int[nd][LU_MATCH]==1 || param_int[nd][NB_RELAX]>1) iptdrodm_out = ipt_ssortmp_shift;
154154

155+
//printf("lu %d %d %d %d %d %d \n",ipt_shift_lu[0], ipt_shift_lu[1], ipt_shift_lu[2], ipt_shift_lu[3], ipt_shift_lu[4], ipt_shift_lu[5]);
156+
155157
invlu_(nd , nitcfg , nitrun ,
156158
param_int[nd] , param_real[nd] ,
157159
ipt_shift_lu , ipt_ind_dm_thread , mjrnewton ,

Fast/FastS/FastS/Mpi.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,11 @@ def warmup(t, tc, graph=None, infos_ale=None, Adjoint=False, tmy=None, list_grap
892892
# print(h0, -1, nbpts_linelets)
893893
_createTBLESA2(t, tc, h0=h0, hn=-1, nbpts_linelets=nbpts_linelets)
894894

895-
X.miseAPlatDonorTree__(zones, tc, graph=graph,list_graph=list_graph, nbpts_linelets=nbpts_linelets)
895+
X.miseAPlatDonorTree__(t, tc, graph=graph,list_graph=list_graph, nbpts_linelets=nbpts_linelets)
896+
897+
npass_transfer = dtloc[12]
898+
npass_transfer = Cmpi.allreduce(npass_transfer)
899+
if npass_transfer > Cmpi.size: dtloc[12]=2
896900

897901
FastC.HOOK['param_int_tc'] = Internal.getNodeFromName1( tc, 'Parameter_int')[1]
898902
param_real_tc = Internal.getNodeFromName1( tc, 'Parameter_real')

Fast/FastS/FastS/PyTree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def warmup(t, tc, graph=None, infos_ale=None, Adjoint=False, tmy=None, list_grap
495495
_createTBLESA(tc, h0=h0, hn=-1, nbpts_linelets=nbpts_linelets)
496496
_createTBLESA2(t, tc, h0=h0, hn=-1, nbpts_linelets=nbpts_linelets)
497497

498-
X.miseAPlatDonorTree__(zones, tc, graph=graph, list_graph=list_graph, nbpts_linelets=nbpts_linelets)
498+
X.miseAPlatDonorTree__(t, tc, graph=graph, list_graph=list_graph, nbpts_linelets=nbpts_linelets)
499499

500500
FastC.HOOK['param_int_tc'] = Internal.getNodeFromName1( tc, 'Parameter_int' )[1]
501501
param_real_tc = Internal.getNodeFromName1(tc, 'Parameter_real')

0 commit comments

Comments
 (0)