-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33183a4
commit 765ca5f
Showing
1 changed file
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,51 @@ | ||
# SIFDecode | ||
A package to decode SIF optimization test examples for use by CUTEst and GALAHAD | ||
|
||
See the [CUTEst wiki](https://github.com/ralna/CUTEst/wiki) for download and installation instructions | ||
|
||
[![Build Status](https://img.shields.io/github/actions/workflow/status/ralna/SIFDecode/ci.yml?branch=master)](https://github.com/ralna/SIFDecode/actions/workflows/ci.yml) | ||
|
||
[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) | ||
|
||
## Installation | ||
|
||
### Precompiled library and executables | ||
|
||
We provide a precompiled SIFDecode library and executables in the [releases tab](https://github.com/ralna/SIFDecode/releases/latest/) for Linux, macOS (Intel & Silicon) and Windows. | ||
|
||
### Installation from source | ||
|
||
SIFDecode can be installed using the [Meson build system](https://mesonbuild.com) (all commands below are to be run from the top of the source tree): | ||
|
||
```shell | ||
meson setup builddir | ||
meson compile -C builddir | ||
meson install -C builddir | ||
meson test -C builddir | ||
``` | ||
|
||
SIFDecode can also be installed via the "make" build system based on [ARCHDefs](https://github.com/ralna/ARCHDefs). | ||
To use this variant, follow the instructions in the CUTEst [wiki](https://github.com/ralna/CUTEst/wiki). | ||
|
||
## How to decode a SIF file | ||
|
||
Since the release `v2.5.1`, an executable `sifdecoder_standalone` is | ||
available and allows you to easily decode SIF files on any platform. | ||
|
||
```shell | ||
sifdecoder_standalone -h # display the options | ||
sifdecoder_standalone -sp ROSENBR.SIF # decode the SIF problem in single precision | ||
sifdecoder_standalone -dp ROSENBR.SIF # decode the SIF problem in double precision | ||
sifdecoder_standalone -qp ROSENBR.SIF # decode the SIF problem in quadruple precision | ||
``` | ||
|
||
Then, you can create either a shared or a static library for your problem | ||
using a Fortran compiler, such as `gfortran`. | ||
```shell | ||
gfortran -shared -fPIC -o libROSENBR.so *.f # shared library on Linux and FreeBSD | ||
gfortran -shared -fPIC -o libROSENBR.dll *.f # shared library on Windows | ||
gfortran -shared -fPIC -o libROSENBR.dylib *.f # shared library on Mac | ||
|
||
gfortran -c *.f # generate object files *.o | ||
ar rcs libmylibrary.a *.o # static library on all platform | ||
``` | ||
|
||
A bash script [`sifdecoder`](https://github.com/ralna/SIFDecode/blob/master/bin/sifdecoder) can | ||
also be used with additional options but is less interoperable. |