From e9f8cc5297ac85b98337773e1eb03b6ed79b0095 Mon Sep 17 00:00:00 2001 From: nychiang Date: Thu, 6 Jun 2024 12:39:02 -0700 Subject: [PATCH] change function namel; remive pnnl ci tests --- .gitlab/pnnl-ci.yml | 152 ------------------------ src/Interface/hiopInterface.hpp | 16 +-- src/Optimization/hiopNlpFormulation.cpp | 48 ++++---- src/Optimization/hiopNlpFormulation.hpp | 16 +-- 4 files changed, 40 insertions(+), 192 deletions(-) delete mode 100644 .gitlab/pnnl-ci.yml diff --git a/.gitlab/pnnl-ci.yml b/.gitlab/pnnl-ci.yml deleted file mode 100644 index d25387a59..000000000 --- a/.gitlab/pnnl-ci.yml +++ /dev/null @@ -1,152 +0,0 @@ -stages: - - build - -variables: - GIT_SUBMODULE_STRATEGY: recursive - -.pnnl_tags: - tags: - - k8s - - ikp - - exasgd - - deception - - marianas - -.pnnl_nohpc_tags: - # Use curl base image as ubuntu base is missing it - image: curlimages/curl - tags: - - basic - - exasgd - - ikp - - k8s - -.newell: - variables: - SLURM_Q: "newell_shared" - MY_CLUSTER: "newell" - SLURM_ARGS: --gres=gpu:1 --exclusive - -.marianas: - variables: - SLURM_Q: "dl" - MY_CLUSTER: "marianas" - SLURM_ARGS: --gres=gpu:1 --exclusive - -.incline: - variables: - SLURM_Q: "incline" - MY_CLUSTER: "incline" - SLURM_ARGS: --exclusive - -.pnnl_build: - extends: - - .pnnl_tags - variables: - CTEST_CMD: 'ctest --output-on-failure' - TIMELIMIT: '1:00:00' - stage: build - needs: [] - script: - - | - # - # NOTES: WORKDIR is on constance/marianas/newell - # ./ is only on the Kubernetes instance - # - set -xv - export WORKDIR="$HOME/gitlab/$CI_JOB_ID/" - mkdir -p "$WORKDIR" - cp -R ./* "$WORKDIR" - cd "$WORKDIR" - touch output - tail -f output & - tailpid=$! - - if [[ $MY_CLUSTER == "marianas" ]]; then - export SLURM_Q=`perl $WORKDIR/scripts/findIdleDLNodes.pl` - fi - - # Extra args for ctest - export CTEST_CMD=$CTEST_CMD - - sbatch -A EXASGD --exclusive -N 1 -n 8 -p $SLURM_Q -t $TIMELIMIT $SLURM_ARGS -o output -e output $WORKDIR/BUILD.sh $BUILD_SCRIPT_ARGS - res=1 - set +xv - while :; - do - if [[ "$(awk 'BEGIN{i=0}/BUILD_STATUS/{i++}END{print i}' output)" != "0" ]]; then - kill $tailpid - res=$(grep BUILD_STATUS output | tail -n 1 | cut -f2 -d':') - break - fi - sleep 10 - done - echo "finished batch job: $res" - exit $res - -# For PNNL CI -build_on_marianas: - extends: - - .pnnl_build - - .marianas - -build_on_newell: - extends: - - .pnnl_build - - .newell - -build_on_incline: - extends: - - .pnnl_build - - .incline - allow_failure: true - -pnnl_cleanup: - needs: [] - extends: - - .pnnl_tags - stage: .pre - variables: - GIT_STRATEGY: none - script: - # clears directory of files more than 2 hours/120 minutes old - - | - set -xv - export WORKDIR="$HOME/gitlab/" - find $WORKDIR -type d -mindepth 1 -mmin +120 -prune -print -exec rm -rf {} \; || true - ls -hal $WORKDIR - -.report-status: - extends: - - .pnnl_nohpc_tags - variables: - STATUS_PROJECT: LLNL/hiop - STATUS_NAME: PNNL_GitLab - GIT_STRATEGY: none - script: - - | - set -x - curl -L \ - -X POST \ - -H @${GITHUB_CURL_HEADERS} \ - https://api.github.com/repos/${STATUS_PROJECT}/statuses/${CI_COMMIT_SHA} \ - -d "{\"state\":\"${CI_JOB_NAME}\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}" - environment: - name: reporting-github - -pending: - stage: .pre - extends: - - .report-status - -success: - stage: .post - extends: - - .report-status - -failure: - stage: .post - extends: - - .report-status - rules: - - when: on_failure diff --git a/src/Interface/hiopInterface.hpp b/src/Interface/hiopInterface.hpp index ae9cff81b..edee3e93a 100644 --- a/src/Interface/hiopInterface.hpp +++ b/src/Interface/hiopInterface.hpp @@ -485,14 +485,14 @@ class hiopInterfaceBase * can be then used in host memory space (without the need to rely on or use Umpire). * */ - virtual bool ws_iterate_callback(const double* x, - const double* z_L, - const double* z_U, - const double* yc, - const double* yd, - const double* s, - const double* v_L, - const double* v_U) + virtual bool iterate_full_callback(const double* x, + const double* z_L, + const double* z_U, + const double* yc, + const double* yd, + const double* s, + const double* v_L, + const double* v_U) { return true; } diff --git a/src/Optimization/hiopNlpFormulation.cpp b/src/Optimization/hiopNlpFormulation.cpp index 5278e0cda..d54d97532 100644 --- a/src/Optimization/hiopNlpFormulation.cpp +++ b/src/Optimization/hiopNlpFormulation.cpp @@ -1271,14 +1271,14 @@ bool hiopNlpFormulation::user_callback_iterate(int iter, return bret; } -bool hiopNlpFormulation::user_callback_ws_iterate(hiopVector& x, - hiopVector& z_L, - hiopVector& z_U, - hiopVector& y_c, - hiopVector& y_d, - hiopVector& s, - hiopVector& v_L, - hiopVector& v_U) +bool hiopNlpFormulation::user_callback_full_iterate(hiopVector& x, + hiopVector& z_L, + hiopVector& z_U, + hiopVector& y_c, + hiopVector& y_d, + hiopVector& s, + hiopVector& v_L, + hiopVector& v_U) { assert(x.get_size()==n_vars_); assert(y_c.get_size() == n_cons_eq_); @@ -1316,23 +1316,23 @@ bool hiopNlpFormulation::user_callback_ws_iterate(hiopVector& x, hiopVectorPar vu_host(n_cons_ineq_, vec_distrib_, comm_); v_U.copy_to_vectorpar(zu_host); - bret = interface_base.ws_iterate_callback(x_host.local_data_const(), - zl_host.local_data_const(), - zu_host.local_data_const(), - yc_host.local_data_const(), - yd_host.local_data_const(), - s_host.local_data_const(), - vl_host.local_data_const(), - vu_host.local_data_const()); + bret = interface_base.iterate_full_callback(x_host.local_data_const(), + zl_host.local_data_const(), + zu_host.local_data_const(), + yc_host.local_data_const(), + yd_host.local_data_const(), + s_host.local_data_const(), + vl_host.local_data_const(), + vu_host.local_data_const()); } else { - bret = interface_base.ws_iterate_callback(x.local_data_const(), - z_L.local_data_const(), - z_U.local_data_const(), - y_c.local_data_const(), - y_d.local_data_const(), - s.local_data_const(), - v_L.local_data_const(), - v_U.local_data_const()); + bret = interface_base.iterate_full_callback(x.local_data_const(), + z_L.local_data_const(), + z_U.local_data_const(), + y_c.local_data_const(), + y_d.local_data_const(), + s.local_data_const(), + v_L.local_data_const(), + v_U.local_data_const()); } return bret; } diff --git a/src/Optimization/hiopNlpFormulation.hpp b/src/Optimization/hiopNlpFormulation.hpp index dbd0248c1..ed522f4df 100644 --- a/src/Optimization/hiopNlpFormulation.hpp +++ b/src/Optimization/hiopNlpFormulation.hpp @@ -193,14 +193,14 @@ class hiopNlpFormulation int ls_trials); virtual - bool user_callback_ws_iterate(hiopVector& x, - hiopVector& z_L, - hiopVector& z_U, - hiopVector& y_c, - hiopVector& y_d, - hiopVector& s, - hiopVector& v_L, - hiopVector& v_U); + bool user_callback_full_iterate(hiopVector& x, + hiopVector& z_L, + hiopVector& z_U, + hiopVector& y_c, + hiopVector& y_d, + hiopVector& s, + hiopVector& v_L, + hiopVector& v_U); virtual bool user_force_update(int iter,