Skip to content

Commit

Permalink
use renamed folder in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ofmla committed Jan 13, 2022
1 parent 1742cc2 commit 03f8403
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ and Romain Brossier. Minor changes to the original code have been made to allow

The SEISCOPE toolbox uses a derived data type (`optim`); functionality that is not yet supported at this time by f2py - and for this reason it is used [ctypes](https://docs.python.org/3/library/ctypes.html). The `optim` data type is maintained, but without allocatable arrays.

The repo contains a `src` directory with the modified fortran source files and a subdirectory `tests` where each method is used to find the minimum of the banana Rosenbrock function. The python wrapper for the SEISCOPE optimization toolbox is found inside the `seiscope_opt_tb_wrapper` directory. A `tests` directory (different from than one within `src`) includes a script to check that the wrapper has suceeded in reproducing bit-for-bit the results of the original fortran code.
The repo contains a `src` directory with the modified fortran source files and a subdirectory `tests` where each method is used to find the minimum of the banana Rosenbrock function. The python wrapper for the SEISCOPE optimization toolbox is found inside the `sotb_wrapper` directory. A `tests` directory (different from than one within `src`) includes a script to check that the wrapper has suceeded in reproducing bit-for-bit the results of the original fortran code.

Compiling
-----
Expand All @@ -25,7 +25,7 @@ FoBiS.py build -f seiscope_opt_toolbox_w_ctypes.fobis -mode shared-gnu
```
It is also possible to build the library in static form and the `tests` programs by changing the `mode` flag. 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`. The modes should be self-explanatory: shared, static and tests are the modes for building (in realese, optimized form) the shared and static versions of the library and the test programs, respectively. The other 3 modes are the same, but in debug form instead of release one. -gnu use the GNU gfortran compiler while -intel the Intel one.

A simple bash script `build.sh` is also provided for building the seiscope optimization toolbox with gfortran using [FoBiS](https://github.com/szaghi/FoBiS). It creates the library in static form, as originally designed as well as the tests programs.
A simple bash script `build.sh` is also provided for building the seiscope optimization toolbox with gfortran using [FoBiS](https://github.com/szaghi/FoBiS). It creates the library in static form, as originally designed as well as the tests programs. This option can be used if the user is only interested in the fortran librray.

Install sotb-wrapper
-----
Expand All @@ -41,11 +41,11 @@ pip install -e .
Usage
-----

Example run scripts are included in the [`seiscope_opt_tb_wrapper/examples`](https://github.com/ofmla/seiscope_opt_toolbox_w_ctypes/tree/main/seiscope_opt_tb_wrapper/examples) subdirectory. The examples can be run after the shared object has been built to test that wrapper works as it should. Note that you must have [Devito](https://www.devitoproject.org/) in order to be able to run the examples. A python script `plot_curves.py` is also provide in the `examples` directory. Please note that it may not be the best implementation and is intended for illustrative purposes only. The following figures were obtained with the `plot_curves.py` script after ran one of the examples (`lsrtm_aniso.py`).
Example run scripts are included in the [`sotb_wrapper/examples`](https://github.com/ofmla/seiscope_opt_toolbox_w_ctypes/tree/main/sotb_wrapper/examples) subdirectory. The examples can be run after the shared object has been built to test that wrapper works as it should. Note that you must have [Devito](https://www.devitoproject.org/) in order to be able to run the examples. A python script `plot_curves.py` is also provide in the `examples` directory. Please note that it may not be the best implementation and is intended for illustrative purposes only. The following figures were obtained with the `plot_curves.py` script after ran one of the examples (`lsrtm_aniso.py`).

<img src="./sotb_wrapper/examples/computationalcost_curves.svg" width="425"/> <img src="./sotb_wrapper/examples/convergence_curves.svg" width="425"/>

A tutorial in the form of a Jupyter notebook (`rosenbrock.ipynb`) is also supplied. The goal of the tutorial is show you how one can use sotb-wrapper to find a minimum for a problem, which can optionally be subject to bound constraints (also called box constraints). You can also find a simple example on calling the Fortran subroutines from a C main program in the [`c_code`](https://github.com/ofmla/seiscope_opt_toolbox_w_ctypes/tree/main/seiscope_opt_tb_wrapper/examples/c_code) directory. The example uses the Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) algorithm to minimize the Rosenbrock's "banana function".
A tutorial in the form of a Jupyter notebook (`rosenbrock.ipynb`) is also supplied. The goal of the tutorial is show you how one can use sotb-wrapper to find a minimum for a problem, which can optionally be subject to bound constraints (also called box constraints). You can also find a simple example on calling the Fortran subroutines from a C main program in the [`c_code`](https://github.com/ofmla/seiscope_opt_toolbox_w_ctypes/tree/main/sotb_wrapper/examples/c_code) directory. The example uses the Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) algorithm to minimize the Rosenbrock's "banana function".

License
-----
Expand Down

0 comments on commit 03f8403

Please sign in to comment.