{"action":"created","issue":{"url":"https://api.github.com/repos/brian-team/brian2cuda/issues/18","repository_url":"https://api.github.com/repos/brian-team/brian2cuda","labels_url":"https://api.github.com/repos/brian-team/brian2cuda/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/brian-team/brian2cuda/issues/18/comments","events_url":"https://api.github.com/repos/brian-team/brian2cuda/issues/18/events","html_url":"https://github.com/brian-team/brian2cuda/issues/18","id":142396803,"number":18,"title":"IOError due to not written 'restuls/last_run_info.txt' in cuda_standalone mode","user":{"login":"denisalevi","id":11474000,"avatar_url":"https://avatars.githubusercontent.com/u/11474000?v=3","gravatar_id":"","url":"https://api.github.com/users/denisalevi","html_url":"https://github.com/denisalevi","followers_url":"https://api.github.com/users/denisalevi/followers","following_url":"https://api.github.com/users/denisalevi/following{/other_user}","gists_url":"https://api.github.com/users/denisalevi/gists{/gist_id}","starred_url":"https://api.github.com/users/denisalevi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisalevi/subscriptions","organizations_url":"https://api.github.com/users/denisalevi/orgs","repos_url":"https://api.github.com/users/denisalevi/repos","events_url":"https://api.github.com/users/denisalevi/events{/privacy}","received_events_url":"https://api.github.com/users/denisalevi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-21T16:12:07Z","updated_at":"2016-03-22T09:58:55Z","closed_at":null,"body":"When running a brian2 script in `cuda_standalone` mode with `compile=True` and `run=True` arguments for `device.build()`, following error is thrown:\r\n```\r\nTraceback (most recent call last):\r\n  File \"test.py\", line 5, in <module>\r\n    device.build(directory='./', compile=True, run=True, debug=False)\r\n  File \"/mnt/antares_raid/home/denisalevi/projects/dev_brian2cuda/brian2cuda_repo/brian2cuda/device.py\", line 586, in build\r\n    self.run(directory, with_output, run_args)\r\n  File \"/home/denisalevi/anaconda2/envs/dev_b2c/lib/python2.7/site-packages/brian2/devices/cpp_standalone/device.py\", line 797, in run\r\n    last_run_info = open('results/last_run_info.txt', 'r').read()\r\nIOError: [Errno 2] No such file or directory: 'results/last_run_info.txt'\r\n```\r\nThis error can be reproduced with:\r\n```\r\nfrom brian2 import *\r\nimport brian2cuda                                                     \r\n\r\nset_device('cuda_standalone')\r\ndevice.build(directory='./', compile=True, run=True, debug=False)\r\n```\r\n\r\n@moritzaugustin could you check if you can reproduce this error?\r\n\r\nThe `CUDAStandaloneDevice` object calls the `CPPStandaloneDevice.run()` method (which it inherits) and that tries to open `results/last_run_info.txt`. In `cpp_standalone` mode, the created `objects.cpp` file writes the `results/last_run_info.txt` in its `_write_arrays()` function. In `cuda_standalone` mode, it doesn't. \r\n\r\nSo either override the `run()` method in the `CUDAStandaloneDevice` class or change the `brian2cuda/templates/objects.cu` template to write the 'restuls/last_run_info.txt' file as done in `brian2/devices/cpp_standalone/templates/objects.cpp`.\r\n\r\nCheck functionality of `results/last_run_info.txt' file!"},"comment":{"url":"https://api.github.com/repos/brian-team/brian2cuda/issues/comments/199728084","html_url":"https://github.com/brian-team/brian2cuda/issues/18#issuecomment-199728084","issue_url":"https://api.github.com/repos/brian-team/brian2cuda/issues/18","id":199728084,"user":{"login":"mstimberg","id":1381982,"avatar_url":"https://avatars.githubusercontent.com/u/1381982?v=3","gravatar_id":"","url":"https://api.github.com/users/mstimberg","html_url":"https://github.com/mstimberg","followers_url":"https://api.github.com/users/mstimberg/followers","following_url":"https://api.github.com/users/mstimberg/following{/other_user}","gists_url":"https://api.github.com/users/mstimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mstimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstimberg/subscriptions","organizations_url":"https://api.github.com/users/mstimberg/orgs","repos_url":"https://api.github.com/users/mstimberg/repos","events_url":"https://api.github.com/users/mstimberg/events{/privacy}","received_events_url":"https://api.github.com/users/mstimberg/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T09:58:54Z","updated_at":"2016-03-22T09:58:54Z","body":"Hi everyone,\r\nAFAICT, all of @Kwartke's changes to Brian2 have been merged into master already. The merge was in November 2015 but your submodule still tracks the version from October."}}