Computational Research Center
Skip navigation

Shale User Paths

[ Shale User Instructions | Shale Submission Scripts | Shale User Paths ]

.bash_profile Document Setup

To setup your environment/compiler variables of your Shale user account to compile for MPI, edit your ".bash_profile" document located in your user home directory. You can use either vi, vim, or emacs to edit this file.

Environment/Compiler/PATH Variables

First add the additional lines to your PATH enviornment variable to include the standard libraries and APIs for compiling.

export PATH

GCC Compiler Variables

To setup the compiler variables for a GCC compile of an MPI program, add the following lines of to ".bash_profile".

For the C language set the CC environment variable.

export CC

For the C++ language set the CXX environment variable.

export CXX

For the C language parallel compiler set the MPICC environment variable.

export MPICC

For the C++ language parallel compiler set the MPIXX environment variable.

export MPICXX

PGI Compiler Variables

Alternatively, your environment/compiler variables can be setup to use the PGI compiler to build MPI applications. First you to add the standard PGI includes and libraries to your path.

export PATH

Then you will need to set the compiler variables for PGI.

export CC
export CXX

export MPICC
export MPICXX

CUDA Programs

The CUDA compiler is only available on the following nodes: node24, node25, node26, node27. Instructions on accessing these nodes are available on the Shale User Instructions page. However, you will still need to add the following to your environment variables.

export NVCC


Set Up Your Alias Commands

Now that you have your environment/compiler variables setup, add your compiler aliases to your ".bash_profile" document.

alias cc=$CC
alias cxx=$CXX
alias mpicc=$MPICC
alias mpixx=$MPICXX     <----- notice that there is no 'c' character in the alias.
alias nvcc=$NVCC

Once you are done editing the ".bash_profile" document, save it. Then logout, and then login once more. You should be ready to compile.