-
Notifications
You must be signed in to change notification settings - Fork 7
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
Miscelaneous updates (second batch) #18
Conversation
This commit addresses - Allocs and Deallocs have `stat` parameter and are handled gracefully Also some cosmetic changes are introduced - Most routines in `ral_nlls_workspace` now have a single exit address without returns - Where appropiate return from call to routines will handle `inform%status` - Propagated some inform%status/=0 - Added new error code: NLLS_ERROR_WRONG_INNER_METHOD = -15
This commit updates - NLLS_ITERATE to have single exit address 100 - inform%iter is reset correctly in w%first_call==1 - NLLS_inform struct initializes %iter to zero
Print level 1 proposal sketch
- new proposal for iteration log formated output - replaced all `write(out,...` with `buildmsg`/`printmsg` scheme - avoid extra calculations on last iteration of loop in `more_sorensen_ew` - possible standing issue with `svdstatus/=0`
- Add printing protocol to `ral_nlls_dtrs_double` routines - Remove unused elements in derived types: used in `ral_nlls_dtrs_double` routines` (out,error,print_level)
- Added one missing build/printmsg pair - Added inform%status monitoring to evaluate_model
- switch_to_quasi_newton routine expects for `w%hf_temp` to be defined: switch_to_quasi_newton_tests is updated to have it defined
- calls to `dsyevx` now comply with interface: The fix requires changes in two parts (1) allocate w%ew(1) in derived type `min_eig_symm_work` in `setup_workspace_min_eig_symm` regardless of the value of `options%subproblem_eig_fact` - `options%subproblem_eig_fact==T` -> w%ew(n) - `options%subproblem_eig_fact==F` -> w%ew(1) (2) allocate w%ew(n) in derived type `all_eig_symm_work` in `setup_workspace_all_eig_symm`, w%ew(n) is deallocated at exit of the subroutine. - add_matrices c=a+b has intent(inout) :: c - partially fixes issue with `regularization_solver` in the case where reg_oder==two, normd is not updated. Problem continues when reg_order/=two - updated 1line/it information with it==0 format, and added a new column printing the step length `w%normd` - added hidden option to force calling `min_eig_symm` without first calling `solve_spd_nocopy`. - Added new subroutine to add matrices C=A+B without aliasing call `add_matrices(w%A,B,n)`, replaces call of add_matrices(w%A,B,n,w%A) - valgrind on gfortran -O3 shows no leaks.
…nform%step=w%normd
1. Update example nlls_example2 to use type_of_method = 2 instead of illegal value 3 2. Check_options before entering nlls_iterate(), this routine for now only check for * print_level, and * type_of_method 3. Added Misc Error number -900 for illegal value of print_level
Replaces all constants with numeric values, `ral_nlls_workspaces` exports `wp` and error codes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMakeLists.txt
The updated CMakeLists.txt
should work for nagfor
out-of-the-box too (although possibly not for profiling).
(& see comment in code)
example/C/nlls_example.c
(see comment in code)
example/C/nlls_example2.c
(see comment)
example/Fortran/Lanczos.f90
I'm happy with the changes here
example/Fortran/nlls_example.f90
(see comment)
example/Fortran/nlls_example2.f90
Print levels again. Here it seems to be set twice?
include/ral_nlls.h
Looks good
src/ral_nlls_double.f90
Looks good
ral_nlls_dtrs_double.f90
I'd like to ringfence this file -- possibly this will have to be changed in the NAG version of the code only, if changing this is necessary from your end. This is actually a dependency on another package (the routines here are lifted directly from Galahad), and I'm worried that if we edit this we won't be able to easily import any bug fixes and/or new features that are made in Galahad. @nimgould -- what do you think?
ral_nlls_internal.f90
(see comments in code)
src/ral_nlls_workspace.f90
(see comment in code)
tests/example_module.f90
(see comments in code)
Documentation
The docs are now out of date because of the printing changes. Could you update those to include the new control parameters, and to describe how they are used?
* removed `options%error`, print scheme now uses only `options%out` * changed default print level to zero (no output)
* Default print level is zero * Comments typos fixed * Miscelanea
Codecov Report
@@ Coverage Diff @@
## master #18 +/- ##
==========================================
- Coverage 90.99% 84.04% -6.96%
==========================================
Files 3 4 +1
Lines 2255 2664 +409
==========================================
+ Hits 2052 2239 +187
- Misses 203 425 +222
Continue to review full report at Codecov.
|
The changes to the codes look good -- thanks, Andrew! These changes have dropped the test coverage percentage significantly. In particular, the tests don't hit the new printing routines you've written. Could you amend As discussed, we still need the docs to be updated before this can be merged in to master, as they should accurately describe the code. I see the you have added issue #22 to do this, which is great. Sphinx (https://docs.readthedocs.io/en/latest/intro/getting-started-with-sphinx.html) is pretty easy to change, but let me know if you have any trouble. |
* `nlls_test` now exersizes most of ral_nlls_printing module * bug fix in `print_options` * `default_options` now also includes `print_options` and `print_header` members
Docs where updated to describe options: * `print_options`, and * `print_header`
Updated nlls_test and now it covers all the printing module, coverage still does not hit target due to allocation checks in nlls_workspaces. |
A few more relatively minor points I've found: Docs
In all docs:
Python interface
The python interface is not currently included in the test -- I've added Issue #30 to address this. I've also discovered that the python instructions don't work on all systems (as it needs the numpy headers to be in the path) -- I've addressed this with issue #29, which is now fixed and merged into master. Note: part of the changes required to compile the documentation in Python 3 are specified in commit https://github.com/talassio/RALFit/commit/046c28bd859f7d7505cb88f5acee1db88f0e6bdf#commitcomment-33157683 Tests
|
Some block-if statements in ral_nlls_workspaces.f90 where changed to logical-if statements.
Proposal to update `conf.py` to work under Python 3.x
add `stat=` to dealloc call
Second (+10 commits, Jan 29 2019 to Feb 18 2019) mainly related to new printing proposal
*
Write(out, ('...'))...
is replaced bybuildmsg
/printmsg
pair with*
Write(rec(i), Fmt=NNNNN)...
* Only uses
options%out
and notoptions%error
. See note.* No more Go To labels, except 100 for exit
* Comply with LAPACK interface description
Note these commits don't address possible issue with
options%error
i/o unit output, future commit will address issue.Note this batch breaks STP