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

smtweb throws exception when viewing record with DistributedLaunchMode. #321

Open
cc-a opened this issue Jan 13, 2016 · 1 comment
Open
Assignees
Milestone

Comments

@cc-a
Copy link

cc-a commented Jan 13, 2016

Please see the below traceback generated by smtweb. Viewing the same record with smt list --long does not cause any problems. I have encountered the same issue using a variety of different executables on both Arch Linux and Red Hat.

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8001/test/20160113-181836/

Django Version: 1.8.8
Python Version: 2.7.5
Installed Applications:
[u'sumatra.recordstore.django_store',
u'django.contrib.contenttypes',
u'tagging',
'sumatra.web']
Installed Middleware:
()

Traceback:
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  164.                 response = response.render()
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/response.py" in render
  158.             self.content = self.rendered_content
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  135.         content = template.render(context, self._request)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/backends/django.py" in render
  74.         return self.template.render(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in render
  210.                     return self._render(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in _render
  202.         return self.nodelist.render(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in render
  905.                 bit = self.render_node(node, context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in render_node
  919.         return node.render(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  135.         return compiled_parent._render(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in _render
  202.         return self.nodelist.render(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in render
  905.                 bit = self.render_node(node, context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in render_node
  919.         return node.render(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  65.                 result = block.nodelist.render(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in render
  905.                 bit = self.render_node(node, context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in render_node
  919.         return node.render(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in render
  959.             output = self.filter_expression.resolve(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in resolve
  648.                 obj = self.var.resolve(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in resolve
  789.             value = self._resolve_lookup(context)
File "/home/cica1d14/.local/lib/python2.7/site-packages/django/template/base.py" in _resolve_lookup
  849.                             current = current()
File "/home/cica1d14/.local/lib/python2.7/site-packages/sumatra/recordstore/django_store/models.py" in command_line
  305.         return self.to_sumatra().command_line
File "/home/cica1d14/.local/lib/python2.7/site-packages/sumatra/recordstore/django_store/models.py" in to_sumatra
  277.             self.launch_mode.to_sumatra(),
File "/home/cica1d14/.local/lib/python2.7/site-packages/sumatra/recordstore/django_store/models.py" in to_sumatra
  166.             lm = getattr(launch, self.type)(**parameters)
File "/home/cica1d14/.local/lib/python2.7/site-packages/sumatra/launch.py" in __init__
  225.             mpi_cmd = MPI(path=mpirun)
File "/home/cica1d14/.local/lib/python2.7/site-packages/sumatra/programs.py" in __init__
  69.         self.version = version or self._get_version()
File "/home/cica1d14/.local/lib/python2.7/site-packages/sumatra/programs.py" in _get_version
  97.                                       shell=True, timeout=5)
File "/home/cica1d14/.local/lib/python2.7/site-packages/sumatra/core.py" in run
  69.         signal.signal(signal.SIGALRM, alarm_handler)

Exception Type: ValueError at /test/20160113-181836/
Exception Value: signal only works in main thread
guyer added a commit to guyer/sumatra that referenced this issue Jan 27, 2016
The MPI Exectuble doesn't actually need a version.

Addresses open-research#321
@apdavison
Copy link
Contributor

The problem seems to be in that reconstructing the LaunchMode object from the database, Sumatra retrieves an invalid value for the version (None, ought to be 'unknown'), which then causes it to attempt to launch mpirun to get the version.

We need to figure out how the value of None is getting stored in the database.

@apdavison apdavison added this to the 0.7.4 milestone Apr 14, 2016
@apdavison apdavison self-assigned this Apr 14, 2016
@apdavison apdavison modified the milestones: 0.7.4, 0.8 Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants