Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
FSL
fdt
Commits
e7796360
Commit
e7796360
authored
17 years ago
by
David Flitney
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bugs in monitor functionality
parent
8113d661
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bedpostx
+28
-1
28 additions, 1 deletion
bedpostx
with
28 additions
and
1 deletion
bedpostx
+
28
−
1
View file @
e7796360
...
...
@@ -103,11 +103,38 @@ preprocid=`${FSLDIR}/bin/fsl_sub -F -l ${subjdir}.bedpostX/logs ${FSLDIR}/bin/be
echo Queuing parallel processing stage
nslices=
`
${
FSLDIR
}
/bin/fslval
${
subjdir
}
/data dim3
`
[ -f
${
subjdir
}
.bedpostX/commands.txt ] && rm
${
subjdir
}
.bedpostX/commands.txt
if [
"x
$SGE_ROOT
"
=
"x"
]; then
#
# Need to set off a backgrounded monitoring task
#
cat <<EOM >
${
subjdir
}
.bedpostX/monitor
#!/bin/sh
finished=0
logdir=
${
subjdir
}
.bedpostX/logs
while [ \
$finished
-eq 0 ] ; do
nfin=0
if [ -f \
$logdir
/bedpostx.o*.1 ] ; then
nfin=\
`
cat
\$
logdir/bedpostx.o
*
|
\
grep
Done |
wc
-w
|
awk
'{print \$1}'
\`
fi
if
[
\$
nfin
-eq
$nslices
]
;
then
finished
=
1
fi
echo
"
\$
nfin slices processed"
sleep
600
;
done
EOM
chmod
+x
${
subjdir
}
.bedpostX/monitor
${
subjdir
}
.bedpostX/monitor&
monitorpid
=
$!
fi
for
((
slice
=
0
;
slice <
$nslices
;
slice++
))
;
do
echo
"
${
FSLDIR
}
/bin/bedpostx_single_slice.sh
$subjdir
$nfibres
$fudge
$burnin
$slice
"
\
>>
${
subjdir
}
.bedpostX/commands.txt
done
bedpostid
=
`
${
FSLDIR
}
/bin/fsl_sub -j
$preprocid
-l
${
subjdir
}
.bedpostX/logs -M
$mailto
-N bedpostx -t
${
subjdir
}
.bedpostX/commands.txt
`
[
"x
$SGE_ROOT
"
=
"x"
]
&&
kill
$monitorpid
echo
Queuing post processing stage
mergeid
=
`
${
FSLDIR
}
/bin/fsl_sub -j
$bedpostid
-F -l
${
subjdir
}
.bedpostX/logs
${
FSLDIR
}
/bin/bedpostx_postproc.sh
$subjdir
`
...
...
@@ -121,7 +148,7 @@ finished=0
logdir=
${
subjdir
}
.bedpostX/logs
while [
\$
finished -eq 0 ] ; do
nfin=0
if [ -f \
$logdir
/bedpost.o
$bedpostid
.1 ] ; then
if [ -f
\$
logdir/bedpost
x
.o
$bedpostid
.1 ] ; then
nfin=
\`
cat
\$
logdir/bedpostx.o
$bedpostid
.* |
\
grep Done | wc -w | awk '{print
\$
1}'
\`
fi
...
...
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