![]() |
SuperSCS
1.3.2
|
Thank you for considering contributing to SuperSCS!
Please, read the following guide before you fork this repository, or before you file a new issue.
SuperSCS follows the following naming convention:
scs_
or superscs_
; this is because C lacks namespaces, so we need to avoid name clashes with other librariesSCS_
iCantReadThis
.SCS_
(e.g., SCS_SOLVED)test_
norm_E_Atran_yb
instead of t
.int a=1, b=2, c;
if (a != 0)
instead of if (a)
; the same holds for non-NULL
tests#if defined()
instead of #ifdef
In particular, in regard to structures, they should be written like that:
All non-static functions in C must be documented using the Doxygen style.
Installation instructions, mathematical documentation and other non-API documentation should not be part of function/variable documentation.
Instead, you should contribute to an existing page in pages/.
Unit tests are supported and executed by a simple in-house framework.
C Tests are stored in /tests/c/
and supporting data files are found in /tests/c/data/
.
The main test runner file is tests/c/test_runner_dir.c
.
Tests are added as follows:
The above line adds the test test_problem_metadata
which has the name Metadata
.
Test functions are of type typedef bool (*unitTest_t)(char**)
; for example:
Unit tests contain assertions which are documented in unit_test_util.h.
For example:
All test functions start with test_
.
Comments in C should be like that:
Multi-line comments should be like that:
SuperSCS uses a 3-digit version number with a major, a minor and a build number.
Version numbers are updated every time dev
is merged into master
.
We use a simple collaboration model with two branches:
master
branch into which we merge to create a new release,dev
(development) branch where the development takes placeExperimental branches can be created, branching out of dev
.
If you need to provide some new functionality, or solve an issue:
dev
dev
- give it a name like feature/parser
or hotfix-issue-183
Before creating a new issue, please make sure that the same or a very similar issue has already been filed.
In general, you shouldn't file an issue to ask a question unless:
documentation
),help-wanted
).If you simply need to ask a question...
You may report your issue using the project's issue tracker on github
In your issue report, please include the following information:
Alongside, provide any additional information that will help reproduce and resolve the issue.
If possible, write a test that reproduces the error.
Labels:
bug
: bug reportdocumentation
: insufficient/unclear/wrong documentationduplicate
: the same or really similar issue has been filedenhancement
: proposal for enchancementhelp-wanted
: a user or developer needs help or guidance with the codeinvalid
: invalid issuelinux
: linux operating systemmaxosx
: Mac OS X operating systemmatlab
: issue related to MATLABmemory-leak
: memory leak or other memory issuepython
: issue related to pythonserializer-parser
: issue related to the YAML serializer/parsertesting
: wrong/insufficient testingwindows
: windows operating systemwontfix
: this issue will not be fixedThe following commit guidelines were inspired by the guidelines of Atom...
[ci skip]
in the first line of your commit message to skip the CI testing:art:
when improving the format/structure of the code:memo:
when writing docs:beetle:
when fixing a bug:racehorse:
when improving performance:white_check_mark:
when adding tests:wrench:
when benchmarking or profiling:hammer:
improved code or implemented new feature:construction:
work in progressIn order to contribute and actively participate in the development of SuperSCS, you first need to fork the repository on github:
This way you will obtain a copy of SuperSCS in your user account.
You will be able to work there and submit a pull request once you complete your changes.
Before merging into master
, use the following checklist:
make COV=1 cov
and check the resultscppcheck
make docs
and check the output for warnings/errorsmake PF=1 profile
) worksdocs/html-extra/scs-html-extra.html
)After the pull request has been merged:
master
and push (make docs
)make COV=1 cov
)Copy this into your pull request!
Additional benchmarks are always welcome.
The standard way to report benchmarking results in SuperSCS is the Dolan-Moré plot.
Benchmarking scripts are found in tests/profiling_matlab
.
The files are organised in three main subfolders:
experimenters/
experimenters call the profile runners with different solver parameters.profile_helpers/
functions used to run profiling problemsprofile_runners/
functions which call the profile helpers with different problem parameters; these define a suite of numerical experimentsProfile helpers are functions of the following form:
These accept two arguments: a problem
structure with the problem parameters and a solver_options
with the solver configuration (as instance of SuperScsConfig).
Runners are saved in profile_runners/
. Profile runners execute a diverse collection of problems by invoking profile helper functions.
Profile runners are functions of the form:
The first argument is an instance of SuperSCSConfig
which is passed to all invocations of profile_runner_*
.
The second argument is an (integer) identifier of the runner. The results will be stored in a .mat
file at profile_results/{id}.mat
.
These mat files are not put under version control.
The third argument is a structure with runner configuration parameters.
These typically are ranges of the problem parameters to be tested, number of repetitions of each run and more.
Profile runners store some general statistics in the CSV file register.csv which can be used for look-up purposes.
Lastly, we have the experimenters. These are stored in experimenters/
.
An experimenter is a MATLAB script that calls a profile runner with different solver parameters.
Once an experimenter has completed successfully, we may create performance plots using perf_profile_plot
To build a new docker image, run the following command from within the base directory of SuperSCS:
The docker configuration is given in Dockerfile.