Initial Setup (flory): Difference between revisions

From HPC Wiki
Jump to:navigation Jump to:search
No edit summary
Line 21: Line 21:
{{Cmd|source {{HPC-Base-Dir}}/bin/selector-mpi -o|output=<pre>Set MPI to Open MPI with GNU compiler.</pre>}}
{{Cmd|source {{HPC-Base-Dir}}/bin/selector-mpi -o|output=<pre>Set MPI to Open MPI with GNU compiler.</pre>}}


{{Note|The settings for far affect only the currently running shell and will be lost when logging back in at a later date. To [[#Make Changes Persistent|make changes persistent]] across logins, see the next section.}}
{{Note|The settings so far affect only the currently running shell and will be lost when logging back in at a later date. To [[#Make Changes Persistent|make changes persistent]] across logins, see the next section.}}


== Make Changes Persistent ==
== Make Changes Persistent ==

Revision as of 17:08, 14 December 2016

In High-Performance computing (HPC) there are several compiler and message passing systems for users to choose. Selecting a combination of compiler and message passing systems for a particular computational job is an involved process that depends upon the intricacies of the calculation and the specifications of the HPC system. This initial setup tutorial will guide the user in setting up a new account to use the most common combination of compiler and message passing system: GNU Compiler Collection, and Open MPI.

Set Defaults

Most of the scripts and programs are located in the

{{HPC-Base-Dir}}
Parameter unnamed not defined. For correct usage see template's documention.

path and it's sub-directories. For the curious, to see what is currently in

{{HPC-Base-Dir}}
Parameter unnamed not defined. For correct usage see template's documention.
/bin

, use the Template:Code command. You should see something like this:

user $ls
{{HPC-Base-Dir}}
Parameter unnamed not defined. For correct usage see template's documention.
/bin
lmp-config  pw.x-config  selector-compiler  selector-mpi

The Template:Code and Template:Code scripts will be used for setting up a new account.

GNU Compiler Collection

To setup the GNU Compiler Collection for the currently running environment:

user $source
{{HPC-Base-Dir}}
Parameter unnamed not defined. For correct usage see template's documention.
/bin/selector-compiler -g
Setup GNU compiler and libraries.

Open MPI

To setup Open MPI that has been compiled with the GNU compiler for the currently running environment:

user $source
{{HPC-Base-Dir}}
Parameter unnamed not defined. For correct usage see template's documention.
/bin/selector-mpi -o
Set MPI to Open MPI with GNU compiler.
Note
The settings so far affect only the currently running shell and will be lost when logging back in at a later date. To make changes persistent across logins, see the next section.

Make Changes Persistent

To make the compiler and message passing system settings persistent across logins we need to edit the .bashrc file in the home directory. The directions below will be for using the Template:Code editor, but you are free to use whatever text editor you are most comfortable with.

Use the following to start editing the file:

user $nano -w ${HOME}/.bashrc

If this is your first time editing the .bashrc file, it should look something like this:

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

# User specific aliases and functions

We need to add the two commands we typed earlier (here and here) to the bottom of this file. It should look like this:

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

# User specific aliases and functions
source /home/bgo/shared/bin/selector-compiler -g -q
source /home/bgo/shared/bin/selector-mpi -o -q

You'll notice that the two commands are slightly different that what we used before; they both have a -q added. The -q tells the commands to be 'quiet' and not show any output. You can omit the -q from each command if you'd like to be reminded of what compiler and message passing system is set during each login.

To save the changes, use Ctrl+O, then hit Enter to accept the file name. Use Ctrl+X to exit Template:Code.

Now every time you login, the GNU compiler and Open MPI compiled with the GNU compiler will be the default.