Tool Installation

    • C++
      • Windows (Command line)
        • Download TDM-GCC and unzip it
        • open a command prompt and run mingwvars.bat from the folder
      • Windows (CodeBlocks)
      • Linux
        • g++ should already be on the command line
      • Mac
        • Install homebrew using /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
        • Install gcc using /usr/local/bin/brew install gcc
        • use g++-11 as the compile command
      • Test
        • Download openmp_confirm.cpp
        • Compile with g++ -o openmp_confirm openmp_confirm.cpp -fopenmp if using windows or linux
        • Compile with g++-11 -o openmp_confirm openmp_confirm.cpp -fopenmp if using mac
        • Run openmp_confirm
        • You should see:
          • hi from thread 0
          • hi from thread 1
      • Using Microsoft Visual Studio (2015 or later recommended)
        • Open a new empty project (console application). Empty project should not have precompiled header
        • Now, right click on the new opened solution(++ sign) in Solution Explorer
        • A property window will appear. Go to Configuration Properties -> C/C++ -> Language.
        • Now click Open MP Support -> select Yes (/openmp) from a dropdown box. You are all set at this point.
        • Test: Add openmp_confirm.cpp file as an existing item in to the Source Files directory (in Solution Explorer window).
        • Build and run the openmp_confirm.cpp file (Shortcut: Ctrl + F5)
        • You should see:
          • hi from thread 0
          • hi from thread 1
        • For the older VS (2013 or earlier) versions you might need to follow below instructions along with the instructions above.
        • Go to Build menu (top level) -> Configuration Manager.
        • In the Project contexts area box: set Configuration as Debug and Platform as Win32 from the dropdown boxes. You are all set now!

 

  • JDK 11
    • Windows
      • Download Adoptium Java 11. Make sure to pick the right architecture (probably x64) and choose the JDK .msi
        • Run the installer and make sure to enable “Set JAVA_HOME variable”
    • OSX
      • Prerequisite: homebrew (installation instructions under C++ section)
      • Open a terminal and type:
        • /usr/local/bin/brew install java11
    • Linux
      • Open a terminal and type:
        • sudo apt-get install openjdk-11-jdk
        • If you already have a different version of java installed, choose from alternative jdk version with: update-alternatives --config java
        • To verify installation, type:
          • javac -version
  • Pyjama
    • Prerequisite: Download and install JDK 11
    • Windows
      • Download and unzip Pyjama.zip
      • Open a command prompt
      • Navigate to Pyjama installation location and run: set_pyjama.bat
      • Test
        • Download PyjamaConfirm.java
        • Compile with java -jar %pyjama% PyjamaConfirm.java
        • Run with java -cp %pyjama%;. PyjamaConfirm
        • You should see:
          • hi from thread 0
          • hi from thread 1
    •  OSX/Linux
      • Download and unzip Pyjama.zip
        • Open a terminal, navigate to the Pyjama installation location and run: source set_pyjama.sh
      • Test
        • Download PyjamaConfirm.java
        • Compile with java -jar "$pyjama" PyjamaConfirm.java
        • Run with java -cp "$pyjama":. PyjamaConfirm
        • You should see:
          • hi from thread 0
          • hi from thread 1
  • OpenMPy
    • Prerequisites
      • Download and install JDK 11
      • Python 3
        • Windows
          • Download and install Python for your OS at https://www.python.org/downloads/
            • Make sure to check “Add Python 3.9 to path”
          • OSX
            • Python 3 – should be installed by default (to check, type: python3 –version)
            • If not installed, download the appropriate version for your OS at: https://www.python.org/downloads
            • Install pip by opening a terminal and typing:
              • sudo apt-get install pip
            • Linux
              • Python 3 – should be installed by default (to check, type: python3 –version)
              • If not installed, type:
                • sudo apt-get install python3
              • Install pip by opening a terminal and typing:
                • sudo apt-get install pip
              • To verify installation, type:
                • python --version
    •  Windows
      • Download and unzip OpenMPy.zip
      • Install the dependencies by navigating to the OpenMPy folder and running:
        • pip install -r requirements.txt
      • Open a command prompt
      • Navigate to your OpenMPy installation location and run: setpath.bat
    • OSX/Linux
      • Download and unzip OpenMPy.zip
      • Install the dependencies by navigating to the OpenMPy folder in a terminal and typing:
        • pip3 install -r requirements.txt
      • Navigate to the install location and run source setpath.sh
    • Test
      • Download openmpy_confirm.py
      • Run
        • jython openmpy_confirm.py
      • You should see:
        • Hello from thread: 0
        • Hello from thread: 1