Git Product home page Git Product logo

mog's Introduction

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/

mog's People

Contributors

overdr0ne avatar aggregate avatar zistack avatar

Watchers

James Cloos avatar Tim Newsom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.