Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Binary paint shop problem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Jiří Kalvoda
Binary paint shop problem
Commits
e62b1903
Commit
e62b1903
authored
1 year ago
by
Jiří Kalvoda
Browse files
Options
Downloads
Patches
Plain Diff
Drobnosti
parent
c6c3dddc
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
bashrc
+1
-1
1 addition, 1 deletion
bashrc
gen_main_test.sh
+5
-2
5 additions, 2 deletions
gen_main_test.sh
run.sh
+2
-0
2 additions, 0 deletions
run.sh
wrap_run
+3
-2
3 additions, 2 deletions
wrap_run
with
11 additions
and
5 deletions
bashrc
+
1
−
1
View file @
e62b1903
...
...
@@ -12,7 +12,7 @@ workdir_mk()
workdir_set $workdir
mkdir $workdir/data
mkdir $workdir/sdp
mkdir $workdir/sdp/{max_coord,nonzero_coord,3d}
mkdir $workdir/sdp/{max_coord,nonzero_coord,3d
,score_by_cut
}
mkdir $workdir/outputs
echo ". bashrc && workdir_set $workdir"
}
...
...
This diff is collapsed.
Click to expand it.
gen_main_test.sh
+
5
−
2
View file @
e62b1903
...
...
@@ -2,12 +2,15 @@
for
seed
in
$@
do
for
n
in
10 20 50 100 200 400 800
for
n
in
10 20 50 100 200 400 566
do
echo
./wrap_run
-s
-e
-o
--sdp_sage_log_all
algo/semidef_prog_sage.sage
$n
$seed
10 CVXOPT
done
for
n
in
10 20 50 100 200 400 566 800 1131 1600 2263 3200
do
echo
./wrap_run
-s
-e
-o
build/greedy
$n
$seed
echo
./wrap_run
-s
-e
-o
build/rg
$n
$seed
echo
./wrap_run
-s
-e
-o
build/rsg
$n
$seed
echo
./wrap_run
-s
-e
-o
build/semidef_prog
$n
$seed
10
echo
./wrap_run
-s
-e
-o
--sdp_sage_log_all
algo/semidef_prog_sage.sage
$n
$seed
10 CVXOPT
done
done
This diff is collapsed.
Click to expand it.
run.sh
0 → 100755
+
2
−
0
View file @
e62b1903
#!/bin/bash
bash gen_main_test.sh
$@
|
shuf
| systemd-run
--send-sighup
-Pd
-E
LOGFILE
=
$LOGFILE
-E
workdir
=
$workdir
--user
-p
CPUAffinity
=
1
-p
MemoryMax
=
16G
-p
MemoryHigh
=
16G sh
This diff is collapsed.
Click to expand it.
wrap_run
+
3
−
2
View file @
e62b1903
...
...
@@ -22,8 +22,8 @@ if "BPS_CORE" in os.environ and args.core is None:
if
args
.
hash_seed
:
# print(list(hashlib.sha256(i.encode("utf-8")).hexdigest().encode() for i in args.cmd))
h
=
hashlib
.
sha256
(
b
""
.
join
(
hashlib
.
sha256
(
i
.
encode
(
"
utf-8
"
)).
hexdigest
().
encode
()
for
i
in
args
.
cmd
))
args
.
cmd
[
2
]
=
str
(
int
(
h
.
hexdigest
(),
base
=
16
)
%
10000
0
)
h
=
hashlib
.
sha256
(
b
""
.
join
(
hashlib
.
sha256
(
i
.
encode
(
"
utf-8
"
)).
hexdigest
().
encode
()
for
i
in
args
.
cmd
[
0
:
2
]
+
args
.
cmd
[
3
:]
))
args
.
cmd
[
2
]
=
str
(
int
(
h
.
hexdigest
(),
base
=
16
)
%
10000
*
100
+
int
(
args
.
cmd
[
2
])
)
# print(h.hexdigest(), args.cmd[2])
algo_args
=
args
.
cmd
[
3
:]
...
...
@@ -73,6 +73,7 @@ if args.sdp_sage_log_all:
p_env
[
"
BPS_LOG_MAX_COORD
"
]
=
workdir
+
"
/sdp/max_coord/
"
+
run_name
p_env
[
"
BPS_LOG_NONZERO_COORD
"
]
=
workdir
+
"
/sdp/nonzero_coord/
"
+
run_name
p_env
[
"
BPS_LOG_3D
"
]
=
workdir
+
"
/sdp/3d/
"
+
run_name
p_env
[
"
BPS_LOG_SCORE_BY_CUT
"
]
=
workdir
+
"
/sdp/score_by_cut/
"
+
run_name
p
=
subprocess
.
run
(
cmd
,
stdout
=
subprocess
.
PIPE
,
env
=
p_env
)
if
p
.
returncode
or
len
(
p
.
stdout
.
split
(
b
"
\n
"
))
<
3
:
...
...
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