generated from INFORMSJoC/2019.0000
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.m
51 lines (40 loc) · 1.19 KB
/
install.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
% Install ABIP LP and QCP
% Intel MKL is required
clear; clc; close all;
addpath(genpath('.'));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fill in MKL path here
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% mkl_path = '';
mkl_path = '/opt/intel/oneapi/mkl';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
abip_home = pwd;
build_qcp = false;
% Install ABIP-LP
fprintf("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n")
fprintf("Building and installing the ABIP-LP part. \n");
cd(fullfile(abip_home, 'src', 'abip-lp'));
make_abip;
% Install ABIP-QCP
fprintf("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n")
fprintf("Building and installing the ABIP-QCP part. \n");
cd(fullfile(abip_home, 'src', 'abip-qcp'));
if exist(mkl_path, 'dir')
make_abip_qcp;
build_qcp = true;
else
fprintf("QCP is not installed due to missing MKL library. \n");
end
% Go back
cd(abip_home);
% Run a toy example
fprintf("Running a toy example \n");
try
test_abip_install(1);
catch
fprintf("ABIP installation failed \n");
return;
end % End try
cd(abip_home);
fprintf("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n")
fprintf("Successfully installed ABIP \n");