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

Fix the issue caused by adding cflag NDEBUG #672

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_FLAGS "-Wall -Werror")
set(CMAKE_CXX_FLAGS "-Wall -Werror -DNDEBUG")

if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
Expand Down
8 changes: 4 additions & 4 deletions src/Drivers/Dense/NlpDenseConsEx1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Ex1Meshing1D::Ex1Meshing1D(double a, double b, size_type glob_n, double r, MPI_C
comm=comm_;
comm_size=1; my_rank=0;
#ifdef HIOP_USE_MPI
int ierr = MPI_Comm_size(comm, &comm_size); assert(MPI_SUCCESS==ierr);
ierr = MPI_Comm_rank(comm, &my_rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(comm, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
ierr = MPI_Comm_rank(comm, &my_rank); assert(MPI_SUCCESS==ierr); (void)ierr;
#endif
// set up vector distribution for primal variables - easier to store it as a member in this simple example
col_partition = new index_type[comm_size+1];
Expand Down Expand Up @@ -121,7 +121,7 @@ double DiscretizedFunction::dotProductWith( const hiopVector& v_ ) const

#ifdef HIOP_USE_MPI
double dotprodG;
int ierr = MPI_Allreduce(&dot, &dotprodG, 1, MPI_DOUBLE, MPI_SUM, comm_); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Allreduce(&dot, &dotprodG, 1, MPI_DOUBLE, MPI_SUM, comm_); assert(MPI_SUCCESS==ierr); (void)ierr;
dot=dotprodG;
#endif
return dot;
Expand Down Expand Up @@ -150,7 +150,7 @@ double DiscretizedFunction::twonorm() const

#ifdef HIOP_USE_MPI
double nrm_squareG;
int ierr = MPI_Allreduce(&nrm_square, &nrm_squareG, 1, MPI_DOUBLE, MPI_SUM, comm_); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Allreduce(&nrm_square, &nrm_squareG, 1, MPI_DOUBLE, MPI_SUM, comm_); assert(MPI_SUCCESS==ierr); (void)ierr;
nrm_square=nrm_squareG;
#endif
return sqrt(nrm_square);
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Dense/NlpDenseConsEx1Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int main(int argc, char **argv)
int rank = 0;
#ifdef HIOP_USE_MPI
int numRanks = 1;
int err;
int err; (void)err;
err = MPI_Init(&argc, &argv); assert(MPI_SUCCESS==err);
err = MPI_Comm_rank(MPI_COMM_WORLD,&rank); assert(MPI_SUCCESS==err);
err = MPI_Comm_size(MPI_COMM_WORLD,&numRanks); assert(MPI_SUCCESS==err);
Expand Down
8 changes: 4 additions & 4 deletions src/Drivers/Dense/NlpDenseConsEx2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ DenseConsEx2::DenseConsEx2(int n, bool unconstrained)
my_rank = 0;
#ifdef HIOP_USE_MPI
comm = MPI_COMM_WORLD;
int ierr = MPI_Comm_size(comm, &comm_size); assert(MPI_SUCCESS==ierr);
ierr = MPI_Comm_rank(comm, &my_rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(comm, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
ierr = MPI_Comm_rank(comm, &my_rank); assert(MPI_SUCCESS==ierr); (void)ierr;
#endif

if(unconstrained_) {
Expand Down Expand Up @@ -111,7 +111,7 @@ bool DenseConsEx2::eval_f(const size_type& n, const double* x, bool new_x, doubl
}
#ifdef HIOP_USE_MPI
double obj_global;
int ierr = MPI_Allreduce(&obj_value, &obj_global, 1, MPI_DOUBLE, MPI_SUM, comm); assert(ierr==MPI_SUCCESS);
int ierr = MPI_Allreduce(&obj_value, &obj_global, 1, MPI_DOUBLE, MPI_SUM, comm); assert(MPI_SUCCESS==ierr); (void)ierr;
obj_value = obj_global;
#endif
return true;
Expand Down Expand Up @@ -212,7 +212,7 @@ bool DenseConsEx2::eval_cons(const size_type& n,
#ifdef HIOP_USE_MPI
if(num_cons>0) {
double* cons_global = new double[num_cons];
int ierr = MPI_Allreduce(cons, cons_global, num_cons, MPI_DOUBLE, MPI_SUM, comm); assert(ierr==MPI_SUCCESS);
int ierr = MPI_Allreduce(cons, cons_global, num_cons, MPI_DOUBLE, MPI_SUM, comm); assert(MPI_SUCCESS==ierr); (void)ierr;
memcpy(cons, cons_global, num_cons*sizeof(double));
delete[] cons_global;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Dense/NlpDenseConsEx2Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int ierr = MPI_Comm_rank(MPI_COMM_WORLD,&rank);
assert(MPI_SUCCESS==ierr);
assert(MPI_SUCCESS==ierr); (void)ierr;
//if(0==rank) printf("Support for MPI is enabled\n");
#endif
bool selfCheck;
Expand Down
8 changes: 4 additions & 4 deletions src/Drivers/Dense/NlpDenseConsEx3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class DenseConsEx3 : public hiop::hiopInterfaceDenseConstraints
comm_size=1; my_rank=0;
#ifdef HIOP_USE_MPI
comm = MPI_COMM_WORLD;
int ierr = MPI_Comm_size(comm, &comm_size); assert(MPI_SUCCESS==ierr);
ierr = MPI_Comm_rank(comm, &my_rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(comm, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
ierr = MPI_Comm_rank(comm, &my_rank); assert(MPI_SUCCESS==ierr); (void)ierr;
#endif

// set up vector distribution for primal variables - easier to store it as a member in this simple example
Expand Down Expand Up @@ -103,7 +103,7 @@ class DenseConsEx3 : public hiop::hiopInterfaceDenseConstraints
for(int i=0;i<n_local;i++) obj_value += 0.25*pow(x[i]-1., 4);
#ifdef HIOP_USE_MPI
double obj_global;
int ierr=MPI_Allreduce(&obj_value, &obj_global, 1, MPI_DOUBLE, MPI_SUM, comm); assert(ierr==MPI_SUCCESS);
int ierr=MPI_Allreduce(&obj_value, &obj_global, 1, MPI_DOUBLE, MPI_SUM, comm); assert(MPI_SUCCESS==ierr); (void)ierr;
obj_value=obj_global;
#endif
return true;
Expand Down Expand Up @@ -151,7 +151,7 @@ class DenseConsEx3 : public hiop::hiopInterfaceDenseConstraints

#ifdef HIOP_USE_MPI
double* cons_global=new double[num_cons];
int ierr=MPI_Allreduce(cons, cons_global, num_cons, MPI_DOUBLE, MPI_SUM, comm); assert(ierr==MPI_SUCCESS);
int ierr=MPI_Allreduce(cons, cons_global, num_cons, MPI_DOUBLE, MPI_SUM, comm); assert(MPI_SUCCESS==ierr); (void)ierr;
memcpy(cons, cons_global, num_cons*sizeof(double));
delete[] cons_global;
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Dense/NlpDenseConsEx3Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int ierr = MPI_Comm_rank(MPI_COMM_WORLD,&rank);
assert(MPI_SUCCESS==ierr);
assert(MPI_SUCCESS==ierr); (void)ierr;
//if(0==rank) printf("Support for MPI is enabled\n");
#endif
bool selfCheck; size_type n;
Expand Down
8 changes: 4 additions & 4 deletions src/Drivers/Dense/NlpDenseConsEx4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ DenseConsEx4::DenseConsEx4()
my_rank = 0;
#ifdef HIOP_USE_MPI
comm = MPI_COMM_WORLD;
int ierr = MPI_Comm_size(comm, &comm_size); assert(MPI_SUCCESS==ierr);
ierr = MPI_Comm_rank(comm, &my_rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(comm, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
ierr = MPI_Comm_rank(comm, &my_rank); assert(MPI_SUCCESS==ierr); (void)ierr;
#endif

if(unconstrained_) {
Expand Down Expand Up @@ -114,7 +114,7 @@ bool DenseConsEx4::eval_f(const size_type& n, const double* x, bool new_x, doubl

#ifdef HIOP_USE_MPI
double obj_global;
int ierr = MPI_Allreduce(&obj_value, &obj_global, 1, MPI_DOUBLE, MPI_SUM, comm); assert(ierr==MPI_SUCCESS);
int ierr = MPI_Allreduce(&obj_value, &obj_global, 1, MPI_DOUBLE, MPI_SUM, comm); assert(MPI_SUCCESS==ierr); (void)ierr;
obj_value = obj_global;
#endif
return true;
Expand Down Expand Up @@ -220,7 +220,7 @@ bool DenseConsEx4::eval_cons(const size_type& n,
#ifdef HIOP_USE_MPI
if(num_cons>0) {
double* cons_global = new double[num_cons];
int ierr = MPI_Allreduce(cons, cons_global, num_cons, MPI_DOUBLE, MPI_SUM, comm); assert(ierr==MPI_SUCCESS);
int ierr = MPI_Allreduce(cons, cons_global, num_cons, MPI_DOUBLE, MPI_SUM, comm); assert(MPI_SUCCESS==ierr); (void)ierr;
memcpy(cons, cons_global, num_cons*sizeof(double));
delete[] cons_global;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Dense/NlpDenseConsEx4Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int ierr = MPI_Comm_rank(MPI_COMM_WORLD,&rank);
assert(MPI_SUCCESS==ierr);
assert(MPI_SUCCESS==ierr); (void)ierr;
//if(0==rank) printf("Support for MPI is enabled\n");
#endif
bool selfCheck;
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/MDS/NlpMdsEx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ int main(int argc, char **argv) {
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
//int ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
//int ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr); (void)ierr;
if(comm_size != 1) {
printf("[error] driver detected more than one rank but the driver should be run "
"in serial only; will exit\n");
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/MDS/NlpMdsEx1Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
//int ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
//int ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr); (void)ierr;
if(comm_size != 1) {
printf("[error] driver detected more than one rank but the driver should be run "
"in serial only; will exit\n");
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/MDS/NlpMdsEx1RajaDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
//int ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
//int ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr); (void)ierr;
if(comm_size != 1) {
printf("[error] driver detected more than one rank but the driver should be run "
"in serial only; will exit\n");
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/MDS/NlpMdsEx2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class MdsEx2 : public hiop::hiopInterfaceMDS
//values for sparse Jacobian if requested by the solver
if(MJacS!=NULL) {
int nnzit=0;
int con_idx=0;
int con_idx=0; (void)con_idx;

//sparse Jacobian EQ w.r.t. x and s
for(int i=0; i<ns_; i++) {
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/MDS/NlpMdsEx2Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
//int ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
//int ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr); (void)ierr;
if(comm_size != 1) {
printf("[error] driver detected more than one rank but the driver should be run "
"in serial only; will exit\n");
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/PriDec/NlpPriDecEx1Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr); (void)ierr;
#endif

#ifdef HIOP_USE_MAGMA
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/PriDec/NlpPriDecEx2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ bool PriDecMasterProbleEx2::eval_f_rterm(size_type idx, const int& n, const doub
assert(nx_==n);
rval=-1e+20;
double* xi;
hiopSolveStatus status;
hiopSolveStatus status; (void)status;

#ifdef HIOP_USE_MPI
// uncomment if want to monitor contingency computing time
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/PriDec/NlpPriDecEx2Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr); (void)ierr;
#endif

#ifdef HIOP_USE_MAGMA
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/PriDec/NlpPriDecEx2Sparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bool PriDecMasterProbleEx2Sparse::eval_f_rterm(size_type idx, const int& n, cons
{
assert(nx_==n);
rval=-1e+20;
hiopSolveStatus status;
hiopSolveStatus status; (void)status;
double* xi;

#ifdef HIOP_USE_MPI
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/PriDec/NlpPriDecEx2SparseDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr); (void)ierr;
#endif

int nx = 20; //nx == ny for this problem
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/PriDec/NlpPriDecEx2SparseRaja.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ bool PriDecMasterProbleEx2Sparse::eval_f_rterm(size_type idx, const int& n, cons

hiopAlgFilterIPMNewton solver(&nlp);

hiopSolveStatus status = solver.run();
hiopSolveStatus status = solver.run(); (void)status;
assert(status==Solve_Success ||
status==Solve_Success_RelTol ||
status==Solve_Acceptable_Level);
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/PriDec/NlpPriDecEx2SparseRajaDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr); (void)ierr;
#endif

#ifdef HIOP_USE_MAGMA
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/PriDec/NlpPriDecEx2UserBasecase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class PriDecBasecaseProbleEx2 : public SparseEx1

void get_rec_obj(const size_type& n, const double* x, double& obj_value)
{
bool temp = rec_evaluator_->eval_f(n, x, false, obj_value);
bool temp = rec_evaluator_->eval_f(n, x, false, obj_value); (void)temp;
assert(temp);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/PriDec/NlpPriDecEx3SparseDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr); (void)ierr;
double t3 = MPI_Wtime();
double t4 = 0.;
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/Sparse/NlpSparseCEx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ int main(int argc, char **argv) {
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
//int ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
//int ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(MPI_SUCCESS==ierr); (void)ierr;
if(comm_size != 1) {
printf("[error] driver detected more than one rank but the driver should be run "
"in serial only; will exit\n");
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Sparse/NlpSparseEx1Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
if(comm_size != 1) {
printf("[error] driver detected more than one rank but the driver should be run "
"in serial only; will exit\n");
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Sparse/NlpSparseEx2Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
if(comm_size != 1) {
printf("[error] driver detected more than one rank but the driver should be run "
"in serial only; will exit\n");
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Sparse/NlpSparseEx3Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
if(comm_size != 1) {
printf("[error] driver detected more than one rank but the driver should be run "
"in serial only; will exit\n");
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Sparse/NlpSparseEx4Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
if(comm_size != 1) {
printf("[error] driver detected more than one rank but the driver should be run "
"in serial only; will exit\n");
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Sparse/NlpSparseRajaEx2Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Init(&argc, &argv);
int comm_size;
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr);
int ierr = MPI_Comm_size(MPI_COMM_WORLD, &comm_size); assert(MPI_SUCCESS==ierr); (void)ierr;
if(comm_size != 1) {
printf("[error] driver detected more than one rank but the driver should be run "
"in serial only; will exit\n");
Expand Down
Loading
Loading