Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpsd-software-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
MPSD Computational Science
mpsd-software-manager
Merge requests
!29
Restructure log location
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Restructure log location
restructure-log-location
into
main
Overview
2
Commits
48
Pipelines
20
Changes
1
Merged
Ashwin Kumar Karnad
requested to merge
restructure-log-location
into
main
1 year ago
Overview
2
Commits
48
Pipelines
20
Changes
1
Expand
Resolves
#7 (closed)
0
0
Merge request reports
Viewing commit
0b53b0ec
Show latest version
1 file
+
11
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
0b53b0ec
move the logfile creation into main
· 0b53b0ec
Ashwin Kumar Karnad
authored
1 year ago
mpsd-software-environment.py
+
11
−
7
Options
@@ -517,8 +517,7 @@ def install_environment(
# Set required variables
release_base_dir
=
script_dir
/
mpsd_release
os
.
environ
.
get
(
"
MPSD_OS
"
,
"
UNKNOWN_OS
"
)
mpsd_microarch
=
os
.
environ
.
get
(
"
MPSD_MICROARCH
"
,
"
UNKNOWN_MICROARCH
"
)
toolchain_dir
=
release_base_dir
/
mpsd_microarch
toolchain_dir
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
spack_setup_script
=
release_base_dir
/
"
spack-environments
"
/
"
spack_setup.sh
"
@@ -558,11 +557,7 @@ def install_environment(
# _mpsd_spack_ver_ with mpsd_release
logging
.
info
(
f
"
Installing toolchain
{
toolchain
}
to
{
toolchain_dir
}
"
)
install_log_file
=
(
config_vars
[
"
build_log_file
"
]
.
replace
(
"
mpsd_spack_ver_
"
,
f
"
{
mpsd_release
}
_
"
)
.
replace
(
"
_toolchains_
"
,
f
"
_
{
toolchain
}
_
"
)
)
# log the command
setup_log_cmd
(
mpsd_release
,
@@ -680,7 +675,16 @@ def main():
# Carry out the action
args
=
parser
.
parse_args
()
# Get machine configs
os
.
environ
.
get
(
"
MPSD_OS
"
,
"
UNKNOWN_OS
"
)
os
.
environ
.
get
(
"
MPSD_MICROARCH
"
,
"
UNKNOWN_MICROARCH
"
)
# parse logging first
# decide the log_file_name
(
config_vars
[
"
build_log_file
"
]
.
replace
(
"
mpsd_spack_ver_
"
,
f
"
{
mpsd_release
}
_
"
)
.
replace
(
"
_toolchains_
"
,
f
"
_
{
toolchain
}
_
"
)
)
set_up_logging
(
args
.
loglevel
)
# target dir is the place where this script exists. the
Loading