Legion 1.8

Basic User Manual

The Legion Group

Department of Computer Science

School of Engineering & Applied Science

University of Virginia

151 Engineer's Way, P.O. Box 400740

Charlottesville, VA 22904-4740

legion@virginia.edu

http://legion.virginia.edu/

Before you start

1.0 Introduction 7
1.1 About this manual 7
1.2 Style conventions 8
1.3 About Legion 8

Getting started

2.0 Setting up and logging in 9
2.1 Preparing your Legion environment 9
2.2 Logging in 9
2.2.1 Logging in as a user 10
2.2.2 Changing your password 10
2.2.3 About object permissions 11
2.2.4 Checking your log in status 11
2.2.5 Logging out 11
2.2.6 Using Legion in a Kerberos environment 12
2.3 Changing your profile 12

Context space

3.0 An introduction to context space 14 4.0 Context space 17
4.1 Legion object names 17
4.2 About the LOID 17
4.3 Organizing context space 18
5.0 Working in context space 20
5.1 Viewing contexts 21
5.1.1 Read a context's contents 21
5.1.2 Look up LOIDs 22
5.1.3 Create a new context 22
5.1.4 Change your current context 22
5.1.5 Check your current context 23
5.2 Naming objects 23
5.2.1 Assign a context name to a LOID 23
5.2.2 Give an object extra context names 23
5.2.3 Change an object's context path 24
5.2.4 List context names 24
5.2.5 Remove names and objects 25
5.2.6 Remove names and objects 26
5.2.7 Use the same name in different contexts 26
5.3 Moving between local files and contexts 26
5.3.1 Copying 26
  • Copy a local file to Legion 26
  • Copy from Legion to a local file 27
  • Copy from Legion to another Legion file object 27
  • Using wildcards when copying 27
  • 5.3.2 Look at a file object's contents 27
    5.3.3 Import a local Unix tree 28
    5.3.4 File sharing: temporarily link files to Legion 28
    6.0 Host and vault objects 30
    6.1 Host/vault versus host/vault object 30
    6.2 About the bootstrap host/vault 31
    6.3 Creating objects on new hosts 31
    6.4 Look up an object' s host 32
    6.5 Instance placement on hosts and vaults 32
    6.6 Backup vaults 32
    6.6.1 WORM objects 33
    6.6.2 Assigning and synchronizing backup vaults 33
    6.6.3 Using replication 34

    Running applications

    7.0 Running a Legion application 35 8.0 Executing programs remotely 36
    8.1 Linked and independent programs 36
    8.2 Registering independent programs 36
    8.2.1 Independent programs 36
    8.2.2 Legion-linked programs 37
    8.3 Running a program remotely 38
    8.3.1 Choosing a remote host 39
    8.3.2 Command-line arguments 39
    8.3.3 Getting input files to the remote host 39
  • Before the program starts 39
  • After the program has started 40
  • 8.3.4 Getting output files from the remote host 40
  • Before the program starts 40
  • After the program has started 40
  • 8.3.5 Option file 41
    8.3.6 Creating and using a probe file 41
    8.3.7 Blocking vs. nonblocking 41
    8.3.8 About legion_probe_run 43
    8.3.9 Context scratch space 45
    8.3.10 Retrieving files from context scratch space 45
    8.4 Example 45
    8.5 Converting a C/C++ program 47
    9.0 PVM 48
    9.1 Core PVM interface 48
    9.2 Tids & LOIDs 48
    9.3 Task classes 49
    9.3.1 Legion-PVM library 49
    9.4 Compilation 49
    9.5 Registering compiled tasks 50
    9.6 Examples 50
    9.7 Running PVM code with the fewest changes 51
    10.0 MPI 52
    10.1 Legion MPI 52
    10.1.1 Task classes 52
    10.1.2 Legion MPI libraries 52
    10.1.3 Compilation 52
    10.1.4 Register compiled tasks 53
    10.1.5 Running the MPI application 54
    10.1.6 Example 55
    10.1.7 Input and output files 56
  • Input and output flags 57
  • Subroutines 58
  • 10.1.8 Scheduling MPI processes 58
    10.1.9 Debugging support 60
    10.1.10 Checkpointing support 61
  • Example 61
  • API (C & Fortran) 63
  • Running the above example 63
  • Recovering from failure 64
  • Restarting application 64
  • Compiling/makefile 65
  • Limitations 65
  • 10.1.11 Functions supported 65
    10.1.12 Running a Legion MPI code with the fewest changes 65
    10.2 Native MPI 66
    10.2.1 Task classes 66
    10.2.2 Compilation 66
    10.2.3 Register compiled tasks 67
    10.2.4 Running a native MPI application 67
    10.2.5 Making Legion calls from native MPI programs 68
    10.2.6 Example 69
    10.2.7 Scheduling native MPI processes 69
    11.0 Replaying & debugging applications 70
    11.1 Sample record and replay 70

    Appendices

    A-1 Sample makefile 73 A-2 About Legion tty objects 75
    A-2.1 Simple tty management 75
    A-2.2 Complex tty management 76
    A-3 Alphabetical list of Legion commands 78 A-4 Subject listing of Legion commands 93
    A-4.1 Calls on objects 93
    A-4.2 Calls on class objects 94
    A-4.3 Calls on LegionClass 96
    A-4.4 Calls on file and context objects 96
    A-4.5 Start-up and shutdown functions 99
    A-4.6 Scheduling support 100
    A-4.7 General functions about the state of the system 102
    A-4.8 Security 103
    A-4.9 Application development 105
    A-4.10 Program support 106

    Getting help 109

    References 110

    Index 112

    Before you start

    Getting started

    Context space

    Running applications

    Appendices

    Getting help

    References

    Index