Test the time when problems are high dimensions #1
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
name: Profile cbds and newuoa using optiprofiler, small | |
on: | |
# Trigger the workflow on push or pull request | |
push: | |
# Trigger the workflow manually | |
schedule: | |
- cron: '0 12 */3 * *' | |
workflow_dispatch: | |
env: | |
GFORTRAN_VERSION: 12 | |
jobs: | |
test: | |
name: Profile BDS and newuoa, small | |
runs-on: ${{matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
matlab: [latest] | |
dim: [small] | |
with_optim_toolbox: [yes] | |
solver: [cbds] | |
competitor: [newuoa] | |
run_plain: [false] | |
feature: [plain, perturbed_x0, noisy, truncated, permuted, linearly_transformed, random_nan, quantized, custom] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Checkout OptiProfiler | |
uses: actions/checkout@v4 | |
with: | |
repository: optiprofiler/optiprofiler | |
ref: matlab | |
path: optiprofiler | |
- name: Clone PRIMA | |
uses: actions/checkout@v4 | |
with: | |
repository: libprima/prima | |
path: prima | |
- name: Checkout BDS | |
uses: actions/checkout@v4 | |
with: | |
repository: blockwise-direct-search/bds | |
ref: main | |
path: bds | |
- name: Install Texlive | |
run: sudo apt-get update && sudo apt-get install texlive | |
- name: Check whether LaTeX is installed | |
run: pdflatex --version | |
- name: Cache MATLAB | |
id: cache-matlab | |
uses: actions/cache@v4.0.1 | |
with: | |
path: ${{ runner.tool_cache }}/MATLAB | |
key: ${{ matrix.os }}-${{ matrix.matlab }}-${{ matrix.with_optim_toolbox }} | |
- name: Set up MATLAB with optimization toolbox | |
if: ${{ matrix.with_optim_toolbox == 'yes' }} | |
uses: matlab-actions/setup-matlab@v2.1.2 | |
with: | |
release: ${{ matrix.matlab }} | |
products: Optimization_Toolbox | |
- name: Run test | |
uses: matlab-actions/run-command@v2.1.1 | |
with: | |
command: | | |
root_dir = pwd() | |
ls | |
% Setup optiprofiler | |
cd(fullfile(root_dir, 'optiprofiler')); | |
setup | |
cd(root_dir); | |
% Compile prima | |
path_prima = fullfile(root_dir, 'prima'); | |
cd(path_prima); | |
setup | |
% Setup bds | |
cd(fullfile(root_dir, 'bds')); | |
setup | |
cd(fullfile(root_dir, 'bds', 'tests', 'competitors')); | |
addpath(pwd); | |
% profile | |
cd(fullfile(root_dir, 'bds', 'tests')); | |
options = struct(); | |
options.feature_name = '${{ matrix.feature }}'; | |
options.labels = {'${{ matrix.solver }}', '${{ matrix.competitor }}'}; | |
options.dim = '${{ matrix.dim }}'; | |
options.run_plain = ${{ matrix.run_plain }}; | |
profile_optiprofiler(options); | |
cd(root_dir); | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: profile_optiprofiler_${{ matrix.solver }}_${{ matrix.competitor }}_${{ matrix.dim }}_${{ matrix.feature }}_plain_${{ matrix.run_plain }} | |
path: ./bds/tests/out |