/README.rst

https://gitlab.com/kunalp/edac_sph · ReStructuredText · 141 lines · 94 code · 47 blank · 0 comment · 0 complexity · 6a7a10823fd738e77d1aea36723fe4e6 MD5 · raw file

  1. This repository contains the code for the EDAC-SPH method.
  2. It also contains the manuscript to be submitted in the manuscript directory.
  3. The code requires pysph but is in a separate repo so as not to be tied to
  4. pysph during development. The code will eventually be integrated into
  5. PySPH.
  6. Requirements
  7. -------------
  8. Install PySPH_, currently this requires the latest version of the master branch.
  9. The other packages required are matplotlib_, psutil_ and execnet_.
  10. .. _PySPH: http://pysph.bitbucket.io
  11. .. _matplotlib: http://matplotlib.org
  12. .. _psutil: https://pypi.python.org/pypi/psutil
  13. .. _execnet: http://codespeak.net/execnet/
  14. Installation
  15. ------------
  16. 0. Setup a virtualenv or use a reasonable Python distribution where you can
  17. install packages.
  18. 1. Install PySPH from the master branch, like so::
  19. $ git clone https://bitbucket.org/pysph/pysph.git
  20. $ cd pysph
  21. $ pip install -r requirements.txt
  22. $ python setup.py develop
  23. $ cd ..
  24. 2. Clone this repository::
  25. $ git clone https://gitlab.com/prabhu/edac_sph.git
  26. 3. From the directory containing this file, run the following::
  27. $ cd edac_sph
  28. $ pip install -r requirements.txt
  29. You should be all set with this.
  30. Generating the results
  31. -----------------------
  32. The simulations are automated with PySPH's automation framework. This will
  33. perform all the required simulations (this can take a few days) and also
  34. generate all the plots for the manuscript.
  35. To use the automation code, do the following::
  36. $ python automate.py
  37. # or
  38. $ ./automate.py
  39. This will run all the problems and will take a few days to complete on a
  40. powerful machine. By default the simulation outputs are in the ``outputs``
  41. directory and the final plots for the paper are in ``manuscript/figures``.
  42. If you wish to run only a few problems of interest you can do the following::
  43. $ ./automate.py Cavity EllipticalDrop
  44. You could also use::
  45. $ ./automate.py cavity ellipticaldrop
  46. The list of problems is case insensitive. For all the possible options please
  47. try this::
  48. $ ./automate.py --help
  49. If you wish to run just one particular simulation, try something like this::
  50. $ ./automate.py --match tvf_bql TaylorGreen
  51. If a simulation has been completed and you run the automate script it will not
  52. re-run the simulation. To force a recomputation, remove the output directory
  53. for that simulation, for example::
  54. $ rm -rf outputs/elliptical_drop/std_sph
  55. $ ./automate.py -f EllipticalDrop
  56. Adding more compute nodes
  57. -------------------------
  58. The automation framework in PySPH supports distributing the simulations to
  59. other computers. One first needs to have password-less ssh access to these
  60. computers. This is typically done by first creating an SSH key pair on the
  61. local machine and copying that over to the remote machine. This is usually
  62. done like so::
  63. $ ssh-keygen
  64. $ ssh-copy-id user@remote_machine
  65. See the article `password less logins
  66. <http://askubuntu.com/questions/46930/how-can-i-set-up-password-less-ssh-login>`_
  67. for more details.
  68. To setup a machine as a remote compute node, one must have a c++ compiler and
  69. a Python installation on the machine. This should include the Python
  70. development files (``python-dev`` or ``python-devel``). Given this, it is
  71. fairly straightforward to setup a new machine as follows::
  72. $ python automate.py -a remote_host
  73. This will copy the necessary files from the local computer to the remote
  74. computer and setup everything on the remote machine. The configuration is
  75. saved to the ``config.json`` file. The scripts for setting up and updating the
  76. remote host will be placed in ``.pysph_auto`` and can be edited if your remote
  77. machines require a different setup.
  78. Once a new computer is added, when one runs the ``automate.py`` script it will
  79. automatically distribute the computations across all the workers and the local
  80. machine. If for some reason one does not wish to use a particular worker, one
  81. can remove the entry from the ``config.json`` file.
  82. If the sources are edited, one can update them on all the nodes by running::
  83. $ ./automate.py -u
  84. Which will update the sources on all workers and rebuild PySPH as well as run
  85. any problems specified.
  86. Building the paper
  87. -------------------
  88. To build the paper::
  89. $ cd manuscript
  90. $ pdflatex edac_sph.tex
  91. $ bibtex edac_sph
  92. $ pdflatex edac_sph.tex
  93. $ pdflatex edac_sph.tex
  94. Thats about it.