From 66245ceea9e613cf6ce113d430903b931cc7ff7a Mon Sep 17 00:00:00 2001 From: Stefan Vigerske Date: Sat, 14 Dec 2024 14:40:06 +0100 Subject: [PATCH] update changelog and comments --- ChangeLog.md | 8 ++++---- examples/ScalableProblems/solve_problem.cpp | 2 +- src/Common/IpUtils.hpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index f9d6d1030..fe4e32ff6 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -7,20 +7,20 @@ More detailed information about incremental changes can be found in the ## 3.14 -### 3.14.17 (2024-xx-yy) +### 3.14.17 (2024-12-14) - Added `Ipopt::RegisterInterruptHandler()` and `Ipopt::UnregisterInterruptHandler()` to `IpUtils.hpp` to wrap handling of interrupt signals. Added parameter `checkinterrupt` (default false) to `AmplTNLP` constructor to enable check for interrupt signal in `intermediate_callback`. -- The `ipopt` and `ipopt_sens` executables can now be interrupted by SIGINT/SIGHUP - (POSIX systems) or SIGINT/SIGTERM/SIGABRT (Windows systems). +- The `ipopt` and `ipopt_sens` executables and scalable problems C++ examples can now be + interrupted by SIGINT/SIGHUP (systems with sigaction()) or SIGINT/SIGTERM/SIGABRT (Windows systems). - New option `mumps_mpi_communicator` to specify the MPI communicator when using an MPI-enabled build of MUMPS [#790, by Alex Tyler Chapman]. - Updated build system to current autotools versions; initial support for icx/ifx and flang - Removed use of `vsprintf` and `sprintf`. Added `IpoptData::Append_info_string(std::string,double)`. - Removed use of `strcpy`, `strncpy`, `strdup`, and `sscanf`. -- Use `fopen_s` and `getenv_s` instead of `fopen` and `getenv`, respectively, if available. +- Using `fopen_s` and `getenv_s` instead of `fopen` and `getenv`, respectively, if available. - Added workaround for using Pardiso from Intel MKL 2025.0.1 [#799]. This requires checking the MKL version at runtime and can be disabled by defining `IPOPT_NO_MKLVERSIONCHECK`. diff --git a/examples/ScalableProblems/solve_problem.cpp b/examples/ScalableProblems/solve_problem.cpp index 06005fd5f..db7a5b067 100644 --- a/examples/ScalableProblems/solve_problem.cpp +++ b/examples/ScalableProblems/solve_problem.cpp @@ -203,7 +203,7 @@ int main( app->Options()->SetNumericValue("max_wall_time", runtime); #endif - Ipopt::RegisterInterruptHandler(NULL, &tnlp->interrupted_); + Ipopt::RegisterInterruptHandler(NULL, &tnlp->interrupted_, 5); status = app->OptimizeTNLP(GetRawPtr(tnlp)); diff --git a/src/Common/IpUtils.hpp b/src/Common/IpUtils.hpp index 909f93d6f..c2f60cbda 100644 --- a/src/Common/IpUtils.hpp +++ b/src/Common/IpUtils.hpp @@ -102,8 +102,8 @@ IPOPTLIB_EXPORT Number WallclockTime(); /** register handler for interrupt signals * - * On POSIX systems, catches SIGHUP and SIGINT signals. - * On Windows, catches SIGTERM, SIGABRT, SIGBREAK, and SIGINT signals. + * On systems with sigaction(), catches SIGHUP and SIGINT signals. + * Otherwise, catches SIGTERM, SIGABRT, SIGINT signals via signal(). * * @return whether registering the handler was successful * @since 3.14.17 @@ -116,7 +116,7 @@ IPOPTLIB_EXPORT bool RegisterInterruptHandler( /** unregister previously registered handler for interrupt signals * - * @return whether registering the handler was successful + * @return whether unregistering the handler was successful * @since 3.14.17 */ IPOPTLIB_EXPORT bool UnregisterInterruptHandler(void);