Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
No description, website, or topics provided.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
WHAT IS IT? MOG(MIMD On GPU) is a set of tools that allow the programmer to run their MIMD code(e.g. openMPI-like program) on a GPU(i.e. a SIMD machine). You will be somewhat restricted in what you can do, particularly when it comes to things like system calls. To get an idea of what's possible, check out the test programs: test.c and iotest.c. For piles of details, and a bit of history, start here: https://github.com/aggregate/MOG/tree/master/docs QUICK START 1. Install a c->mipsel cross compiler. I highly recommend following these instructions rather than trying to build your own from scratch, unless you are experienced with that sort of thing. a) Go to https://sourcery.mentor.com/GNUToolchain/subscription3130?lite=MIPS and follow the link to the recommended release. b) Download the recommended package installer for GNU/Linux c) make the downloaded binary executable with: chmod +x <downloaded-package.bin> d) run the package: ./<downloaded-package.bin> and follow the installer instructions. (make sure to note your install location) 2. Install CUDA for your distro from https://developer.nvidia.com/cuda-downloads (this isn't totally trivial, but tutorials are widely available). We've tested various versions from 4.0-7.0. 3. Get the MOG source: git clone https://github.com/aggregate/MOG 4. In your downloaded source, configure MOG to point to your cross compiler and CUDA install: ./configure then follow the prompts *If you built your own cross compiler, you will likely need to modify some arguments at the top of mogcc. 5. Compile mogas: gcc mogas.c -o mogas. Note: Though not strictly necessary, you may also want to change the GPU_MULTIPROCESSORS, GPU_WARPSIZE and GPU_THREADSPERBLOCK definitions at the top of mog.cu to match your system. RUNNING THE SYSTEM 1. For example, the program test.c, which includes some basic file I/O, can be compiled into test.as: ./mogcc test.c >test.as *This actually runs GCC for MIPSEL and then translates the MIPS code into our MOG instruction set using a series of sed/awk scripts. It's ugly, but GCC MIPSEL seems to have a lot of imaginary instructions in its output, so a better translator is postponed until we know what the full scope of instructions emitted by GCC MIPSEL is. There is a fair amount of stuff spewed to stderr while doing this. 2. The next step is to run the assembler to generate the data files that will be compiled into the simulator. For that, simply: ./mogas <test.as >mog.h The mog.h name is critical, because it gets compiled into the interpreter. 3. To build the executable MOG, just type: make 4. Now, run your program! ./MOG Congratulations, you made it. iotest.c similarly tests some basic file I/O. Play around with it, and tell us what you think. *If the TRACE flag is set, you'll get a tracer; otherwise, you get execution that executes many instructions per kernel invocation. CREDIT (BLAME?) Except for the .deb files, this code was written by H. Dietz. It is free software, but should NOT be redistributed at this time. Thus, consider it as being copyrighted with that restriction for now, although we will soon change the status to public domain or an attribution-style copyright. We have no long-term intention of preventing anyone from using this system in any context, including incorporating it under commercial products. As for most of our freely available source code, we make no claims of usability, etc., for this system. USE IT AT YOUR OWN RISK. Later versions may have some level of support, but this 20101122 release should be seen as a "toy" to let people see what we're doing... so they know we're serious about MOG and that it really does work. The author's contact info is: \_/ Hank Dietz, Professor & James F. Hardymon Chair in Networking \_/ . 0 University of Kentucky, Electrical & Computer Engineering Dept. O-O /v\ 453 F. Paul Anderson Tower /v\// \\ Lexington, KY 40506-0046 Parallel // \\ . )\ Phone: (859) 257 4701 FAX: (859) 257 3092 Processing /( . )\-^^ URL: http://aggregate.org/hankd/ using Linux ^^-^^ This software is posted at: https://github.com/aggregate/MOG/