app
avail(user=typer.Option(getuser(), '-u', '--user', help="User name to check. Use '*' to check all users."), queue=typer.Option(None, '-q', '--queue', help='Queue to check. By default, all queues are checked.'), slurm=typer.Option(False if which('squeue') is None else True, '--slurm/--no-slurm', help='Check slurm jobs.'), sge=typer.Option(False if which('qstat') is None else True, '--sge/--no-sge', help='Check sge queues.'), gpu=typer.Option(False, '--gpu', help='Hides non gpu queues.'), hide=typer.Option(True, '--hide-full/--no-hide-full', help='Hide full queues.'), debug=typer.Option(False, help='Help debugging', hidden=True))
Alias: [yellow bold]hqavail[/yellow bold]. Get available queues
Source code in hpcman/queue/app.py
error()
launch(command=typer.Argument(..., help='Command to launch.', show_choices=True, show_default=True), force=typer.Option(False, '--force', help='Force the submission of the job even if run is already present.', rich_help_panel='Extras'), queue=typer.Option(..., '-q', '--queue', help="The queue to use. Provide [yellow]'*'[/yellow] to explicitly select any available queue.", prompt='Please enter a queue name' if sys.stdin.isatty() else False, rich_help_panel='Required'), procs=typer.Option(1, '-p', '-P', '--procs', help='Number of processors to request.', rich_help_panel='Job'), freemem=typer.Option('4G', '-f', '--free', help='Free memory to request on the machine to run this job. (100M, 1G, 4G, 32G etc.)', rich_help_panel='Job'), maxmem=typer.Option(None, '-m', '--max', help='Maximum memory this job may use (kill if exceeded). (100M, 1G, 4G, 32G etc.)', rich_help_panel='Job'), maxfilesize=typer.Option('500G', '-F', '--filesize', help='Kill the job if any created file exceeds this size. (100M, 1G, 4G, 32G etc.)', rich_help_panel='Job'), path=typer.Option(environ.get('PATH'), '--path', help='The [green]$PATH[/green] to use for the submitted commands.', rich_help_panel='Extras', show_default='$PATH environment variable of current shell'), runname=typer.Option(None, '-r', '--runname', help='The run name and log output directory name.', rich_help_panel='Job', show_default='sge.{command}'), debug=typer.Option(False, help='Help debugging', hidden=True))
Launch interactive browser job type on a node
Source code in hpcman/queue/app.py
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
|
queue()
stat(user=typer.Option(getuser(), '-u', '--user', help="User name to check. Use '*' to check all users."), queue=typer.Option(None, '-q', '--queue', help='Queue to check. By default, all queues are checked.'), slurm=typer.Option(False if which('squeue') is None else True, '--slurm/--no-slurm', help='Check slurm jobs.'), sge=typer.Option(False if which('qstat') is None else True, '--sge/--no-sge', help='Check sge queues.'), watch=typer.Option(False, '-w', '--watch', help='Watch for changes to the queue status'), debug=typer.Option(False, help='Help debugging', hidden=True))
Alias: [yellow bold]hqstat[/yellow bold]. Get job status
Source code in hpcman/queue/app.py
submit(command=typer.Argument(... if sys.stdin.isatty() else '-', help="Command to submit. Reading from stdin assumed. Provide [yellow]'-'[/yellow] to explicitly use stdin.", show_default=False, metavar='"COMMAND"'), runname=typer.Option(..., '-r', '--runname', help="The run name and log output directory name. Provide [yellow]'-'[/yellow] for automatic name generation.", prompt='Please enter a job run name' if sys.stdin.isatty() else False, rich_help_panel='Required'), queue=typer.Option(..., '-q', '--queue', help="The queue to use. Provide [yellow]'*'[/yellow] to explicitly select any available queue.", prompt='Please enter a queue name' if sys.stdin.isatty() else False, rich_help_panel='Required'), jobtype=typer.Option(JobType.BATCH if sys.stdin.isatty() else JobType.ARRAY, '-t', '--type', help='Type of job to submit. [bold]Note: Default depends on inputs.[/bold] [yellow]batch[/yellow] is default except when reading from stdin, then [yellow]array[/yellow] is default.', rich_help_panel='Job', case_sensitive=False, show_default=f"{JobType.BATCH.value}'; '{JobType.ARRAY.value}' when reading stdin'"), procs=typer.Option(1, '-p', '-P', '--procs', help='Number of processors to request. Match with threads/cores used in command. Exposed as [green]$NPROCS[/green] in the submit script.', rich_help_panel='Job'), freemem=typer.Option('4G', '-f', '--free', help='Free memory to request on the machine to run this job. (100M, 1G, 4G, 32G etc.)', rich_help_panel='Job'), maxmem=typer.Option(None, '-m', '--max', help='Maximum memory this job may use (kill if exceeded). (100M, 1G, 4G, 32G etc.)', rich_help_panel='Job'), maxfilesize=typer.Option('500G', '-F', '--filesize', help='Kill the job if any created file exceeds this size. (100M, 1G, 4G, 32G etc.)', rich_help_panel='Job'), force=typer.Option(False, '--force', help='Force the submission of the job even if --runname is already present. (as [green]SGE_Array[/green] default)', rich_help_panel='Extras'), path=typer.Option(environ.get('PATH'), '--path', help='The [green]$PATH[/green] to use for the submitted commands.', rich_help_panel='Extras', show_default='$PATH environment variable of current shell'), hold=typer.Option(None, '--hold', help='Hold the job until specified jobs (either job name or job ID) are completed. If multiple, must be comma-delimited.', rich_help_panel='Extras'), holdauto=typer.Option(False, '--hold-auto', help='Hold the execution of the job until all other jobs in dir have finished. (Uses [green].hpcman_jobnums[/green] file)', rich_help_panel='Extras'), concurrency=typer.Option(50, '-b', '--concurrency', help="Array job maximum task concurrency. ('batch size'; unused in batch mode)", rich_help_panel='Job'), queuetype=typer.Option(QueueType.SGE if 'vaughan' in str(environ.get('HOSTNAME', '')) else QueueType.SLURM, help='Type of queuing system.', rich_help_panel='Queue', hidden=False, show_default=QueueType.SGE.value if 'vaughan' in str(environ.get('HOSTNAME', '')) else QueueType.SLURM.value), validatepath=typer.Option(True, '--validate-path/--no-validate-path', help='Validate the provided [green]$PATH[/green] value. Turn off at own risk. You may need to disable if you want to use the default [green]$PATH[/green] of your bash shell, or if you want to do some testing.', rich_help_panel='Extras'), cache=typer.Option(False, '--cache', help='Cache information for the submitted job to [green]~/hpcman/cache[/green].', rich_help_panel='Extras', hidden=True), localdrive=typer.Option(None, '--local-drive', help=f"'Use the local drive for the submitted job. If set to [yellow]pertask[/yellow], uses [green]$TMPDIR[/green] ([yellow]'{environ.get('TMPDIR')}'[/yellow]) as the prefix for the tempdir (`mktemp -d -p`). If set to [yellow]shared[/yellow], uses [green]$TMPDIR/$USER/$DIRNAME[/green] ([yellow]$TMPDIR/'{environ.get('USER')}'/'{Path.cwd().name}'[/yellow]) as the tempdir, where [green]$DIRNAME[/green] is the name of the current directory.'", rich_help_panel='Local drive'), localprefix=typer.Option(None, '--local-prefix', help='Override the default prefix of the tempdir. See the help for --local-drive.', rich_help_panel='Local drive'), mirrortype=typer.Option(MirrorType.LINK, '--mirror-type', help='Type of mirroring to local drive. Only used if --local-drive is set.', rich_help_panel='Local drive', show_default=MirrorType.LINK.value), copyresults=typer.Option(None, '--copy-results/--no-copy-results', help='Copy final results back to submission directory. Defaults to [magenta]True[/magenta] if --local-drive [yellow]pertask[/yellow] and [magenta]False[/magenta] if --local-drive [yellow]shared[/yellow].', rich_help_panel='Local drive', show_default=False), dryrun=typer.Option(False, '--dry-run', help='Do not actually submit the job, but set up the submit directory,', rich_help_panel='Extras'), watch=typer.Option(False, '--watch', help='Run `hpcman queue stat --watch` to monitor the status of the jobs.', rich_help_panel='Extras'), conda=typer.Option(False, '--conda', help='Enable use of conda (e.g. [green]conda activate ...[/green]).', rich_help_panel='Conda'), condaexe=typer.Option('/local/cluster/miniconda3_base/bin/conda', '--conda-exe', help='Path to [yellow]conda[/yellow] executable to enable.', rich_help_panel='Conda', exists=True, file_okay=True, dir_okay=False, readable=True, resolve_path=True), debug=typer.Option(False, help='Help debugging', hidden=True))
Alias: [yellow bold]hqsub[/yellow bold]. Submit queueing job "COMMAND". Multiple lines of commands supported using piped input from STDIN. If providing as argument and there are spaces in the command, use quotes to provide the command, either '' or "" will work! Do not use -c '', just provide the command as argument.
Source code in hpcman/queue/app.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
|