Skip to content

Commit

Permalink
update HiOp's Magma solvers to v2.6.1 (#294)
Browse files Browse the repository at this point in the history
* gpu interface for Bunch-Kaufmann
  • Loading branch information
cnpetra authored Aug 20, 2021
1 parent 87093f0 commit b72d163
Show file tree
Hide file tree
Showing 6 changed files with 430 additions and 172 deletions.
3 changes: 1 addition & 2 deletions scripts/ascentVariables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ module load exasgd-ipopt/3.12.10/gcc-7.4.0-tj6jbm2
module load exasgd-libsigsegv/2.13/gcc-7.4.0-garv4jn
# [email protected]%[email protected] arch=linux-rhel7-power9le
module load exasgd-libtool/2.4.6/gcc-7.4.0-lbasl6y
# [email protected]%[email protected]+cuda+fortran~ipo+shared build_type=RelWithDebInfo cuda_arch=70 arch=linux-rhel7-power9le
module load exasgd-magma/2.5.4/cuda-10.2.89/gcc-7.4.0-oltcefd
module load exasgd-magma/2.6.1/cuda-10.2.89-system/gcc-7.4.0-exkqayg
# [email protected]%[email protected]~gdb~int64~real64+shared build_type=Release patches=4991da938c1d3a1d3dea78e49bbebecba00273f98df2a656e38b83d55b281da1,b1225da886605ea558db7ac08dd8054742ea5afe5ed61ad4d0fe7a495b1270d2 arch=linux-rhel7-power9le
module load exasgd-metis/5.1.0/gcc-7.4.0-7cjo5kb
# [email protected]%[email protected] arch=linux-rhel7-power9le
Expand Down
2 changes: 1 addition & 1 deletion scripts/marianasVariables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module load exasgd-gmp/6.2.1/gcc-7.3.0-uimke6b
# [email protected]%[email protected]+coinhsl~debug~metis~mumps arch=linux-centos7-broadwell
module load exasgd-ipopt/3.12.10/gcc-7.3.0-kyxesp7
# [email protected]%[email protected]+cuda+fortran~ipo+shared build_type=RelWithDebInfo cuda_arch=60 arch=linux-centos7-broadwell
module load exasgd-magma/2.5.4/cuda-10.2.89/gcc-7.3.0-25cv4mc
module load exasgd-magma/2.6.1/cuda-10.2.89/gcc-7.3.0-2ejikvd
# [email protected]%[email protected]~gdb~int64~real64+shared build_type=Release patches=4991da938c1d3a1d3dea78e49bbebecba00273f98df2a656e38b83d55b281da1,b1225da886605ea558db7ac08dd8054742ea5afe5ed61ad4d0fe7a495b1270d2 arch=linux-centos7-broadwell
module load exasgd-metis/5.1.0/gcc-7.3.0-232rotu
# [email protected]%[email protected] arch=linux-centos7-broadwell
Expand Down
2 changes: 1 addition & 1 deletion scripts/newellVariables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module load exasgd-gmp/6.2.1/gcc-7.4.0-6svtfvr
# [email protected]%[email protected]+coinhsl~debug~metis~mumps arch=linux-rhel7-power9le
module load exasgd-ipopt/3.12.10/gcc-7.4.0-sfzycsu
# [email protected]%[email protected]+cuda+fortran~ipo+shared build_type=RelWithDebInfo cuda_arch=70 arch=linux-rhel7-power9le
module load exasgd-magma/2.5.4/cuda-10.2.89-system/gcc-7.4.0-bikffe2
module load exasgd-magma/2.6.1/cuda-10.2.89-system/gcc-7.4.0-4bah4e6
# [email protected]%[email protected]~gdb~int64~real64+shared build_type=Release patches=4991da938c1d3a1d3dea78e49bbebecba00273f98df2a656e38b83d55b281da1,b1225da886605ea558db7ac08dd8054742ea5afe5ed61ad4d0fe7a495b1270d2 arch=linux-rhel7-power9le
module load exasgd-metis/5.1.0/gcc-7.4.0-7cjo5kb
# [email protected]%[email protected] arch=linux-rhel7-power9le
Expand Down
30 changes: 22 additions & 8 deletions src/Drivers/nlpMDS_ex4_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,33 @@ int main(int argc, char **argv)
hiopAlgFilterIPMNewton solver(&nlp);
status = solver.run();
obj_value = solver.getObjective();

int ret_code = 0; //0 success, -1 failure


if(selfCheck && has_empty_sp_row) {
if(selfCheck) { // && has_empty_sp_row) {
if(fabs(obj_value-(-4.9994888159755632e+01))>1e-6) {
printf("selfcheck: objective mismatch for Ex4 MDS problem with 400 sparse variables and 100 "
"dense variables did. BTW, obj=%18.12e was returned by HiOp.\n", obj_value);
return -1;
ret_code = -1;
} else {
printf("selfcheck passed\n");
ret_code = 0;
}
} else if(status<0) {
if(rank==0)
printf("solver returned negative solve status: %d (with objective is %18.12e)\n", status, obj_value);
return -1;

} else {
if(status<0) {
if(rank==0) {
printf("solver returned negative solve status: %d (objective is %18.12e)\n", status, obj_value);
}
ret_code = -1;
} else {
if(rank==0) {
printf("solver returned successfully: objective is %18.12e)\n", obj_value);
}
ret_code = 0;

}
}

#if 0
Expand Down Expand Up @@ -225,6 +240,5 @@ int main(int argc, char **argv)
#ifdef HIOP_USE_MPI
MPI_Finalize();
#endif

return 0;
return ret_code;
}
Loading

0 comments on commit b72d163

Please sign in to comment.