matlab分时代码-bonsai_phys241:用于为phys241项目运行树代码的Python脚本

  • s6_249908
    了解作者
  • 1.7MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-15 18:30
    上传日期
matlab分时代码盆景 用于为phys 241项目包装并生成图形和视频的Python脚本。 tipsy.py模块具有管理盆景使用的.tipsy文件格式(和其他n体代码)的功能,并且可以将基于文本的n体文件转换为.tipsy格式。 有关此代码包的详细概述,请参阅 如果您需要帮助,请通过物理点ucsd点edu或与mfolkerts联系。 如果您想提供帮助,建议您使用此回购协议。 然后提交您的更改。 ## Requirements软件: CUDA,git,gcc / g ++,make,cmake,Python,Numpy,Matplotlib,ffmpeg,libx264,mpi(可选),ipython笔记本(可选) 我使用IPyhon Notebook来管理我的项目。 笔记本通过小的输入/输出块对提供与python内核的实时交互(认为MATLAB符合Mathematica)。 这也使我可以轻松地通过网页()分享我的结果。 可以在和网站上找到更多信息。 硬件一个或多个具有Fermi微体系结构的NVIDIA GPU: 我使用的平台是Ubuntu Linix(),但是,没有任何已知原因导致该
bonsai_phys241-master.zip
内容介绍
bonsai_phys241 ============== Python Scripts for wrapping the [Bonsai Tree Code](https://github.com/fizxmike/Bonsai) and generating figures and video for phys 241 projects. The tipsy.py module has functions to manage the .tipsy file format used by Bonsai (and other n-body code) and can convert text-based n-body files to .tipsy format. For a detailed outline of this code package, please refer to the [Code Documentation](https://github.com/fizxmike/bonsai_phys241/blob/master/doc/latex/refman.pdf?raw=true) If you need help, please contact **mfolkerts** *at* **physics** *dot* **ucsd** *dot* **edu**, or [create an issue](https://github.com/fizxmike/bonsai_phys241/issues/new). It is recommended that you [fork](https://help.github.com/articles/fork-a-repo) this repo if you would like to contribute. Then submit a [pull request](https://help.github.com/articles/using-pull-requests) for your changes. ##Requirements **Software:** CUDA, git, gcc/g++, make, cmake, Python, Numpy, Matplotlib, ffmpeg, libx264, mpi (optional), ipython notebook (optional) I used IPyhon Notebook to manage my projects. The notebook offers real-time interaction with a python kernel through small input/output block pairs (think MATLAB meets Mathematica). It also allowed me to easily share my results through a webpage (). More info can be found on the [IPython Notebook](http://ipython.org/notebook) and [Notebook Viewer](http://nbviewer.ipython.org/) web sites. **Hardware** One or more NVIDIA GPU with Fermi microarchitecture: [Compute capability 2.0 or Better](https://developer.nvidia.com/cuda-gpus) Ubuntu Linix ([12.04.4 LTS](http://releases.ubuntu.com/12.04/)) is the platform I used, however, there are no known reasons why this code will not work on Windows or Mac OS. Especially since Bonsai's build scripts are wrapped with cmake which is platform independent. ###Install CUDA 5.x You will need to install the CUDA *drivers* as well as the *SDK*. The *code samples* are optional and require many more obscure graphics libraries to comple sucessfully. Select your platform and follow the instructions in the "Getting Started Guide" here: [CUDA Developer Downloads](https://developer.nvidia.com/cuda-downloads) ###Install *Required* Packages Ubuntu 12.04 LTS: sudo apt-get install git python-numpy python-matplotlib ffmpeg libavcodec-extra-* build-essential cmake ###Install *Optional* Packages Ubuntu 12.04 LTS: sudo apt-get install mpich2 ipython ipython-notebook I will leave it to future users to detail installation procedures on Windows, Mac OS, and other Linux distros (good luck). ##Setup You can start by cloning this and the Bonsai Tree Code repo into the same parent folder on your system. All the commands below assume you are using a linux/unix style terminal interface. ###Repo Checkout In the command line, navigate to a desired location to work. Then do: git clone https://github.com/fizxmike/bonsai_phys241.git git clone https://github.com/treecode/Bonsai.git Next you will need to compile the Bonsai Tree Code. ###Compiling Bonsai (without MPI) cd Bonsai/runtime cmake -DUSE_B40C=1 -DUSE_DUST=0 make ###Compiling Bonsai (with MPI) cd Bonsai/runtime cmake -DUSE_B40C=1 -DUSE_DUST=0 -DCMAKE_CXX_COMPILER=mpicxx make ##Launching IPython Notebook (Optional): Navigate to this repo's folder then launch IPython Notebook. This command will launch your web browser and take you to the IPython Notebook interface, and list all my notebooks. ipython notebook ###Lanuching IPython Notebook from a remote server This requires you to tunnel local port 8888 traffic to the server. You can do this by first connecting with ssh: ssh user@remote-gpu-server.someplace.edu -L 8888:localhost:8888 Then when you launch IPython Notebook, tell it not to launch a browser window (which would be some command line/text -based web browser on your server terminal, yuck): ipython notebook --no-browser Back on your local machine, navigate to http://127.0.0.1:8888/ ##Easy Examples This notebook will get you started running the tree code. You can copy and paste these commands into the python terminal or your own python script. * Quick Start Example: [Plummer.ipynb](http://nbviewer.ipython.org/github/fizxmike/bonsai_phsy241/blob/master/Plummer.ipynb) ##Other Galaxies I do not provide the initial data, sorry. * View Cartwheel Midterm 2014 Results: [Cartwheel.ipynb](http://nbviewer.ipython.org/github/fizxmike/bonsai_phsy241/blob/master/Cartwheel.ipynb) * View Cartwheel Final 2014 Results: [CartwheelFinal.ipynb](http://nbviewer.ipython.org/github/fizxmike/bonsai_phsy241/blob/master/CartwheelFinal.ipynb) ##Twin Milky Way: * Milky Way Galaxy C (from galactics) Warm-up: [MWGalaxy.ipynb](http://nbviewer.ipython.org/github/fizxmike/bonsai_phsy241/blob/master/MWGalaxy.ipynb) * Twin Milky Way Collision: [MWCollision.ipynb](http://nbviewer.ipython.org/github/fizxmike/bonsai_phsy241/blob/master/MWCollision.ipynb) ##My Cartwheel: * Ball and Disk Warmup: [CollisionWarmup.ipynb](http://nbviewer.ipython.org/github/fizxmike/bonsai_phsy241/blob/master/CollisionWarmup.ipynb) * Cannon Ball Collision: [Collision.ipynb](http://nbviewer.ipython.org/github/fizxmike/bonsai_phsy241/blob/master/Collision.ipynb) ##My N-Body Code * Inner solar system webApp (leapfrog): [leapint.js](https://googledrive.com/host/0By3y5bc79qIyU2c0WE4tQVFTZHM/leapFrog/leapint.htm)
评论
    相关推荐
    • ubuntu
      ubuntu
    • Ubuntu手册指南
      Ubuntu基础使用手册,适合初学者入门学习,从安装到运行
    • Ubuntu完全手册
      很不错的Ubuntu入门教程,讲解全面、详细
    • Ubuntu完全教程
      Ubuntu完全教程,Ubuntu完全教程,让你成为Ubuntu高手!
    • Ubuntu 参考手册
      本书《Ubuntu 参考手册》的目的是对整个Ubuntu 系统作一个全面的介绍,提供一本“安装之後的”用户使用手册
    • Ubuntu 教程 pdf
      这《Ubuntu 参考手册》的目的是对整个Ubuntu 系统作一个全面的介绍,提供一本 “安装之後的”用户使用手册。本手册的读者应该愿意阅读shell 脚本(scripts)。我也 假定读者在阅读之前已经具备了类Unix 系统的基本...
    • Ubuntu使用技巧
      Ubuntu命令的使用技巧,官方文档,提供很多常见问题的解决办法。
    • ubuntu 中文手册
      ubuntu 中文手册。是新手学习ubuntu 的必看宝典。里面从最基础的东西讲起,全面介绍了ubuntu
    • Ubuntu参考手册
      ubuntu是Linux的一个版本,这是关于ubuntu系统的一些资料,对学习ubuntu非常有好处哦!
    • UBUNTU LINUX教程
      ubuntu linux 教程 ubuntu linux 教程 ubuntu linux 教程 ubuntu linux 教程 ubuntu linux 教程