Computing resources

Using the lab computers

To run course-related tools and packages (for example the simulator tsim) on a laboratory computer, execute the following command in a shell prompt:

setup_course tda381

Note that the old course code TDA381 is used here.

You are strongly encouraged to test your lab solutions on a multi-processor or multi-core machine, for example remote11.chalmers.se or remote12.chalmers.se.

Java concurrency on Windows computers

Although it is a little complicated, it is possible to run the tools needed for the Java exercises and labs used in the course on computers running Windows. You can do that using Cygwin — a set of tools which runs Unix utilities and libraries on Windows machine.

Installing Cygwin

Using the lab computers from remote

In this section we are going to describe how to run the course tools from a server on Chalmers but having the windows displayed on your local Windows computer (using Cygwin).

bash emacs Lab1.java

A window should appear on your screen running the Emacs editor. Running the train simulator is as simple as writing:

bash tsim bana &

Java concurrency on local Unix machines

If you have a Unix-like operating system (GNU/Linux or macOS) on your computer, you can run all the software for labs 1 and 2 locally.

Start by downloading the tsim simulator source code and unpack it (e.g., tar -xzf tsim-0.84.tgz).

Tip: If you do not want to contaminate your file system you could pass --prefix=$PWD/world or something similar to ./configure, then everything will end up in $PWD/world and no root privileges are needed to install the simulator. But make sure to add the bin folder to your $PATH afterwards.

Linux

Install the development libraries for the simulator’s dependencies: Xaw, Xt, Xmu, X11, and Xext.

Build and install: cd tsim && ./configure && make && sudo make install && cd ..

Mac

Install brew, and then run brew cask install xquartz and brew install argp-standalone.

After this step the installation is the same as for Linux, except that you need to pass a few extra flags to ./configure:

./configure LIBS="-largp" CPPFLAGS="-I/opt/X11/include -I/usr/local/include" \
LDFLAGS="-L/opt/X11/lib -L/usr/local/lib"

When starting tsim, make sure that XQuartz is running and $DISPLAY has a reasonable value in the shell you are starting the simulator from (e.g. see echo $DISPLAY in any XQuartz xterm terminal).

Erlang

To download Erlang/OTP, go to this webpage and choose the version to install depending on your operating system.

Some operating systems have packages for Erlang, but they often have no support for the GUI libraries that you will need for the labs. Therefore, we recommend you to use the link given above and fetch the right package to install.

An exception are recent (from 14.04 LTS) 64-bit versions Ubuntu, which package Erlang/OTP in a way that is suitable for the labs. To use it, install packges libwxbase2.8-0, libwxgtk2.8-dev, libqt4-opengl-dev, and libgtk2.0-dev. You can install them, together with Erlang/OTP, by running:

apt-get install libwxbase2.8-0 libwxgtk2.8-dev libqt4-opengl-dev libgtk2.0-dev erlang

If you are annoyed by all the PROGRESS REPORT messages every time you start up Erlang, try the following:

erl -sasl sasl_error_logger false
Menu