DTU
AAU
·  DCAMM HOME

Access to the computer systems

Table of contents The computers used for the lab exercises are the Sun computers at DTU. They can be accessed from the Sun Ray terminals in the lecture room, or remotely with the ThinLinc client.

We recommend that you use the IceWM environment, unless you are familiar with the other environments available. A general introduction to the DTU computer system can be found on-line.

If you want to use your laptop computer: There is wireless network available in the lecture room (SSID: DTU Wireless), and you have to authenticate before you can connect to any service. Open a browser and log in on the webpage that shows up.

Setting up your account

To get the right setup of the UNIX environment for this course, please add the following line to the ~/.grouprc in your HOME-directory:
/appl/htools
To activate the changes, you must log out and log in again. You can check if the setup was succesful by opening a terminal window and running the command: f95 -V. The output should look like this:
f95: Sun Fortran 95 8.3 SunOS_sparc Patch 127000-0...
This is the Fortran 95 compiler of the Sun Studio 12 development tools. Sun Studio comes with an Integrated Development Environment (IDE), that can be started with the sunstudio command from a terminal window.

Compiling MPI programs

There a special compiler commands (wrapper scripts) to compile MPI code: mpcc, mpCC, mpf90 and mpf77. Those scripts setup the compile environment for MPI codes, i.e. include path, path to the MPI libraries, etc. However, you will need to add the MPI library when linking your MPI program, e.g.
    mpf90 -o mympiprog src1.o src2.o -lmpi
To run the program, you have to use the mprun command, i.e.
    mprun -np 4 mympiprog
will run the program on 4 CPUs.

Useful commands

Check the load

To get information about the load and the capacity of the machine(s) you are using, you can compare the load of the machine

    uptime
with the number of CPUs available
    cpucount

Example:

erlang(fmpi10): uptime
4:53pm  up 6 day(s), 20:24, 11 users, load average: 6.40, 6.40, 6.38
    
erlang(fmpi10): cpucount 
48
This shows that the machine in question has 48 active CPUs, and the load is about 6, i.e. there are 42 ``free'' CPUs available.

MPI job status and control

To stop your MPI process, you have to use a special kill command for MPI:

    mpkill jid
where the jid is the MPI job id. This identifier can be found with the
    mpps
command.

Example:

erlang(fmpi10): mpps
JOBNAME  NPROC UID    STATE AOUT
cre.3033 8     fmpi10 RUN   sleep

erlang(fmpi10): mpkill cre.3033

Using the Sun Performance Analyzer with MPI

To use the Sun Studio Performance Analyzer on MPI programs, you should do the following:
  • Compile your code with the -g compiler option (if you want to see compiler commentary). C++ programmers: You have to use -g0!
  • Using the analysis tools is a two step process:
    1. Collect data:
           mprun -np 4 collect -m on -g run1.erg ./a.out [options]
           
      This generates an experiment group with the name run1.erg. The option -m on switches MPI profiling on.
    2. Run the analyzer on the collected data:
           analyzer run1.erg
           
      This will open the analyzer and load all the data sets belonging to the experiment group run1.erg.
  • Please remember to remove the experiment data after the analysis, since those files can easily fill up your disk quota. The command for that is
         er_rm run1.erg
         

Printing

There is a printer in the lecture room and its name is gps1-321. For more information how to print from the Sun computers, see the Printing Guide. Please note: We use a special program called xpp to submit print jobs. The standard UNIX commands might not always work!

Fortran and MPI

Course material:

·  Description
·  Participants
·  Teachers
·  Agenda
·  Registration
·  Material
·  Organizers

·  Brochure (PDF)

All material on this page and subpages are copyright © DCAMM