Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
graintracking
DCT
Commits
6794750d
Commit
6794750d
authored
8 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
OAR-launching: tentative fix for the diversity of data structures
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
22712a4b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zUtil_OAR/make_oar_matlab.m
+30
-31
30 additions, 31 deletions
zUtil_OAR/make_oar_matlab.m
with
30 additions
and
31 deletions
zUtil_OAR/make_oar_matlab.m
+
30
−
31
View file @
6794750d
...
...
@@ -16,60 +16,59 @@ function script_location = make_oar_matlab(pathdir, tmpdir, tmpname, oarpars)
exportPreload
=
'
export
LD_PRELOAD
=
"${LD_PRELOAD}:';
disp('Loading configuration about external libraries from conf.xml')
xml
C
onf =
xml_read(fullfile(GT_MATLAB_HOME, 'conf.xml')
);
xml
_c
onf =
gtConfLoadXML(
);
% External execution time libraries, same as:
% ['source ' fullfile(GT_MATLAB_HOME, 'setup_gt_env')], ...
if (isfield(xmlConf, 'matlab') ...
&& isfield(xmlConf.matlab, 'libraries') ...
&& isfield(xmlConf.matlab.libraries, 'path'))
libs = xmlConf.matlab.libraries;
num_paths = numel(libs.path);
try
libraries_path = gtConfGetField(xml_conf, 'matlab.libraries.path');
num_paths = numel(libraries_path);
external_libs = cell(1, num_paths);
is_cell = iscell(lib
s.
path);
is_cell = iscell(lib
raries_
path);
for n = 1:num_paths
% We add them all, but only the ones that are really reached on
% the machine will be used. Unfortunately this could
% potentially create problems, even if it is unlikely
if (is_cell)
external_libs{n}
= [exportLibary libs.path{n} '"
'
]
;
tmp_path =
external_libs{n};
else
tmp_path
=
libs
.
path
(
n
);
if
isfield
(
tmp_path
,
'
CONTENT
'
)
external_libs
{
n
}
=
[
exportLibary
tmp_path
.(
'
CONTENT
'
)
'"'
];
else
tmp_path
warning
(
'
OAR
:
params
'
,
'
Weird
structure
!
'
)
e
nd
tmp_path =
external_libs
(n);
end
tmp_path = gtConfFilterAttribute(tmp_path, 'hostname');
if (~isempty(tmp_path)
)
e
xternal_libs{n} = [exportLibary tmp_path '"
'
];
end
end
else
catch
external_libs
=
{};
end
if
(
isfield
(
xmlConf
,
'
matlab
'
)
...
&&
isfield
(
xmlConf
.
matlab
,
'
preload
'
)
...
&&
isf
ield
(
xml
C
onf
.
matlab
.
preload
,
'
path
'
)
)
libs
=
xmlConf
.
matlab
.
preload
;
num_paths
=
numel
(
libs
.
path
);
try
preloads_path
=
gtConfGetF
ield
(
xml
_c
onf
,
'
matlab
.
preload
.
path
'
)
;
num_paths
=
numel
(
preloads_
path
);
preload_libs
=
cell
(
1
,
num_paths
);
is_cell
=
iscell
(
libs
.
path
);
is_cell
=
iscell
(
preloads_
path
);
for
n
=
1
:
num_paths
%
We
add
them
all
,
but
only
the
ones
that
are
really
reached
on
%
the
machine
will
be
used
.
Unfortunately
this
could
%
potentially
create
problems
,
even
if
it
is
unlikely
if
(
is_cell
)
preload_libs
{
n
}
=
[
exportPreload
libs
.
path
{
n
}
'"'
]
;
tmp_path
=
preloads_
path
{
n
};
else
tmp_path
=
libs
.
path
(
n
);
if
isfield
(
tmp_path
,
'
CONTENT
'
)
preload_libs
{
n
}
=
[
exportPreload
tmp_path
.(
'
CONTENT
'
)
'"'
];
else
tmp_path
warning
(
'
OAR
:
params
'
,
'
Weird
structure
!
'
)
end
tmp_path
=
preloads_
path
(
n
);
end
tmp_path
=
gtConfFilterAttribute
(
tmp_path
,
'
hostname
'
);
if
(
~
isempty
(
tmp_path
)
)
preload_libs
{
n
}
=
[
exportPreload
tmp_path
'"'
];
end
end
else
catch
preload_libs
=
{};
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment