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

Feature: set OpenMP thread num to a proper default value #3943

Merged
merged 13 commits into from
May 22, 2024
Prev Previous commit
Next Next commit
add variable explanation in doxygen format
caic99 committed May 12, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 45face516b0f3311e91d56e44db54a53ea84291a
25 changes: 9 additions & 16 deletions source/module_base/global_variable.cpp
Original file line number Diff line number Diff line change
@@ -107,26 +107,19 @@ std::vector<double> ocp_kb;
bool out_mul = false; // qifeng add 2019/9/10
//----------------------------------------------------------
// EXPLAIN : Parallel information
// GLOBAL VARIABLES :
// NAME : NPROC( global number of process )
// NAME : KPAR( global number of pools )
// NAME : MY_RANK( global index of process )
// NAME : MY_POOL( global index of pool (count in pool))
// NAME : NPROC_IN_POOL( local number of process in a pool.)
// NAME : RANK_IN_POOL( global index of pool (count in process),
// my_rank in each pool)
//----------------------------------------------------------
int NPROC = 1;
int KPAR = 1;

int NPROC = 1; ///< global number of process
int KPAR = 1; ///< global number of pools
int NSTOGROUP = 1;
int MY_RANK = 0;
int MY_POOL = 0;
int MY_RANK = 0; ///< global index of process
int MY_POOL = 0; ///< global index of pool (count in pool)
int MY_STOGROUP = 0;
int NPROC_IN_POOL = 1;
int NPROC_IN_POOL = 1; ///< local number of process in a pool
int NPROC_IN_STOGROUP = 1;
int RANK_IN_POOL = 0;
int RANK_IN_POOL = 0; ///< global index of pool (count in process), my_rank in each pool
int RANK_IN_STOGROUP = 0;
int DRANK = -1; // mohan add 2012-01-13, must be -1, so we can recognize who didn't in DIAG_WORLD
int DRANK = -1; ///< mohan add 2012-01-13, must be -1, so we can recognize who didn't in DIAG_WORLD
int DSIZE = KPAR;
int DCOLOR = -1;
int GRANK = MY_RANK;
@@ -236,7 +229,7 @@ double of_tole = 2e-6;
double of_tolp = 1e-5;
double of_tf_weight = 1.;
double of_vw_weight = 1.;
double of_wt_alpha = 5./6.;
double of_wt_alpha = 5./6.;
double of_wt_beta = 5./6.;
double of_wt_rho0 = 0.;
bool of_hold_rho0 = false;