Giter Site home page Giter Site logo

damian-666 / occa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libocca/occa

0.0 2.0 0.0 26.59 MB

OCCA: Portable Approach for Parallel Architectures (http://libocca.org)

License: MIT License

Emacs Lisp 0.46% C++ 77.99% Objective-C 0.04% C 13.96% Julia 0.85% Python 2.18% Java 0.17% Makefile 0.72% MATLAB 0.51% M 0.02% Shell 0.48% Fortran 2.60%

occa's Introduction

OCCA Build Status

OCCA is an open-source (MIT license) library used to program current multi-core/many-core architectures. Devices (such as CPUs, GPUs, Intel's Xeon Phi, FPGAs, etc) are abstracted using an offload-model for application development and programming for the devices is done through a C-based (OKL) or Fortran-based kernel language (OFL). OCCA gives developers the ability to target devices at run-time by using run-time compilation for device kernels.

Taiga

We are using Taiga to schedule and manage our tasks.

To submit an issue, please follow this link

README

Installing

Using a terminal, go to your OCCA directory You should see: README.md (this file) include src lib

To compile libocca.so, type:

make

To compile the Fortran library, setup the OCCA_FORTRAN_ENABLED environment variable before compiling

export OCCA_FORTRAN_ENABLED="1"

Python 2 and 3 bindings are available with OCCA. If you wish to setup the occa Python module, rather than using make, compile both libocca.so and the module with

python make.py

Examples

We have a few examples to show different features of OCCA. The addVectors example contains examples for each current supported language

  • C++
  • C
  • Python
  • Fortran
  • Julia

Compile

To compile addVectors (Hello World! style example) in C++

cd examples/addVectors/cpp
make

Environment

Setup your LD_LIBRARY_PATH to point to libocca.so

export LD_LIBRARY_PATH+=':<occa>/lib'

where <occa> is the OCCA directory

Run

./main

Status

  • Linux and OSX are fully supported

  • Windows is partially supported

    • Code is up-to-date for windows
    • Missing compilation project/scripts
    • Visual Studio project is out of date
  • OKL Status:

    • Supports most of C (send bugs =))
    • Preprocessor is missing variadic functions
  • OFL Status:

    • Obsolete for now
    • Version 0.1 supports a subset of Fortran:
      • integer, real, character, logical, double precision
      • function, subroutine
      • DO, WHILE, IF, IF ELSE, ELSE

Useful environment variables:

Environment Variable Description
OCCA_CACHE_DIR Sets directory where kernels are cached (Default: ${HOME}/._occa
OCCA_INCLUDE_PATH Adds directories to find headers
OCCA_LIBRARY_PATH Adds directories to find libraries
OCCA_CXX C++ compiler used for libocca.so and run-time compilation
OCCA_CXXFLAGS C++ compiler flags used for libocca.so and run-time compilation

OpenCL

Environment Variable Description
OCCA_OPENCL_COMPILER_FLAGS Adds additional OpenCL flags when compiling kernels

CUDA

Environment Variable Description
OCCA_CUDA_COMPILER Can be used to specify the CUDA compiler
OCCA_CUDA_COMPILER_FLAGS Adds additional OpenCL flags when compiling kernels

occa's People

Contributors

dmed256 avatar lcw avatar tcew avatar pdhahn avatar reidatcheson avatar

Watchers

James Cloos avatar Damian 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.