Skip to content

Commit

Permalink
fpm updates
Browse files Browse the repository at this point in the history
readme updates
  • Loading branch information
jacobwilliams committed Aug 28, 2021
1 parent 0f51a5d commit de2fffb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ bin/
lib/
doc/
tmp/
build/

# mac
.DS_Store
.DS_Store
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Updates to the original code include:
* Some new features were added to support printing error messages and reporting iterations to the user.
* The user can now specify the max and min `alpha` to use during the line search.
* The user can supply a routine to compute the gradients of the objective function and constriants, or allow the code to estimate them using finite differences (backward, forward, or central).
* The documentation strings in the code have been converted to [FORD](https://github.com/cmacmackin/ford) format, allowing for [nicely formatted documentation](http://jacobwilliams.github.io/slsqp/) to be auto-generated.
* The documentation strings in the code have been converted to [FORD](https://github.com/Fortran-FOSS-Programmers/ford) format, allowing for [nicely formatted documentation](http://jacobwilliams.github.io/slsqp/) to be auto-generated.
* A couple of bug fixes noted elsewhere have been applied.

### License
Expand All @@ -34,6 +34,23 @@ Updates to the original code include:

### Building SLSQP

#### **Fortran Package Manager**

The library can be built with the [Fortran Package Manager](https://github.com/fortran-lang/fpm) using the provided `fpm.toml` file like so:

```bash
fpm build --release
```

To use SLSQP within your fpm project, add the following to your `fpm.toml` file:

```yml
[dependencies]
slsqp = { git="https://github.com/jacobwilliams/slsqp.git" }
```

#### **FoBiS**

A [FoBiS](https://github.com/szaghi/FoBiS) configuration file (`slsqp.fobis`) is also provided that can also build the library and examples. Use the `mode` flag to indicate what to build. For example:

* To build all the examples using gfortran: `FoBiS.py build -f slsqp.fobis -mode tests-gnu`
Expand All @@ -43,7 +60,7 @@ A [FoBiS](https://github.com/szaghi/FoBiS) configuration file (`slsqp.fobis`) is

The full set of modes are: `static-gnu`, `static-gnu-debug`, `static-intel`, `static-intel-debug`, `shared-gnu`, `shared-gnu-debug`, `shared-intel`, `shared-intel-debug`, `tests-gnu`, `tests-gnu-debug`, `tests-intel`, `tests-intel-debug`

To generate the documentation using [ford](https://github.com/cmacmackin/ford), run: ```FoBis.py rule --execute makedoc -f slsqp.fobis```
To generate the documentation using [ford](https://github.com/Fortran-FOSS-Programmers/ford), run: ```FoBis.py rule --execute makedoc -f slsqp.fobis```

To run the test programs, run: ```FoBis.py rule --execute tests -f slsqp.fobis```

Expand All @@ -53,7 +70,7 @@ A [FoBiS](https://github.com/szaghi/FoBiS) configuration file (`slsqp.fobis`) is

### Documentation

The latest API documentation can be found [here](http://jacobwilliams.github.io/slsqp/). This was generated from the source code using [FORD](https://github.com/cmacmackin/ford) (note that the included `build.sh` script will also generate these files).
The latest API documentation can be found [here](http://jacobwilliams.github.io/slsqp/). This was generated from the source code using [FORD](https://github.com/Fortran-FOSS-Programmers/ford) (note that the included `build.sh` script will also generate these files).

### References

Expand Down
12 changes: 11 additions & 1 deletion fpm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ license = "BSD-3-Clause"
author = "Jacob Williams"
maintainer = "https://github.com/jacobwilliams"
copyright = "Copyright (c) 2016-2021, Jacob Williams"
license = "BSD-3"
description = "Modern Fortran Edition of the SLSQP Optimizer"
homepage = "https://github.com/jacobwilliams/slsqp"
keywords = ["optimization"]

[library]
source-dir = "src"

[[test]]
name = "test_1"
source-dir = "src/tests"
Expand All @@ -28,3 +30,11 @@ main = "slsqp_test_71.f90"
name = "test_stopping_criterion"
source-dir = "src/tests"
main = "slsqp_test_stopping_criterion.f90"

[install]
library = true

[build]
auto-executables = false
auto-examples = false
auto-tests = false

0 comments on commit de2fffb

Please sign in to comment.