Difference between revisions of "HowTo:Migrate"
(→Setting up a shell)
|Line 26:||Line 26:|
to the above setup files, if you want to use the Python 3 distribution "Anaconda" (as an example). Note that this is
to the above setup files, if you want to use the Python 3 distribution "Anaconda" (as an example). Note that this is same as it was on Solaris, but that the available packages may differ. For a list, use the
Revision as of 14:57, 15 September 2016
Migrating from Sparc/Solaris to x86/Linux
This is an introduction to setting up your account on our systems. When first logging in, you are presented with a default set-up that enables the use of basic system commands, simple compilers, and access to the scheduler. This help file is meant to explain how to modify that default.
The login node for the Linux nodes is swlogin1. It may be accessed in two different ways:
For people used to work on sflogin0, this iomplies an additional "node hop" to swlogin1.
There are several set-up files in your home directory:
Most of the setup is automatic through usepackage. On login, you have a default setup that is appropriate for a Linux system. Additional packages can be set up by adding commands such as
to the above setup files, if you want to use the Python 3 distribution "Anaconda" (as an example). Note that this is the same as it was on Solaris, but that the available packages may differ. For a list, use the
usepackage and the use commandMost set-ups involve the setting of environment variables. These are variables that are used by your shell to determine its desired behaviour. Other set-up operations may include the execution of scripts. To simplify this task, our system supplies the use command. Instead of setting each variable and execute each script separately, everything is "lumped in" to the command
use package_namewhere "package_name" stands for an application or functionality that you want to include. A list of possible package_names can be obtained by typing
Here is an example: To be able to use the electronic-structure software Gaussian, you need to execute ("source in") a lengthy set-up script, and set a few environment variable, e.g. to tell the system where to place temporary files:
export g09root = "/opt/gaussian/g09e1" . /opt/gaussian/g09e1/g09/bsd/g09.profile export GAUSS_SCRDIR = "/scratch/$LOGNAME"These commands can be replaced by
use g09and the above commands are stored in a file
/opt/usepackage/etc/usepackage.confThe use command also works inside of your login set-up file, i.e. .bash_profile, so you won't have to retype it every time you log in. By default, users are supplied with a basic set-up that corresponds to
use standard-user-settingsand includes access to most system functions, scheduler, and some compilers. Note: New shells do not always know about the use command. In that case you either have to set up that shell "manually", or teach it about use. This can be done with a single line:
Note that it is rarely necessary to make invoked shells aware of use, as they inherit the setup of the invoking (login) shell.
You can of course apply settings directly without using "use".
One of the most important environment variables is PATH, which tells the system where to look for the commands you issue. You may want to make your shell aware of some directories with system commands and shell commands in them.
Another environment variable that is often useful is MANPATH. This is for the Unix manual pages, and tells the system where to look for online-documentation.
Yet another one is LD_LIBRARY_PATH, which is sometimes used by applications to find dynamic runtime libraries. If you experience problems with missing libraries, try playing with LD_LIBRARY_PATH, otherwise it's best left unset.
The command to set an EV is the binary operator '='. This is often followed by the export command, which makes the variable part of the environment:
VARIABLE=VALUE export VARIABLENote that it is possible to place "export" in front of the variable assignment instead of issuing two separate commands:
export VARIABLE=VALUETo access the value of a environment variable, place a "$" in front of it. For example you want to see which value your variable PATH has, type
echo $PATHwhere "echo" is a standard Unix command, and "$PATH" returns the value of PATH. The following command will append something to a previously defined variable:
Here, "PATH" is the variable and "$PATH" is its present value.
Sometimes a variable needs to be reset for a specific application. It is then best to write a shell script that sets the variables and starts the application, rather than setting the variables globally in your start-up files. In this example:
The variable OMP_NUM_THREADS (which determines how many threads are being used) is set only for this specific run of the multi-threaded program omp_program.
You can consult the configuration files of "usepackage" /opt/usepackage/etc/usepackage.conf to find out which setting you need to apply to run a specific software or access certain features. The syntax in that file is not hard to read, for instance the entry
>> g09 : "Gaussian 09 Update E.01" << g09 : g09root = "/opt/gaussian/g09e1", <[ . /opt/gaussian/g09e1/g09/bsd/g09.profile ]>, GAUSS_SCRDIR = "/scratch/$LOGNAME";
is responsible for the settings in the "Gaussian" example in the previous section.
Running pre-installed software
A lot of software is pre-installed on our clusters. Some of this software requires specific license agreements, other programs are freely accessible. With the use command, most of them can be set up with a single line such as "use fluent" in your shell's start-up file. If the software you want to run is not included in our usepackage list, please contact us, and we can include it. If you are using very specific software that is not accessed by other users, you might have to do the setup manually.
Here is a few steps to follow in that case.
How do I run parallel code ?
That depends on how the code is "parallelized":
You can learn more about parallel code by having a look at our Parallel Programming FAQ. We also have a bit more specific information about parallel programming tools, namely OpenMP compiler directives and the Message Passing Interface (MPI).
If you have questions that you can't resolve by checking documentation, email to firstname.lastname@example.org.