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 tda384

Note that

  1. the old course code TDA384 is used here;
  2. you should only do this for the Trainspotting lab.

You are strongly encouraged to test your lab solutions on a multi-processor or multi-core machine, for example the remotely accessible machines provided by Chalmers.

Using the Eclipse IDE on the lab computers

Eclipse should be installed on all StuDAT-linux workstations. To start it, open a terminal window and run the following command

eclipse &

Accessing lab computers remotely

You can connect to lab computers remotely using remote desktop. Chalmers-wide instructions are available here.

On Windows, “Remote Desktop Connection” is a standard windows application. On Mac, “Microsoft Remote Desktop” is available for free from the app store.

Notice that most Linux machines available to connect to are multi-core machines with CPUs of 4 cores. This should be appropriate for testing your solutions. The command “cat /proc/cpuinfo” gives the definite information. If (against expectations) a different kind of machine has been allocated, you should retry the connection to get another computer.

We strongly recommend to connect remotely to lab computers as explained above. It may be possible to work locally on your own machine and we include some instructions that could help with that. We are not aware of simple solutions for running lab 1 locally on a Windows machine.

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, as 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-0.84 && ./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"

If you have an M1 chip or above - the command in the instructions for Macs won’t work. Try this instead:

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

If you are having problems getting XQuartz to start the first time you are trying to start tsim, it might help logging out and in, or even rebooting your computer.

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

Another exception is Mac (using brew):

brew install erlang
Menu