| User Support & Documentation | ||||||||||||||||||||||||||||||||||||||||||||||||
Jobs: Managing the Software Environment (Using SoftEnv)On this page
Related linksNeed Help?IntroductionSoftEnv is a method for configuring TeraGrid users' software environments. It uses a "dot" configuration file, .soft, (similar to Unix shell startup configurations) to set the default login environment for executing predetermined software packages and versions of TeraGrid software. These configuration settings can be changed after logging in for temporary modifications to the runtime environment (see "Modifying Running Shell Environments" below). Users may never need to modify this file, but if needed, modification is very easy. The above mentioned configuration file, .soft, is located in the user's home directory. It uses SoftEnv Keys to determine the packages, aliases, and suites (collections of packages) available by default upon logging in to a TeraGrid resource. The .soft file can be located in the user's home directory, and can be modified as needed. Although many users have never needed to change their .soft file, modification of it is very simple. SoftEnv reads this file and expands the keywords into shell environment variables that enable access to software available on TeraGrid resources. All Coordinated TeraGrid Software and Services (CTSS) software is accessible via SoftEnv keys. There are three types of modifications to the SoftEnv environment:
SoftEnv keys are also used as arguments on the command line to interactively modify the environment after login (see below). You can also specify softenv keys when using WS GRAM to remotely submit jobs. See the WS GRAM documentation for details. Benefits of Using SoftEnvSoftEnv makes it possible for TeraGrid users and resource providers to have:
TeraGrid resource providers can use SoftEnv for non-TeraGrid software, and users. Resetting your .soft fileIn order to use CTSS software and services, you'll need your .soft file to contain the default TeraGrid settings. To make certain that your .soft file is set up to use CTSS, execute the following commands on each TeraGrid resource: cd ~ In some cases it may be necessary to logout and back in to completely replace the original CTSS configuration. CTSS default TeraGrid softwareThe default user CTSS software configuration includes the following suites and packages:
These suites contain packaged software as described below. CTSS global basic suite@teragrid-basic site defined operating system paths Globus Toolkit 4.0.1 and related grid tools suite@globus-4.0 Java 1.4.2 CTSS resource-specific development suiteAll TeraGrid resources define the following suite, with the same description and contents, as the preferred development suite for their platform. For many resources there may be only one compiler suite that is identical to @teragrid-dev. To modify the default @teragrid-dev suite, you must remove @teragrid-dev and replace it with the desired aliases. See Modifying your default login environment for more information. @teragrid-dev Vendor compiler If your .soft file includes the @teragrid suite, you must upgrade to the latest CTSS configuration. Follow the instructions in the Resetting your .soft file section above. Modifying your default login environmentThe set of SoftEnv keys and suites that a user wishes to have available on login default is stored in the .soft file in the user's home directory. The .soft file works like traditional Unix "dot" files (e.g. .cshrc, .bashrc), and is similarly editable. By default, the .soft file includes macros for the most common software packages. The soft-dbq command displays the components of a SoftEnv key or macro (e.g. soft-dbq @teragrid-dev), while the softenv command displays a list of all defined keys and macros. Condor/Condor-G users note: you can access Condor-G by adding +condor-g and +tgproxy to your .soft file, or by interactively executing " soft add +condor-g" and "soft add +tgproxy". See instructions below. Failing to add +tgproxy will generate the following error in your Condor-G log file: Job was held. Failed to get expiration time of proxy. Users can search for all CTSS SoftEnv keys at Find CTSS Resources by Software/Services. Users can edit the .soft file directly to add other packages and libraries, such as HDF4, HDF5, PETSc, Java, MKL and goto libraries. For example: % cat .soft Custom environment variablesAliases defined in .profile and the usual "." files are generally not affected by SoftEnv. Such files are shell specific, while SoftEnv keys apply to all shells. SoftEnv defines some of its own aliases, but aliases defined elsewhere remain in effect in the absence of conflicts. It is also possible to define environment variables by adding them to the .soft file: VARIABLE=VALUE or VARIABLE+=VALUE For example, to set the shell prompt, add this command to the .soft file: PS1='\u@\h:\w\$ ' or, to append to the current path: PATH+=$HOME/myapps/bin Modifying running shell environmentsSometimes it is not necessary to permanently alter your environment. If you only need to access a package during a single session, you can temporarily add or remove a package to the current shell environment (lasts as long as the session): % soft add +gridshell % soft add +condor-g The command soft add <package_name> adds packages to the beginning of your environment path. If you wish to add a package variable to the end of your environment path, use the following command: % soft append +gridshell The distinction between adding and appending applies to cumulative environment variables only. For example, the interactive command soft add <some key> prepends a package in cumulative variables like PATH, MANPATH, etc. while soft append <some key> appends to cumulative variables. See the CTSS documentation to search for the softenv keys of all available CTSS software and services on the TeraGrid. SoftEnv aliases and querying the local databasePackages and aliases not in the default environment can be added to your environment by editing your .soft file. To see a list of available software at your site, search the local SoftEnv database with the command soft-dbq grep <package_name>. Example: SoftEnv aliases refer to the following packages:
Development suites by siteif you want to use the default development suite, use @teragrid-dev. if you prefer a different suite at your site, remove @teragrid-dev and replace it with the suite you wish to use. ORNL
PSC
Purdue
SDSC
TACC
UC/ANL
Maintaining multiple custom software environmentsIf you wish to have multiple custom environments you can have multiple .soft files. To change your environment, copy your current .soft file: cp .soft .soft1 Edit your .soft file via the modifying your default environment section described above. Enter the command resoft when you are finished; this will cause the shell to reread the .soft file. You can have as many different .soft files as you need for your project. Popular SoftEnv CommandsHere are some examples of useful SoftEnv commands: soft delete @teragrid-dev Scripting SoftEnv using Dynamic Environment ChangeWhen calling a new shell from a script, previous soft add and soft delete changes are not available to the new shell. The Dynamic Environment Change command dec can be used to invoke a SoftEnv alias and apply the needed changes to the new shell. This feature uses soft as an alias, getting the operation and keyword from the command line, thus: soft {add|delete} <keyword>. These arguments are passed to dec, which converts the request into environment settings for the new shell. The result is sent back to the alias, which executes the code within an eval statement, changing the user's environment. It's like a resoft on the keyword and the current environment. The following example demonstrates this feature using the GridShell package: %soft dec +gridshell |
||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
|
The TeraGrid project is funded by the National Science Foundation
and includes 11 partners: Please email help@teragrid.org with questions or comments. This site is XHTML 1.0 Transitional, CSS compliant. |
||
![]() |
![]() |