Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GRIS
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien GUGLIELMINI
GRIS
Commits
71078770
Commit
71078770
authored
1 year ago
by
Julien GUGLIELMINI
Browse files
Options
Downloads
Patches
Plain Diff
Fixed error leading to wrong BBH pairs
parent
706bfdd1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wGRR
+5
-5
5 additions, 5 deletions
wGRR
wGRR_worker.zsh
+4
-5
4 additions, 5 deletions
wGRR_worker.zsh
with
9 additions
and
10 deletions
wGRR
+
5
−
5
View file @
71078770
...
...
@@ -7,7 +7,7 @@ trap 'rm -rf "$tmp"' EXIT
export
LC_ALL
=
C
SECONDS
=
0
readonly
VERSION
=
1.4.
3
readonly
VERSION
=
1.4.
4
bold
=
$(
tput bold
)
green
=
$(
tput setaf 2
)
...
...
@@ -496,12 +496,12 @@ if [[ $BATCHFLAG == 0 ]] ; then
fi
printf
"%-17s -- %s
\n
"
"["
$(
textifyDuration
$SECONDS
)
"]"
"Starting 1 job on 1 thread for wGRR calculation"
|
tee
-a
${
OUT
}
.wgrr.log
ARRAYSIZE
=
$NPAIRS
./wGRR_worker.zsh
$AWKEXE
$ARRAYSIZE
$OUT
$NJOBS
1
$PRT
$tmp
./wGRR_worker.zsh
$AWKEXE
$ARRAYSIZE
$OUT
$NJOBS
1
$PRT
$tmp
$COVT
$IDT
elif
[[
$THREADS
-eq
1
]]
;
then
printf
"%-17s -- %s
\n
"
"["
$(
textifyDuration
$SECONDS
)
"]"
"Starting 1 job on 1 thread for wGRR calculation"
|
tee
-a
${
OUT
}
.wgrr.log
printf
"%-17s -- %s
\n
"
"[WARNING]"
"Running wGRR with a large dataset on 1 thread can lead to memory issues"
|
tee
-a
${
OUT
}
.wgrr.log
ARRAYSIZE
=
$NPAIRS
./wGRR_worker.zsh
$AWKEXE
$ARRAYSIZE
$OUT
$NJOBS
1
$PRT
$tmp
./wGRR_worker.zsh
$AWKEXE
$ARRAYSIZE
$OUT
$NJOBS
1
$PRT
$tmp
$COVT
$IDT
else
if
[[
$THREADS
-gt
$NJOBS
]]
;
then
printf
"%-17s -- %s
\n
"
"["
$(
textifyDuration
$SECONDS
)
"]"
"
$THREADS
threads requested, but only
$NJOBS
jobs to execute"
|
tee
-a
${
OUT
}
.wgrr.log
...
...
@@ -510,7 +510,7 @@ if [[ $BATCHFLAG == 0 ]] ; then
printf
"%-17s -- [%-50s] 0/%s 0s"
"[PROGRESS]"
""
$NJOBS
for
i
in
{
1..
$NJOBS
}
;
do
echo
$i
done
| xargs
-n
1
-P
$THREADS
sh
-c
'arg=$
7
; ./wGRR_worker.zsh $0 $1 $2 $3 $arg $4 $5 $6 '
$AWKEXE
$ARRAYSIZE
$OUT
$NJOBS
$PRT
$tmp
$STIME
done
| xargs
-n
1
-P
$THREADS
sh
-c
'arg=$
9
; ./wGRR_worker.zsh $0 $1 $2 $3 $arg $4 $5 $6
$7 $8
'
$AWKEXE
$ARRAYSIZE
$OUT
$NJOBS
$PRT
$tmp
$COVT
$IDT
$STIME
printf
"
\r\0
33[K%-17s -- [%-50s] %s/%s"
"[PROGRESS]"
$(
head
-c
50 < /dev/zero |
tr
"
\0
"
"="
)
$NJOBS
$NJOBS
printf
"
\n
"
fi
...
...
@@ -533,7 +533,7 @@ else
if
[[
$MAXJOBS
-gt
0
]]
&&
[[
$MAXJOBS
-lt
$NJOBS
]]
;
then
JA
=
"
${
JA
}
%
${
MAXJOBS
}
"
fi
JID
=
$(
sbatch
--parsable
--wait
-p
${
PARTITION
}
--array
=
${
JA
}
-c
1
-J
"wGRR_worker"
--mem
=
$REQMEM
--wrap
=
"./wGRR_worker.zsh
$AWKEXE
$ARRAYSIZE
$OUT
$NJOBS
1
$PRT
$tmp
"
)
JID
=
$(
sbatch
--parsable
--wait
-p
${
PARTITION
}
--array
=
${
JA
}
-c
1
-J
"wGRR_worker"
--mem
=
$REQMEM
--wrap
=
"./wGRR_worker.zsh
$AWKEXE
$ARRAYSIZE
$OUT
$NJOBS
1
$PRT
$tmp
$COVT
$IDT
"
)
if
[[
`
sacct
-j
$JID
|
grep
"TIMEOUT"
`
]]
;
then
printf
"
${
bold
}${
red
}
%-17s -- %s
\n
${
normal
}
"
"[ERROR]"
"Some workers encountered a TIMEOUT."
|
tee
-a
${
OUT
}
.wgrr.log
printf
"
${
bold
}${
red
}
%-17s -- %s
\n
${
normal
}
"
"[ERROR]"
"Saving the partial files in
${
OUT
}
.wgrr_part directory."
|
tee
-a
${
OUT
}
.wgrr.log
...
...
This diff is collapsed.
Click to expand it.
wGRR_worker.zsh
+
4
−
5
View file @
71078770
...
...
@@ -26,12 +26,11 @@ alias awk=$1
ARRAYSIZE
=
$2
OUT
=
$3
NJOBS
=
$4
arg
=
$5
PRT
=
$6
TMP
=
$7
STIME
=
$8
COV
T
=
$9
IDT
=
${
10
}
COVT
=
$8
ID
T
=
$9
STIME
=
${
10
}
if
[[
`
hostname
`
!=
"maestro-"
*
]]
||
[[
${
SLURM_ARRAY_TASK_ID
}
==
""
]]
;
then
SLURM_ARRAY_TASK_ID
=
$5
...
...
@@ -44,7 +43,7 @@ MINP=$((MAXP-ARRAYSIZE+1))
if
[[
$STIME
!=
""
]]
;
then
CTIME
=
$(
date
+%s
)
printf
"
\r\0
33[K%-17s -- [%-50s] %s/%s %s"
"[PROGRESS]"
$(
C
=
$((
arg
*
50
/
NJOBS
))
;
if
[
$C
-eq
0
]
;
then
printf
"="
;
else
head
-c
$C
< /dev/zero |
tr
"
\0
"
"="
;
fi
)
$
arg
$NJOBS
$(
textifyDuration
$((
CTIME-STIME
))
)
printf
"
\r\0
33[K%-17s -- [%-50s] %s/%s %s"
"[PROGRESS]"
$(
C
=
$((
SLURM_ARRAY_TASK_ID
*
50
/
NJOBS
))
;
if
[
$C
-eq
0
]
;
then
printf
"="
;
else
head
-c
$C
< /dev/zero |
tr
"
\0
"
"="
;
fi
)
$
SLURM_ARRAY_TASK_ID
$NJOBS
$(
textifyDuration
$((
CTIME-STIME
))
)
fi
awk
-v
COV
=
${
COVT
}
-v
ID
=
${
IDT
}
-v
MINP
=
$MINP
-v
MAXP
=
$MAXP
-v
OBBH
=
${
OUT
}
.bbh_part.
${
SLURM_ARRAY_TASK_ID
}
-f
wGRR.awk
$OUT
.allpairs.txt
$PRT
$OUT
.m8 |
sort
-k1
,1V
-k2
,2V
>
$OUTFILE
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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