Skip to content

Commit

Permalink
Update the docstring of build_libsif
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Sep 2, 2024
1 parent 80e120c commit a4d9b91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ Finalize the current model by calling `finalize(nlp)` to avoid conflicts.
using CUTEst
# Create a CUTEstModel with the name "CHAIN" and a parameter adjustment
nlp = CUTEstModel("CHAIN", "-param", "NH=50")
nlp = CUTEstModel{Float64}("CHAIN", "-param", "NH=50")
display(nlp)
finalize(nlp) # Finalize the current model
# Create another CUTEstModel with different parameters
nlp = CUTEstModel("CHAIN", "-param", "NH=100")
nlp = CUTEstModel{Float64}("CHAIN", "-param", "NH=100")
display(nlp)
finalize(nlp) # Finalize the new model
```
Expand Down
5 changes: 4 additions & 1 deletion src/sifdecoder.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Decodes a SIF problem, converting it into a format suitable for further processi
- `verbose::Bool`: If `true`, enables verbose output during the decoding process. Defaults to `false`.
- `precision::Symbol`: The desired precision for the problem. Can be `:single`, `:double` (default), or `:quadruple`.
- `outsdif::String`: The name of the file `OUTSDIF.d` required for automatic differentiation. Defaults to `"OUTSDIF_sifname_precision.d"`, where `sifname` and `precision` are replaced with the problem name and chosen precision.
- `libsif_folder::String`: The directory where the generated files (*.f and *.d) will be stored. Defaults to `libsif_path`.
- `libsif_folder::String`: The directory where the generated files (`*.f` and `*.d`) will be stored. Defaults to `libsif_path`.
```julia
sifdecoder("HS1.SIF", precision=:single)
Expand Down Expand Up @@ -139,6 +139,9 @@ Builds a shared library from a decoded SIF problem.
- `precision::Symbol`: The desired precision of the problem. Can be `:single`, `:double` (default), or `:quadruple`.
- `libsif_folder::String`: The directory where the compiled library will be stored. Defaults to `libsif_path`.
!!! warning
We expect that the SIF problem has been decoded in `libsif_folder` and contains the generated files (`*.f` and `*.d`).
```julia
build_libsif("HS1.SIF", precision=:single)
build_libsif("DIXMAANJ", precision=:double)
Expand Down

0 comments on commit a4d9b91

Please sign in to comment.