Skip to content

Commit

Permalink
Remove schedule(guided) clause as it may be implementation dependent
Browse files Browse the repository at this point in the history
Strange behavior was observed with guided option on conda linux
  • Loading branch information
ttadano committed May 26, 2022
1 parent a4d0e07 commit a62ae65
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/constraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ void Constraint::get_constraint_translation(const Cell &supercell,

const_now_omp.resize(nparams);
#ifdef _OPENMP
#pragma omp for private(isize, ixyz, jcrd, j, jat, iter_found, loc_nonzero), schedule(guided), nowait
#pragma omp for private(isize, ixyz, jcrd, j, jat, iter_found, loc_nonzero), nowait
#endif
for (idata = 0; idata < ndata; ++idata) {

Expand Down Expand Up @@ -1474,7 +1474,7 @@ void Constraint::get_constraint_translation_for_mirror_images(const Cell &superc

consts_now_omp.resize(n_mirror_images, std::vector<double>(nparams));
#ifdef _OPENMP
#pragma omp for private(isize, ixyz, jcrd, j, jat, iter_found, loc_nonzero, i_mirror_images), schedule(guided), nowait
#pragma omp for private(isize, ixyz, jcrd, j, jat, iter_found, loc_nonzero, i_mirror_images), nowait
#endif
for (idata = 0; idata < ndata; ++idata) {

Expand Down
2 changes: 1 addition & 1 deletion src/fcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ void Fcs::set_forceconstant_cartesian(const int maxorder,
{
std::vector<ForceConstantTable> fc_cart_omp;

#pragma omp for private(prod_matrix, j), schedule(guided), nowait
#pragma omp for private(prod_matrix, j), nowait
for (int igrp = 0; igrp < ngrp; ++igrp) {
for (auto ixyz = 0; ixyz < nxyz; ++ixyz) {

Expand Down
6 changes: 3 additions & 3 deletions src/optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,7 @@ void Optimize::get_matrix_elements(const int maxorder,
allocate(amat_orig_tmp, natmin3, ncols);

#ifdef _OPENMP
#pragma omp for schedule(guided)
#pragma omp for
#endif
for (irow = 0; irow < ncycle; ++irow) {

Expand Down Expand Up @@ -2210,7 +2210,7 @@ void Optimize::get_matrix_elements_algebraic_constraint(const int maxorder,
allocate(amat_mod_tmp, natmin3, ncols_new);

#ifdef _OPENMP
#pragma omp for schedule(guided)
#pragma omp for
#endif
for (irow = 0; irow < ncycle; ++irow) {

Expand Down Expand Up @@ -2408,7 +2408,7 @@ void Optimize::get_matrix_elements_in_sparse_form(const int maxorder,
allocate(amat_mod_tmp, natmin3, ncols_new);

#ifdef _OPENMP
#pragma omp for schedule(guided)
#pragma omp for
#endif
for (irow = 0; irow < ncycle; ++irow) {

Expand Down

0 comments on commit a62ae65

Please sign in to comment.