Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Gauchard
par
Commits
efcb4c34
Commit
efcb4c34
authored
Jul 27, 2021
by
David Gauchard
Browse files
+ option -c
parent
89bbe630
Changes
1
Hide whitespace changes
Inline
Side-by-side
par
View file @
efcb4c34
#!/bin/bash
time_limit
=
3600s
ncpu
=
$(
nproc
)
set
-e
...
...
@@ -10,11 +11,12 @@ help ()
Syntax:
$1
[-t timelimit]
Start local executables concurrently,
limited by the number of cores reported by 'nproc' (
$(
nproc
)
on this hos
t).
Start local executables concurrently,
limited by default by the number of cores.
Logfiles are created for each executable (<execname>-log.tx
t).
Options:
-t timelimit (default:
${
time_limit
}
)
-t time-limit (default:
${
time_limit
}
)
-c concurrent number of executables (default:
$(
nproc
)
on this host)
EOF
exit
1
...
...
@@ -23,13 +25,13 @@ EOF
while
[
!
-z
"
$1
"
]
;
do
case
"
$1
"
in
-t
)
time_limit
=
"
$2
"
;
shift
;;
-h
)
help
"
$0
"
;;
-c
)
ncpu
=
"
$2
"
;
shift
;;
-h
)
help
"
$0
"
;;
*
)
echo
"argument
$1
not understood"
;
help
"
$0
"
;
exit
1
;;
esac
shift
done
ncpu
=
$(
nproc
)
pids
=
.pid
mkdir
-p
${
pids
}
...
...
@@ -39,7 +41,7 @@ for exec in *; do
# must be executable
[
-x
${
exec
}
]
||
continue
# log file must not already exist
[
-r
${
exec
}
-log
.txt
]
&&
{
echo
"
${
exec
}
: logfile already exists"
;
continue
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment