{"action":"created","issue":{"url":"https://api.github.com/repos/genn-team/genn/issues/56","repository_url":"https://api.github.com/repos/genn-team/genn","labels_url":"https://api.github.com/repos/genn-team/genn/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/genn-team/genn/issues/56/comments","events_url":"https://api.github.com/repos/genn-team/genn/issues/56/events","html_url":"https://github.com/genn-team/genn/issues/56","id":105685331,"number":56,"title":"cpu_only mode unnecssary copy","user":{"login":"tnowotny","id":5477463,"avatar_url":"https://avatars.githubusercontent.com/u/5477463?v=3","gravatar_id":"","url":"https://api.github.com/users/tnowotny","html_url":"https://github.com/tnowotny","followers_url":"https://api.github.com/users/tnowotny/followers","following_url":"https://api.github.com/users/tnowotny/following{/other_user}","gists_url":"https://api.github.com/users/tnowotny/gists{/gist_id}","starred_url":"https://api.github.com/users/tnowotny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnowotny/subscriptions","organizations_url":"https://api.github.com/users/tnowotny/orgs","repos_url":"https://api.github.com/users/tnowotny/repos","events_url":"https://api.github.com/users/tnowotny/events{/privacy}","received_events_url":"https://api.github.com/users/tnowotny/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/genn-team/genn/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-09T21:10:18Z","updated_at":"2016-03-12T21:13:02Z","closed_at":null,"body":"At the moment one needs to make a differently named copy from the .cu file(s) so that the compiler is not confused by the suffix.\r\nSo, in cpu_only mode, one, for example, needs to create something like classol_sim_cpu_only.cc from classol_sim.cu to get this done. Note, it has to be different in suffix and base name. This should be improved in the future so that \"make cpu_only\" suffices to sort this out."},"comment":{"url":"https://api.github.com/repos/genn-team/genn/issues/comments/195810144","html_url":"https://github.com/genn-team/genn/issues/56#issuecomment-195810144","issue_url":"https://api.github.com/repos/genn-team/genn/issues/56","id":195810144,"user":{"login":"tnowotny","id":5477463,"avatar_url":"https://avatars.githubusercontent.com/u/5477463?v=3","gravatar_id":"","url":"https://api.github.com/users/tnowotny","html_url":"https://github.com/tnowotny","followers_url":"https://api.github.com/users/tnowotny/followers","following_url":"https://api.github.com/users/tnowotny/following{/other_user}","gists_url":"https://api.github.com/users/tnowotny/gists{/gist_id}","starred_url":"https://api.github.com/users/tnowotny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnowotny/subscriptions","organizations_url":"https://api.github.com/users/tnowotny/orgs","repos_url":"https://api.github.com/users/tnowotny/repos","events_url":"https://api.github.com/users/tnowotny/events{/privacy}","received_events_url":"https://api.github.com/users/tnowotny/received_events","type":"User","site_admin":false},"created_at":"2016-03-12T21:13:02Z","updated_at":"2016-03-12T21:13:02Z","body":"Hi - I am sorry for the confusion but what you get when using the generate_run examples and choosing execution on the CPU is never the CPU_ONLY mode that this issue refers to. I know it's a bit confusing but the philosophy of GeNN has always been that both CPU and GPU code are available at compile time and the user is free to program their user side code to use either or both (which the program invoked by generate_run does).\r\nHowever, there is also a proper CPU_ONLY mode in the development branch for the case where CUDA or appropriate hardware are not available. Checkout the development branch and have a look at the CPU_ONLY option, e.g. in the MBody1 user project's generate_run.cc.\r\nUsing this option, all dependencies on CUDA should be removed; however the renaming problem for classol_sim.cu which started this issue, still remains because even if CUDA is not installed the .cu ending is interpreted by the c++ compiler.\r\n"}}