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
e84318c1
Commit
e84318c1
authored
12 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
Python/conf: fixed libraries loading and preloading (for newer machines)
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
60f964ef
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dct_launch.py
+17
-5
17 additions, 5 deletions
dct_launch.py
zUtil_Conf/conf.example.xml
+17
-11
17 additions, 11 deletions
zUtil_Conf/conf.example.xml
zUtil_Python/dct_io_xml.py
+9
-2
9 additions, 2 deletions
zUtil_Python/dct_io_xml.py
with
43 additions
and
18 deletions
dct_launch.py
+
17
−
5
View file @
e84318c1
...
...
@@ -70,15 +70,26 @@ class DCTLauncher(object):
# Adding runtime libraries
try
:
env_initial
=
os
.
environ
[
"
LD_LIBRARY_PATH
"
]
env_initial
_libs
=
os
.
environ
[
"
LD_LIBRARY_PATH
"
]
except
KeyError
:
env_initial
=
""
libs
=
self
.
conf
.
getRuntimeLibraries
()
env_initial
_libs
=
""
os
.
environ
[
"
LD_LIBRARY_PATH
"
]
=
""
libs
=
self
.
conf
.
get
Matlab
RuntimeLibraries
()
for
lib
in
libs
:
env_var
=
os
.
environ
[
"
LD_LIBRARY_PATH
"
]
os
.
environ
[
"
LD_LIBRARY_PATH
"
]
=
"
:
"
.
join
([
env_var
,
lib
])
# Adding preload libraries
try
:
env_initial_preload
=
os
.
environ
[
"
LD_PRELOAD
"
]
except
KeyError
:
env_initial_preload
=
""
os
.
environ
[
"
LD_PRELOAD
"
]
=
""
libs
=
self
.
conf
.
getMatlabPreloadLibraries
()
for
lib
in
libs
:
env_var
=
os
.
environ
[
"
LD_PRELOAD
"
]
os
.
environ
[
"
LD_PRELOAD
"
]
=
"
:
"
.
join
([
env_var
,
lib
])
cmd
=
[
os
.
path
.
join
(
self
.
conf
.
getMatlabPath
(),
"
bin
"
,
"
matlab
"
)]
for
arg
in
self
.
args
:
cmd
.
append
(
arg
)
...
...
@@ -94,7 +105,8 @@ class DCTLauncher(object):
subobj
.
wait
()
except
KeyboardInterrupt
:
pass
os
.
environ
[
"
LD_LIBRARY_PATH
"
]
=
env_initial
os
.
environ
[
"
LD_LIBRARY_PATH
"
]
=
env_initial_libs
os
.
environ
[
"
LD_PRELOAD
"
]
=
env_initial_preload
def
_launchUpdate
(
self
):
util
=
dct
.
dct_utils_git
.
DCTGit
(
self
.
dct_dir
)
...
...
This diff is collapsed.
Click to expand it.
zUtil_Conf/conf.example.xml
+
17
−
11
View file @
e84318c1
<config>
<general>
<libraries>
<!-- Dynamic Libraries needed by ASTRA -->
<path>
/usr/local/cuda-4.0.17/lib64
</path>
<path>
/scisoft/users/batenbur/gpu/lib
</path>
<!-- If you want the latest version, substitute this
<path>/bliss/users/vigano/local/usr/src/astra/build/linux/.libs</path>
-->
</libraries>
</general>
<astra>
<mex>
<!-- Mex files needed in the matlab path by ASTRA -->
...
...
@@ -34,11 +23,28 @@
<matlab>
<version>
2012a
</version>
<path>
/sware/com/matlab_2012a/
</path>
<!-- Additional options for matlab's start. Not handled, yet. -->
<options>
<opt>
-nodesktop
</opt>
<opt>
-nosplash
</opt>
</options>
<libraries>
<!-- Dynamic Libraries needed by ASTRA -->
<path>
/usr/local/cuda-4.0.17/lib64
</path>
<path>
/scisoft/users/batenbur/gpu/lib
</path>
<!-- If you want the latest version, substitute this
<path>/bliss/users/vigano/local/usr/src/astra/build/linux/.libs</path>
-->
</libraries>
<preload>
<!-- Needed for older versions of matlab, on newer systems -->
<!--
<path>/usr/lib/libstdc++.so.6</path>
-->
</preload>
</matlab>
<dct>
...
...
This diff is collapsed.
Click to expand it.
zUtil_Python/dct_io_xml.py
+
9
−
2
View file @
e84318c1
...
...
@@ -91,8 +91,15 @@ class DCTConf(DCTXMLBase):
element
=
self
.
tree
.
find
(
"
dct/ignore_id19
"
)
return
element
.
get
(
'
value
'
)
def
getRuntimeLibraries
(
self
):
elems
=
self
.
tree
.
findall
(
"
general/libraries/path
"
)
def
getMatlabRuntimeLibraries
(
self
):
elems
=
self
.
tree
.
findall
(
"
matlab/libraries/path
"
)
output
=
[]
for
elem
in
elems
:
output
.
append
(
elem
.
text
)
return
output
def
getMatlabPreloadLibraries
(
self
):
elems
=
self
.
tree
.
findall
(
"
matlab/preload/path
"
)
output
=
[]
for
elem
in
elems
:
output
.
append
(
elem
.
text
)
...
...
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