Skip to content

Commit 0ce42cd

Browse files
author
cassiope
committed
Revert "Merge pull request #73 from BconstantMMK/dev"
This reverts commit dee9876, reversing changes made to 7de6547.
1 parent dee9876 commit 0ce42cd

File tree

5 files changed

+54
-60
lines changed

5 files changed

+54
-60
lines changed

Fast/Fast/Fast/gsdr3.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,9 @@ E_Int rank =0;
242242

243243
// calcul metric si maillage deformable
244244
//
245-
#include "FastS/Metric/cp_metric.cpp"
245+
#include "../FastS/FastS/Metric/cp_metric.cpp"
246246
}
247247

248-
// init verrou omp
249-
#include "FastS/Compute/verrou_lhs_init.cpp"
250248
//---------------------------------------------------------------------
251249
// -----Boucle sur num.les domaines de la configuration
252250
// ---------------------------------------------------------------------

Fast/FastS/FastS/Compute/bcs.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@
4040
if(nd>=0){ correct_coins_(nd, param_int[nd], ipt_inddm_omp , iptro_CL[nd]); }
4141
}//autorisation
4242

43-
//Reinitialisation verrou omp rhs
44-
E_Int l = ntask*mx_synchro*Nbre_thread_actif + (ithread_loc-1)*mx_synchro;
45-
for (E_Int i = 0; i < mx_synchro ; i++) { ipt_lok[ l + i ] = 0; }
43+
44+
//Reinitialisation verrou omp
45+
//
46+
E_Int l = ntask*mx_synchro*Nbre_thread_actif + (ithread_loc-1)*mx_synchro;
47+
for (E_Int i = 0; i < mx_synchro ; i++) { ipt_lok[ l + i ] = 0; }
4648

4749
}//loop zone

Fast/FastS/FastS/Compute/gsdr3.cpp

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -232,39 +232,38 @@ if(nitcfg==1){param_real[0][TEMPS] = 0.0;}
232232
E_Int* ipt_ind_dm_omp_thread = ipt_ind_dm_socket + 6;
233233

234234
E_Int* ipt_nidom_loc, nb_subzone;
235-
/****************************************************
235+
/****************************************************
236236
-----Boucle sous-iteration
237-
****************************************************/
238-
E_Int nbtask = ipt_omp[nitcfg-1];
239-
E_Int ptiter = ipt_omp[nssiter+ nitcfg-1];
240-
241-
if( nitcfg == 1)
242-
{
243-
//mise a jour metric et vent ale zone cart et 3dhom(3dfull et 2d a la volee)
244-
for (E_Int ntask = 0; ntask < nbtask; ntask++)
245-
{
246-
E_Int pttask = ptiter + ntask*(6+Nbre_thread_actif*7);
247-
E_Int nd = ipt_omp[ pttask ];
248-
if(param_int[nd][LALE]==1) //maillage indeformable
249-
{
250-
mjr_ale_3dhomocart_(nd, param_int[nd] , param_real[nd] ,
251-
socket , Nbre_socket , ithread_sock , thread_parsock,
252-
ipt_ind_dm_socket , ipt_topology_socket,
253-
iptx[nd] , ipty[nd] , iptz[nd] ,
254-
ipti[nd] , iptj[nd] , iptk[nd] ,
255-
ipti0[nd] , iptj0[nd] , iptk0[nd] , iptvol[nd] ,
256-
iptventi[nd] , iptventj[nd] , iptventk[nd] );
257-
//modifier mjr_ale_3dhomocart_ pour faire sauter barrier
258-
#pragma omp barrier
237+
****************************************************/
238+
E_Int nbtask = ipt_omp[nitcfg-1];
239+
E_Int ptiter = ipt_omp[nssiter+ nitcfg-1];
240+
241+
if( nitcfg == 1)
242+
{
243+
//mise a jour metric et vent ale zone cart et 3dhom(3dfull et 2d a la volee)
244+
for (E_Int ntask = 0; ntask < nbtask; ntask++)
245+
{
246+
E_Int pttask = ptiter + ntask*(6+Nbre_thread_actif*7);
247+
E_Int nd = ipt_omp[ pttask ];
248+
if(param_int[nd][LALE]==1) //maillage indeformable
249+
{
250+
mjr_ale_3dhomocart_(nd, param_int[nd] , param_real[nd] ,
251+
socket , Nbre_socket , ithread_sock , thread_parsock,
252+
ipt_ind_dm_socket , ipt_topology_socket,
253+
iptx[nd] , ipty[nd] , iptz[nd] ,
254+
ipti[nd] , iptj[nd] , iptk[nd] ,
255+
ipti0[nd] , iptj0[nd] , iptk0[nd] , iptvol[nd] ,
256+
iptventi[nd] , iptventj[nd] , iptventk[nd] );
257+
//modifier mjr_ale_3dhomocart_ pour faire sauter barrier
258+
#pragma omp barrier
259+
}
260+
}//zone
261+
262+
263+
// calcul metric si maillage deformable
264+
//
265+
#include "FastS/Metric/cp_metric.cpp"
259266
}
260-
}//zone
261-
262-
// calcul metric si maillage deformable
263-
#include "FastS/Metric/cp_metric.cpp"
264-
}
265-
266-
// init verrou omp
267-
#include "FastS/Compute/verrou_lhs_init.cpp"
268267

269268

270269
//---------------------------------------------------------------------
@@ -299,9 +298,9 @@ if(nitcfg==1){param_real[0][TEMPS] = 0.0;}
299298
#include "FastS/Compute/cp_debitIBM.cpp"
300299
#endif
301300

302-
//#if defined __GNUC__ && defined _OPENMP
303-
//#pragma omp barrier
304-
//#endif
301+
#if defined __GNUC__ && defined _OPENMP
302+
#pragma omp barrier
303+
#endif
305304

306305
//
307306
//timer pour omp "dynamique"
@@ -320,6 +319,7 @@ if(nitcfg==1){param_real[0][TEMPS] = 0.0;}
320319
#include "FastS/Compute/Linear_solver/lhs.cpp"
321320
}
322321

322+
323323
// LUSGS
324324
else
325325
{

Fast/FastS/FastS/Compute/rhs.cpp

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
//printf("topo %d %d %d %d %d \n",ipt_topo_omp[0], ipt_topo_omp[1], ipt_topo_omp[2], Nbre_thread_actif_loc, nd );
2020
//printf("shif %d %d %d \n", shift_zone,shift_coe, shift_wig );
2121

22+
//Init verrou rhs pour chaque sous zone et chaque thread actif: init val to zero
23+
E_Int type = 4;
24+
E_Int* verrou_lhs_thread= verrou_lhs + ntask*Nbre_thread_actif + ithread_loc -1;
25+
verrou_c_( verrou_lhs_thread, type);
26+
verrou_lhs_thread = verrou_lhs + (nbtask + ntask)*Nbre_thread_actif + ithread_loc -1; //pour calcul residu avant LU
27+
verrou_c_( verrou_lhs_thread, type );
28+
2229
// Revoir cet adressage si scater et socket>1 et ou nidom >1
2330
E_Int* ipt_lok_thread = ipt_lok + ntask*mx_synchro*Nbre_thread_actif;
2431

@@ -51,16 +58,19 @@
5158
iptdrodm + shift_zone , iptcoe + shift_coe , iptdelta[nd] , iptro_res[nd] , iptsrc[nd] );
5259

5360
//Flush Rhs
54-
//E_Int size = param_int[nd][NEQ]*param_int[nd][NDIMDX];
61+
E_Int size = param_int[nd][NEQ]*param_int[nd][NDIMDX];
5562
//flush_real_( size , iptdrodm + shift_zone);
5663
if(nitcfg==1)
5764
{
58-
E_Int size = param_int[nd][NEQ_COE]*param_int[nd][NDIMDX];
65+
size = param_int[nd][NEQ_COE]*param_int[nd][NDIMDX];
5966
flush_real_( size , iptcoe + shift_coe);
6067
}
68+
//size = param_int[nd][NDIMDX];
69+
//flush_real_( size , iptmut[nd]);
70+
//#pragma omp flush
6171
//Go verrou rhs pour chaque sous zone et chaque thread actif: valeur mise a un
62-
E_Int type = 1;
63-
E_Int* verrou_lhs_thread= verrou_lhs + ntask*Nbre_thread_actif + ithread_loc -1;
72+
type = 1;
73+
verrou_lhs_thread= verrou_lhs + ntask*Nbre_thread_actif + ithread_loc -1;
6474
verrou_c_( verrou_lhs_thread, type );
6575

6676
if(ithread_loc==1 && lexit_lu==0 && nitcfg*nitrun >15 and (nitcfg < 3 or nitcfg == nssiter-1) ){ timer_omp[cpu_perzone]+=1; } //nbre echantillon

Fast/FastS/FastS/Compute/verrou_lhs_init.cpp

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)