{"id":19695929,"url":"https://github.com/bbn-q/macrospin_gpu","last_synced_at":"2025-04-29T11:31:49.982Z","repository":{"id":69663933,"uuid":"79960457","full_name":"BBN-Q/macrospin_gpu","owner":"BBN-Q","description":"Macrospin simulations using PyOpenCL for GPU paralellization","archived":false,"fork":false,"pushed_at":"2017-04-10T20:21:11.000Z","size":224,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T15:04:01.113Z","etag":null,"topics":["gpu","macrospin","pyopencl"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BBN-Q.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-01-24T22:20:31.000Z","updated_at":"2023-09-07T08:09:45.000Z","dependencies_parsed_at":"2023-06-01T13:16:05.715Z","dependency_job_id":null,"html_url":"https://github.com/BBN-Q/macrospin_gpu","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBN-Q%2Fmacrospin_gpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBN-Q%2Fmacrospin_gpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBN-Q%2Fmacrospin_gpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBN-Q%2Fmacrospin_gpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BBN-Q","download_url":"https://codeload.github.com/BBN-Q/macrospin_gpu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251493950,"owners_count":21598202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpu","macrospin","pyopencl"],"created_at":"2024-11-11T19:32:04.659Z","updated_at":"2025-04-29T11:31:49.544Z","avatar_url":"https://github.com/BBN-Q.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Macrospin-GPU\n\n![macrospin_gpu](doc/COST-M-Vis.png)\n\nUse PyOpenCL to run GPU code over many realizations of the Weiner process. A\nconvenient Jinja2-based templating system is used to allow easy specification of\nphysical geometry, magnetic properties, arbitrarily many spin-torque terms, and\nmore.\n\n# Dependencies\n\n* [PyOpenCL](http://mathema.tician.de/software/pyopencl/) for computation\n* [PyOpenGL](http://pyopengl.sourceforge.net/) for visualization\n* [tdqm](https://github.com/noamraph/tqdm) for progress bar\n* [jinja2](http://jinja.pocoo.org/docs/dev/) templating GPU kernels\n\n# Installation\n\nInstalling `macrospin_gpu` itself is quite simple. It's best to ensure that\nPyOpenCL is properly installed (as described below) before continuing. At that\npoint you should simply be able to run:\n\n```shell\ngit clone git@github.com:BBN-Q/macrospin_gpu.git\ncd macrospin_gpu\npip install -e .\n```\n\nTry out some of the examples in `scripts/` to get started. Eventually I'll add\nsome legitimate documentation, but until that point the examples should be sufficient.\nOpenGL visualizations can be seen in the `scripts/costm-visualization.py` script.\n\n## OS X\nInstalling PyOpenCL with pip can be unreliable. It is best to clone the github\nrepository and work from there. Instead of working from the lastest and greatest\nversion you may want to check out a recently tagged release:\n\n```shell\ngit clone git@github.com:pyopencl/pyopencl.git\ncd pyopencl\ngit checkout v2016.2.1\npython configure.py\nmake -j4\nmake install\n```\nIn more recent builds of PyOpenCL, OpenGL interoperation should come for free.\nOlder versions required configuring with the `--cl-enable-gl` option.\n\nIt may be possible to use PyOpenCL from Anaconda, but I have not had a chance to\ntest this path.\n\n## Windows\nUse the Anaconda python distribution.\n\n## Linux\n\nPyOpenCL is not available from Anaconda so there is a bit more configuration to\nbe done on Linux.\n\n### NVIDIA Drivers with Prime\n\nTested on Linux Mint 18.1 with nvidia 378 drivers.  Have installed following\npackages: `nvidia-378`, `nvidia-opencl-icd-378`, `nvida-settings`,\n`nvidia-prime` and `nvidia-modprobe-361`  for NVIDIA support and the generic\n`opencl-headers`, `ocl-icd-libopencl1` and `ocl-icd-opencl-dev` for building\nOpenCL program and `clinfo` to see if anything works. Need to have Nvidia card\npowered up using Prime.\n\n### Build and install PyOpenCL\n\nAgain, manually building is recommended. On modern Linux distributions when\nusing Anaconda Python there may be a conflict between the system `libstdc++` and\nthe one Anaconda ship. If you see errors with \"undefined symbols\" when trying to\nimport `pyopencl`, you may have to using Anaconda gcc to build PyOpenCL or\nrename the Anaconda `libstdc++`. See this [SO\nanswer](http://stackoverflow.com/a/43244137/5445278) for details.\n\n```shell\ngit clone git@github.com:pyopencl/pyopencl.git\ncd pyopencl\ngit checkout v2016.2.1\n./configure.py\nmake -j4\nmake install\n```\n\n## Funding\n\nThis software is based in part upon work supported by the Office of the Director\nof National Intelligence (ODNI), Intelligence Advanced Research Projects\nActivity (IARPA), via contract W911NF-14-C0089. The views and conclusions\ncontained herein are those of the authors and should not be interpreted as\nnecessarily representing the official policies or endorsements, either expressed\nor implied, of the ODNI, IARPA, or the U.S. Government.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbn-q%2Fmacrospin_gpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbn-q%2Fmacrospin_gpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbn-q%2Fmacrospin_gpu/lists"}