Skip to content
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

Update the docstring of build_libsif #418

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading