-
Notifications
You must be signed in to change notification settings - Fork 34
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
source(test-all.R) failed on centos8_x86_64 #81
Comments
This test checks whether the correct optimum is found for an optimization
problem where the solution is known (example problem number 71 from the
Hock-Schittkowsky test suite). The test fails because the solution found by
nloptr differs more from the known solution than specified by the tolerance
in the test. The tolerance in the test is probably a bit too strict in this
case (1e-6), see line 97 of
https://github.com/cran/nloptr/blob/master/tests/testthat/test-hs071.R. The
test will pass if the tolerance in the test is set to 1e-5. Does this
answer your question?
…On Mon, Nov 22, 2021 at 11:06 AM Jeffrey ***@***.***> wrote:
hello,I meet a problem:source(test-all.R) failed on centos8_x86_64
Steps to reproduce the issue
***@***.*** tests]#Rscript test-all.RLoading required package: nloptr[1] 1.000000 4.743006 3.821141 1.379409[1] 1.000000 4.743000 3.821150 1.379408== Failed tests =============================================================================================================================================================================================-- Failure (test-hs071.R:98:5): Test HS071. ------------------------------------res$solution not equal to `solution.opt`.3/4 mismatches (average diff: 5.54e-06)[2] 4.74 - 4.74 == 6.69e-06[3] 3.82 - 3.82 == -8.73e-06[4] 1.38 - 1.38 == 1.21e-06
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 46 ]Error: Test failuresExecution ***@***.*** tests]#R
> source("test-all.R")Loading required package: nloptr[1] 1.000000 4.743006 3.821141 1.379409[1] 1.000000 4.743000 3.821150 1.379408Called from: eval(code, test_env)Browse[1]> debug(expect_equal)Browse[1]> expect_equal(res$solution, solution.opt, tolerance = 1e-6)debugging in: expect_equal(res$solution, solution.opt, tolerance = 1e-06)debug: { act <- quasi_label(enquo(object), label, arg = "object") exp <- quasi_label(enquo(expected), expected.label, arg = "expected") if (edition_get() >= 3) { expect_waldo_equal("equal", act, exp, info, ..., tolerance = tolerance) } else { if (!is.null(tolerance)) { comp <- compare(act$val, exp$val, ..., tolerance = tolerance) } else { comp <- compare(act$val, exp$val, ...) } expect(comp$equal, sprintf("%s not equal to %s.\n%s", act$lab, exp$lab, comp$message), info = info) invisible(act$val) }}Browse[4]> cError: res$solution not equal to `solution.opt`.3/4 mismatches (average diff: 5.54e-06)[2] 4.74 - 4.74 == 6.69e-06[3] 3.82 - 3.82 == -8.73e-06[4] 1.38 - 1.38 == 1.21e-06
Can you tell me why this problem happened?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#81>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4U6AEKUBOQOR6JVAERG63UNII4BANCNFSM5IQSK5FA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@jyypma how is tolerance calculated?I want to know.My problem has been fixed according to your method. The patch is as follows:
|
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this issue
Aug 11, 2023
# nloptr 2.0.3 * Improved compatibility on RHEL/CentOS by first searching for a `cmake3` binary on the `PATH` (#104). * Improved backward compatibility with older versions of `cmake` (#119). # nloptr 2.0.2 This is a patch version in which: * I link to the `nlopt` library via `nlopt/lib/libnlopt.a` instead of `-Lnlopt/lib -lnlopt` when building `nlopt` from included sources to avoid potential mess where `-lnlopt` could look for the `nlopt` library in other places and possibly link with an existing too old system build of `nlopt`. Additionally, we contacted Simon Urbanek for updating the `nlopt` recipe for macOS users so that it does now match the latest `v2.7.1`, which should avoid `nlopt` to be built on the fly on CRAN machines. # nloptr 2.0.1 This is a release mainly for increasing direct compatibility with most user cases. In details, here is the list of changes that have been made: * Update `SystemRequirements` description to make it clearer which minimal versions of `cmake` (`>= 3.15.0`) and `nlopt` (`>= 2.7.0`) are required (#100, @HenrikBengtsson). * End configuration sooner and louder if `cmake` is missing when needed with clearer message (#103, @eddelbuettel). * Ensure system-wide installation of `cmake` in the list of suggestions to install it when missing. * Update GHA scripts to latest versions. * Configure git to always use LF line endings for configure.ac file. * Add CI for R-devel on Windows with Rtools42. * Fix for compatibility with versions of R anterior to `4.0` (#111). * Look for a `cmake3` binary in the current path before `cmake` for increasing compatibility with most RHEL/CentOS users (#104, @bhogan-mitre @HenrikBengtsson). # nloptr 2.0.0 ## Major changes * Use [CMake](https://cmake.org) to build `nlopt` from included sources on macOS and on Linux if no system build of NLopt (>= 2.7.0) is found. * Update included sources of NLopt to latest version (2.7.1). * Put back the ability on Linux platforms to re-use an existing external build of NLopt instead of building from the included sources (contributed by Dirk Eddelbuettel, #88). * Now builds using NLopt from `rwinlib` on Windows current release (contributed by Jeroen Ooms, #92), or NLopt from `Rtools42` on Windows devel (contributed by Tomas Kalibera). ## Minor changes * Added a `NEWS.md` file to track changes to the package. * Use markdown in Roxygen documentation. * Added a logo and a proper [**nloptr** website](https://astamm.github.io/nloptr/). * Added coverage. * Switch from Travis to Github Actions for CI. * Use Catch for unit testing C/C++ code. * Now tracking code coverage. * Update NLopt-related URLs following migration of [NLopt website](https://nlopt.readthedocs.io/en/latest/). * Fixed bug to avoid linking issues when using the C API via `#include <nloptrAPI.h>` in several source files. * Fix precision issue in test example `hs071` (astamm/nloptr#81, @Tom-python0121). * Made NLopt algorithm `NLOPT_GN_ESCH` available from R interface (contributed by Xiongtao Dai).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello,I meet a problem:source(test-all.R) failed on centos8_x86_64
Steps to reproduce the issue
Can you tell me why this problem happened?
The text was updated successfully, but these errors were encountered: