Tool Installation

This page contains instructions for the installation of tools used in the IPDC workshop

Installation Instructions

C++ and OpenMP

Download and extract GCC from LINK NEEDED

Open a command prompt and navigate to the extracted folder

Run "mingvars.bat"

Download and extract GCC from LINK NEEDED

Start Code Blocks, to to Settings->Compiler

In the Settings Window, go to Compiler Settings

Under "Other compiler options" add "-fopenmp" into the textbox

Under "Linker settings" add "-lgomp" to "Other linker options" textbox.

Under "Toolchain Executables" change the following variables

  • "Compiler's installation directory" = &
  • "C compiler " = gcc.exe
  • "C++ compiler" = g++.exe
  • "Linker for dynamic libs" = g++.exe

If there are one or more existing projects, clean and rebuild the projects

Visual instructions can be found here(link missing)

Visual Studio 2015 or later recommended


For Visual Studio Version 2013 or eariler do the following steps first

  • Go to Build menu top level
  • Go to Project Contexts area Box
  • Set Configuration = Debug
  • Set Platform = Win32

Open a new empty project

Open the Solution Explorer, right click on new opened solution(++ sign)

In the popup menu, go to Configuration Properties

In the new window go to C/C++ -> Langauge

click Open MP Support-> select yes from the drop box

g++ should already be on the command line

The default gcc compiler included in MacOs does not support openMP. In order to work around this a secondary compiler is required

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 commpile command.



Download openmp_confirm.cpp

Compile the program

  • Windows or Linux: g++ -o openmp_confirm openmp_confirm.cpp
  • MacOx: g++11 -o openmp_confirm openmp_confirm.cpp
  • Visual Studio: Build Solution

run "openmp_confirm"

Output should be the following:

  • hi from thread 0
  • hi from thread 1

Java Development Kit 11 (JDK 11)

Go to the Adoptium Java 11 downloads page

Fill in the information for your computer architecture

Download the .msi

Run the .msi and enable "Set JAVA_HOME varible" in the install wizard

Install homebrew (see C++ on MacOs section)

open a terminal and run "/usr/local/bin/brew install javall"

Run "sudo apt-get install openjdk-11-jdk" in a terminal

If you already have a different version of java installed. run "update-alternatives --config java"



Verify installation with "javac -version"

Python 3

Download and install Python for your Os at https://www.python.org/downloads/

Check "Add Python 3.9 to path"

Should be installed by default (see Confirm Installation)

If not installed

  • Download appropriate version at https://www.python.org/downloads
  • Install pip by runing "sudo apt-get install pip" in a command terminal

Should be installed by default (see Confirm Installation)

If not installed

  • Install by running "sudo apt-get install python3"
  • Install pip by runing "sudo apt-get install pip" in a command terminal


Run "python --version" in a command terminal

Pyjama

Prerequisite: Java JDK 11

Download and unzip Pyjama.zip

Navigate a command terminal to the extracted folder.

  • For Windows run: "set_pyjama.bat"
  • For MacOs or Linux run: "source set_pyjama.sh"


Download and unzip PyjamaConfirm.java

  • If runing WINDOWS
  • Compile with java -jar "$pyjama" PyjamaConfirm.java
  • Run with java -cp "$pyjama":. PyjamaConfirm

  • If running MacOs or Linux
  • Compile with "java -jar %pyjama% PyjamaConfirm.java"
  • Run with "java -cp %pyjama%;. PyjamaConfirm"

You should see the following lines output (order does not matter):


  • hi from thread 0
  • hi from thread 1

OpenMPy

Prerequisite: Java JDK 11 and Python3

Download and unzip OpenMPy.zip

Navigate to extracted folder and open command prompt

Run "pip install -r requirements.txt"

Run "setpath.bat"

Download and unzip OpenMPy.zip

Navigate to extracted folder and open terminal

Run "pip3 install -r requirements.txt"

Run "source setpath.sh"



Download and extract openmpy_confirm.pyjama

Run "jython openmpy_confirm.py"

You should see the following output (Order doesn't matter)

  • Hello from thread: 0
  • Hello from thread: 1