Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readthedocs documentation #160

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Readthedocs documentation #160

wants to merge 11 commits into from

Conversation

ddtm
Copy link
Contributor

@ddtm ddtm commented Mar 2, 2017

Addresses #113

Copy link
Member

@MarcCote MarcCote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome. Thank you for taking the time of doing this. I pointed out some typos but overall this is all good.

**must be resumable**, i.e. be capable of restoring their state after being
killed and rerun.

You can engage the autoresumption by passing ``-m`` or ``--autoresume`` during
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-m -> -r


* Each invokation of ``smart-dispatch`` creates a so-called **batch** of **jobs**. Smart Dispatch will do its best to create as many simultaneous jobs so as to effecitvely utilze the allocated resources.
* Each job is basically a single PBS file that is run by the queue management system on the cluster (either ``msub`` or ``qsub``).
* A job spawns mulitple concurrent **workers** that all cooperate to execute the requested commands.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mulitple -> multiple

Copy link
Collaborator

@bouthilx bouthilx Jul 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: You will need to adapt this line based on how you change line 14. (See comment)

This directory holds generated PBS files (``job_commands_{pbs_index}.sh``) as well as three command lists:

``commands.txt``:
A list pending commands (this is where the workers are taking their next commands to execute from).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list pending -> list of pending

``logs/``
^^^^^^^^^

Output and error logs in are saved in this directory. The root level contains logs for actual commands. There are also two additional subfolder:
Copy link
Member

@MarcCote MarcCote Mar 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in are -> are

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subfolder -> subfolders

@@ -0,0 +1,8 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it was not intended but I'd rather not add *.sublime-projet or any other file related to IDE/text editor. Each developer has probably its own customized version.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.532% when pulling e8a7d0a on ddtm:readthedocs into c94f08e on SMART-Lab:master.


In order to understand the contents of the generated folders/files, it's good to know how ``smart-dispatch`` deals with **commands** that a user requests to launch on the cluster:

* Each invokation of ``smart-dispatch`` creates a so-called **batch** of **jobs**. Smart Dispatch will do its best to create as many simultaneous jobs so as to effecitvely utilze the allocated resources.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invokation -> invocation

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stumble each time I try to read the second sentence. 😟

What about something like this?

Smart Dispatch will distribute commands to jobs such that each of the latter uses an entire node. Jobs may run many commands concurrently if necessary to use a maximum number of cores and GPUs. The distribution is based on number of cores per node / per command and number of GPUs per node / per command.

* Each invokation of ``smart-dispatch`` creates a so-called **batch** of **jobs**. Smart Dispatch will do its best to create as many simultaneous jobs so as to effecitvely utilze the allocated resources.
* Each job is basically a single PBS file that is run by the queue management system on the cluster (either ``msub`` or ``qsub``).
* A job spawns mulitple concurrent **workers** that all cooperate to execute the requested commands.
* Each worker (basically, a python script) is executing commands sequentially.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it the worker or the command that is basically a python script? If the prior, I don't understand why it needs to be specified.

@bouthilx
Copy link
Collaborator

@ddtm Did you have any problem installing sphinxcontrib-autoprogram? I installed it (version 0.1.3) and I got an error when compiling the doc because of a p2-p3 incompatibilty of textwrap.

Exception occurred:
  File "/home/bouthilx/.virtualenvs/smartdispatch/local/lib/python2.7/site-packages/sphinxcontrib/autoprogram.py", line 223, in make_rst
    yield textwrap.indent(usage, '    ')
AttributeError: 'module' object has no attribute 'indent'
The full traceback has been saved in /tmp/sphinx-err-lVwo2K.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Makefile:20: recipe for target 'html' failed
make: *** [html] Error 1

I had to pull a fresh version from bitbucket and reinstall it to be able to compile the doc.

@bouthilx
Copy link
Collaborator

@ddtm I know you currently are outside for an internship, but would it be possible for you the make the small fix for the PR?

IshmaelBelghazi added a commit to IshmaelBelghazi/smartdispatch that referenced this pull request Aug 8, 2017
@bouthilx bouthilx self-assigned this Aug 29, 2017
@bouthilx
Copy link
Collaborator

bouthilx commented Aug 29, 2017

@mgermain We could use sphinx-argparse instead of sphinxcontrib-autoprogram. See a comparison here.

@mgermain
Copy link
Member

mgermain commented Aug 30, 2017 via email

bouthilx added a commit to bouthilx/smartdispatch that referenced this pull request Sep 14, 2017
Why:

sphinxcontrib-autoprogram's pip version does not support python 3. There
is a more recent version in bitbucket's repository but the installation
is tedious for the few features it gives.
(See comment SMART-Lab#160 (comment)
 for more details on the problem)

How:

sphinxcrontrib-autoprogram was only used to generate automatic
documentation of the script smart-dispatch so the replacement was
trivial. The output is slightly different, arguments being included in
tables for sphinx-argparse while not for sphinxcrontrib-autoprogram.
Overall sphinx-argparse seems good enough.
bouthilx pushed a commit to bouthilx/smartdispatch that referenced this pull request Sep 14, 2017
bouthilx added a commit to bouthilx/smartdispatch that referenced this pull request Sep 14, 2017
Why:

sphinxcontrib-autoprogram's pip version does not support python 3. There
is a more recent version in bitbucket's repository but the installation
is tedious for the few features it gives.
(See comment SMART-Lab#160 (comment)
 for more details on the problem)

How:

sphinxcrontrib-autoprogram was only used to generate automatic
documentation of the script smart-dispatch so the replacement was
trivial. The output is slightly different, arguments being included in
tables for sphinx-argparse while not for sphinxcrontrib-autoprogram.
Overall sphinx-argparse seems good enough.
bouthilx added a commit to bouthilx/smartdispatch that referenced this pull request Sep 14, 2017
Why:

sphinxcontrib-autoprogram's pip version does not support python 3. There
is a more recent version in bitbucket's repository but the installation
is tedious for the few features it gives.
(See comment SMART-Lab#160 (comment)
 for more details on the problem)

How:

sphinxcrontrib-autoprogram was only used to generate automatic
documentation of the script smart-dispatch so the replacement was
trivial. The output is slightly different, arguments being included in
tables for sphinx-argparse while not for sphinxcrontrib-autoprogram.
Overall sphinx-argparse seems good enough.
bouthilx added a commit to bouthilx/smartdispatch that referenced this pull request Sep 14, 2017
Why:

sphinxcontrib-autoprogram's pip version does not support python 3. There
is a more recent version in bitbucket's repository but the installation
is tedious for the few features it gives.
(See comment SMART-Lab#160 (comment)
 for more details on the problem)

How:

sphinxcrontrib-autoprogram was only used to generate automatic
documentation of the script smart-dispatch so the replacement was
trivial. The output is slightly different, arguments being included in
tables for sphinx-argparse while not for sphinxcrontrib-autoprogram.
Overall sphinx-argparse seems good enough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants