Skip to content

Commit

Permalink
Merge pull request #2085 from numbbo/release
Browse files Browse the repository at this point in the history
To be released as v2.6
  • Loading branch information
nikohansen committed Mar 8, 2022
2 parents 11ce3cc + e157ff6 commit fa736fe
Show file tree
Hide file tree
Showing 72 changed files with 7,041 additions and 2,344 deletions.
32 changes: 26 additions & 6 deletions .circleci/config.yml
Expand Up @@ -15,10 +15,10 @@ jobs:
command: apt-get update -qy
- run:
name: Set time zone
command: ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime
command: ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime
- run:
name: Install python-dev with apt-get
command: DEBIAN_FRONTEND="noninteractive" apt-get install -y python3-dev
command: DEBIAN_FRONTEND=noninteractive apt-get install -y python3-dev
- run:
name: Install pip with apt-get
command: apt-get install -y python3-pip
Expand All @@ -28,6 +28,15 @@ jobs:
- run:
name: Install git with apt-get
command: apt-get install -y git
- run:
name: Install cargo with apt-get
command: apt-get install -y rust-all
- run:
name: Install libclang for bindgen with apt-get
command: apt-get install -y libclang-dev
- run:
name: Install bindgen with cargo
command: cargo install bindgen
# - run:
# name: Install tkinter with apt-get
# command: apt-get install -y python3-tk
Expand All @@ -40,10 +49,10 @@ jobs:
command: ln -s /usr/bin/python3 /usr/bin/python
- run:
name: Install coco python
command: python3 do.py run-python
command: python3 do.py run-python install-user
- run:
name: Install coco post-processing
command: python3 do.py install-postprocessing
command: python3 do.py install-postprocessing install-user
- run:
name: Run the example experiment
command: |
Expand Down Expand Up @@ -83,11 +92,11 @@ jobs:
no_output_timeout: 1800
- run:
name: Run coco pre-processing tests
command: python3 do.py test-preprocessing
command: python3 do.py test-preprocessing install-user
no_output_timeout: 1800
- run:
name: Run coco post-processing tests
command: python3 do.py test-postprocessing
command: python3 do.py test-postprocessing install-user
no_output_timeout: 5400
- run:
name: Run coco C
Expand All @@ -96,6 +105,17 @@ jobs:
name: Run coco C tests
command: python do.py test-c
no_output_timeout: 1800
- run:
name: Run coco Rust
command: |
export PATH=~/.cargo/bin:$PATH
python do.py run-rust
- run:
name: Run coco Rust tests
command: |
export PATH=~/.cargo/bin:$PATH
python do.py test-rust
no_output_timeout: 1800
- run:
name: Run regression test
command: python do.py test-suites
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/cmake.yml
@@ -0,0 +1,26 @@
name: CMake

on:
workflow_dispatch:
push:
pull_request:
branches: [ master, development ]

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Build C amalgamation
run: python ${{github.workspace}}/do.py build-c

- name: Configure CMake
run: cmake -S ${{github.workspace}}/code-experiments/build/c/ -B ${{github.workspace}}/code-experiments/build/c/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
run: cmake --build ${{github.workspace}}/code-experiments/build/c/build --config ${{env.BUILD_TYPE}}
1 change: 1 addition & 0 deletions LICENSE
Expand Up @@ -51,4 +51,5 @@ We acknowledge in particular:
* the MinUnit code used as the basis for the implementation in
``code-experiments/test/unit-test/minunit_c89.h``, distributed under
the terms of the MIT Licence.
* the Rust code by Leopold Luley in `code-experiments/build/rust/`, distributed unter the terms of both the MIT License and the Apache 2.0 License.

55 changes: 20 additions & 35 deletions README.md
Expand Up @@ -19,6 +19,7 @@ Languages currently available to connect a solver to the benchmarks are
- `Java`
- `MATLAB/Octave`
- `Python`
- `Rust`

Code for others might be available in branched code.
Contributions to link further languages (including a better
Expand All @@ -32,7 +33,7 @@ from using the platform:
![General COCO Structure](coco.png)

For more general information:
- read our benchmarking guidelines introduction [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)]((https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977)) or at [arXiv](https://arxiv.org/abs/1603.08785).
- read our benchmarking guidelines introduction [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)](https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977) or at [arXiv](https://arxiv.org/abs/1603.08785).
- read the [COCO experimental setup](http://numbbo.github.io/coco-doc/experimental-setup) description
- see the [`bbob-biobj` and `bbob-biobj-ext` COCO multi-objective functions testbed](http://numbbo.github.io/coco-doc/bbob-biobj/functions) documentation and the [specificities of the performance assessment for the bi-objective testbeds](http://numbbo.github.io/coco-doc/bbob-biobj/perf-assessment).
- consult the [BBOB workshops series](http://numbbo.github.io/workshops),
Expand Down Expand Up @@ -69,7 +70,8 @@ _Additional_ requirements for running an algorithm in a specific language.

* **C**: `make`, such as GNU make (when using [GNU make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm), make sure that your ``CC`` environment variable is set to `gcc` by potentially typing `set CC=gcc` if you see an error).
* **Java**: `gcc` and any Java Development Kit (JDK), such that `javac` and `javah` are accessible
(i.e. in the system path).
(i.e. in the system path).
* **Rust**: For details, take a look at the [Rust Readme](./code-experiments/build/rust/README.md)
* **MATLAB**: at least MATLAB 2008, for details, see [here](./code-experiments/build/matlab/README.md)
* **Python on Windows with MinGW**: Python 2.7 and the Microsoft compiler package for Python 2.7
containing VC9, available [here](https://www.microsoft.com/en-us/download/details.aspx?id=44266).
Expand Down Expand Up @@ -609,8 +611,8 @@ year = 2021
}
```

Links and Documentation <a name="Links"></a>
-----------------------
Links About the Workshops and Data <a name="Links"></a>
----------------------------------
* The [_BBOB workshop series_](http://numbbo.github.io/workshops), which uses the
NumBBO/Coco framework extensively, can be tracked
[here](http://numbbo.github.io/workshops "BBOB Workshops")
Expand All @@ -623,23 +625,6 @@ Links and Documentation <a name="Links"></a>
found at https://numbbo.github.io/ppdata-archive
* Stay informed about the BBOB workshop series and releases of the NumBBO/Coco software
by registering via [this form](https://docs.google.com/forms/d/1GS48SXGjapUu6WY6Zt-Ma5HCl2izq4ydT7sMa5ujUDI)
* Read about the basic principles behind the Coco platform in [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)](https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977) or at [arXiv](https://arxiv.org/abs/1603.08785).
* For details on the experimental set-up to carry out the benchmarking
please refer to http://numbbo.github.io/coco-doc/experimental-setup/.
* More detailed documentation of the existing benchmark suites can be found here:
- for the **`bbob`** problem suite at https://numbbo.github.io/gforge/downloads/download16.00/bbobdocfunctions.pdf
with the experimental setup at http://coco.lri.fr/downloads/download15.03/bbobdocexperiment.pdf
- for the **`bbob-biobj`** and **`bbob-biobj-ext`** problem suites
at http://numbbo.github.io/coco-doc/bbob-biobj/functions
- for the **`bbob-largescale`** problem suite
at https://arxiv.org/pdf/1903.06396.pdf
- for the **`bbob-mixint`** and **`bbob-biobj-mixint`** problem suites, we refer to
https://hal.inria.fr/hal-02067932/document and to
https://numbbo.github.io/gforge/preliminary-bbob-mixint-documentation/bbob-mixint-doc.pdf
* Online documentation of the NumBBO/Coco API (i.e. for the ANSI C code) is available at
http://numbbo.github.io/coco-doc/C
* More detailed documentation on how the performance assessement is done can
be found at http://numbbo.github.io/coco-doc/perf-assessment/.
* Downloading this repository
- via the above green "Clone or Download" button or
- by typing `git clone https://github.com/numbbo/coco.git` or
Expand All @@ -650,30 +635,30 @@ Comprehensive List of Documentations <a name="Documentations"></a>
* General introduction: [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting (pdf)](https://www.tandfonline.com/eprint/DQPF7YXFJVMTQBH8NKR8/pdf?target=10.1080/10556788.2020.1808977) or at [arXiv](https://arxiv.org/abs/1603.08785)
* Experimental setup: http://numbbo.github.io/coco-doc/experimental-setup/
* Testbeds
- bbob: https://numbbo.github.io/gforge/downloads/download16.00/bbobdocfunctions.pdf
- bbob-biobj: http://numbbo.github.io/coco-doc/bbob-biobj/functions/
- bbob-biobj-ext: http://numbbo.github.io/coco-doc/bbob-biobj/functions/
- bbob-noisy (only in old code basis): http://coco.lri.fr/downloads/download15.03/bbobdocnoisyfunctions.pdf
- bbob-largescale: https://arxiv.org/pdf/1903.06396.pdf
- bbob-mixint and bbob-biobj-mixint: https://hal.inria.fr/hal-02067932/document and
https://numbbo.github.io/gforge/preliminary-bbob-mixint-documentation/bbob-mixint-doc.pdf
- bbob-constrained (in progress): http://numbbo.github.io/coco-doc/bbob-constrained/functions/
- `bbob`: https://numbbo.github.io/gforge/downloads/download16.00/bbobdocfunctions.pdf
- `bbob-biobj`: http://numbbo.github.io/coco-doc/bbob-biobj/functions/
- `bbob-biobj-ext`: http://numbbo.github.io/coco-doc/bbob-biobj/functions/
- `bbob-noisy` (only in old code basis): http://coco.lri.fr/downloads/download15.03/bbobdocnoisyfunctions.pdf
- `bbob-largescale`: https://arxiv.org/pdf/1903.06396.pdf
- `bbob-mixint`: https://hal.inria.fr/hal-02067932/document
- `bbob-biobj-mixint`: https://numbbo.github.io/gforge/preliminary-bbob-mixint-documentation/bbob-mixint-doc.pdf
- `bbob-constrained` (in progress): http://numbbo.github.io/coco-doc/bbob-constrained


* Performance assessment: http://numbbo.github.io/coco-doc/perf-assessment/
* Performance assessment for biobjective testbeds: http://numbbo.github.io/coco-doc/bbob-biobj/perf-assessment/

* APIs
- ``C`` experiments code: http://numbbo.github.io/coco-doc/C
- Python experiments code (module `cocoex`): https://numbbo.github.io/gforge/apidocs-cocoex/cocoex.html
- Python short [beginners example experiment](code-experiments/build/python/example_experiment_for_beginners.py)
- Python `example_experiment2.py`: https://numbbo.github.io/gforge/apidocs-example_experiment/example_experiment2.html
- Postprocessing code (module `cocopp`): https://numbbo.github.io/gforge/apidocs-cocopp/cocopp.html
- Python experiments code (module `cocoex`): https://numbbo.github.io/coco-doc/apidocs/cocoex
- Python [short experiment code example for beginners](code-experiments/build/python/example_experiment_for_beginners.py)
- Python [`example_experiment2.py`](https://github.com/numbbo/coco/blob/master/code-experiments/build/python/example_experiment2.py): https://numbbo.github.io/coco-doc/apidocs/example
- Postprocessing code (module `cocopp`): https://numbbo.github.io/coco-doc/apidocs/cocopp

* Somewhat outdated documents:
- Former home page: https://web.archive.org/web/20210504150230/https://coco.gforge.inria.fr/
- Full description of the platform: http://coco.lri.fr/COCOdoc/
- Experimental setup before 2016: http://coco.lri.fr/downloads/download15.03/bbobdocexperiment.pdf
- Old framework software documentation: http://coco.lri.fr/downloads/download15.03/bbobdocsoftware.pdf

* Some examples of [results](https://github.com/numbbo/coco/wiki/COCO-Wiki-Home).
* Some examples of [results](https://github.com/numbbo/coco/wiki/).

27 changes: 27 additions & 0 deletions code-experiments/build/c/CMakeLists.txt
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.19)
project(ExampleExperiment
DESCRIPTION "Example COCO experiment"
LANGUAGES C)

find_library(MATH_LIBRARY m)

include(CheckCompilerFlag)
check_compiler_flag(C "-pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion" CC_HAS_WALL_ETC)

add_library(coco STATIC coco.c coco.h)
target_include_directories(coco PUBLIC .)
if(MATH_LIBRARY)
target_link_libraries(coco PUBLIC ${MATH_LIBRARY})
endif()
# Add warning flags
if (MSVC)
target_compile_options(coco PRIVATE "/W3")
elseif (CC_HAS_WALL_ETC)
target_compile_options(coco PRIVATE -pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion)
endif()

add_executable(example_experiment example_experiment.c)
target_link_libraries(example_experiment PUBLIC coco)
if(MATH_LIBRARY)
target_link_libraries(example_experiment PUBLIC ${MATH_LIBRARY})
endif()
2 changes: 1 addition & 1 deletion code-experiments/build/c/Makefile.in
Expand Up @@ -13,7 +13,7 @@
## or installing Cygwin and running GNU make from within Cygwin.

LDFLAGS += -lm
CCFLAGS = -g -ggdb -std=c89 -pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion
CCFLAGS ?= -g -ggdb -std=c89 -pedantic -Wall -Wextra -Wstrict-prototypes -Wshadow -Wno-sign-compare -Wconversion

########################################################################
## Toplevel targets
Expand Down
19 changes: 19 additions & 0 deletions code-experiments/build/c/README.md
Expand Up @@ -23,6 +23,25 @@ the following is lacking:

Instead of `make` and `Makefile` you can use `nmake` and the corresponding `NMakefile`

### CMake

Instead of `make` you can use `cmake` and the corresponding `CMakeLists.txt`:

```
mkdir build
cd build
cmake ../
ninja # or make, depending on your version of CMake
```

### meson

Instead of `make` you can use `meson` and `ninja`:

```
meson setup build
meson compile -C build
```

Getting Started
---------------
Expand Down
18 changes: 18 additions & 0 deletions code-experiments/build/c/meson.build
@@ -0,0 +1,18 @@
project('example_experiment', 'c',
default_options: ['warning_level=3', 'buildtype=release']
)

cc = meson.get_compiler('c')
m_dep = cc.find_library('m', required : false)

coco_lib = static_library('coco',
sources: 'coco.c',
dependencies: m_dep
)

executable('example_experiment',
sources: 'example_experiment.c',
link_with: coco_lib,
dependencies: m_dep
)

0 comments on commit fa736fe

Please sign in to comment.