-
July 11th, 2008 06:28 AM #1
how do I use the 'modules' tool with the Portland Compilers
Originally posted by: bill, Tue Apr 03, 2007 7:25 pm
Platform OCS contains the 'modules' tool which allows you to change environments easily from one MPI to another or one compiler to another....
Anhow.... here is how you add a modules file for the Portland Compilers in Platform OCS.
As root or use sudo use the modules file below (--- cut here --):
1- create a new directory in /share/apps called modulefiles.custom
2- Cut and paste the module file below, save it as portland and edit it so that the environment variables PG, PATH, LM_LICENSE_FILE and MANPATH are correct for your Portland Group compiler install (for example we installed it at /opt/pg )
3- symlink this module file to /opt/modules/modulefiles/hpc/portland
4- test it with the command:
$ module load hpc/portland
$ pgcc -V
That should be it.
Bill.
--- Cut Here ----
#%Module1.0####################################### ##############################
##
## portland compilers modulefile
##
proc ModulesHelp { } {
global version
puts stderr "\n\portland compilers module"
puts stderr "\t*********************************************** *****"
puts stderr "\n\t This module sets up the following environment"
puts stderr "\t variables for the portland compilers"
puts stderr "\t PGI"
puts stderr "\t PATH"
puts stderr "\t LM_LICENSE_FILE"
puts stderr "\t MANPATH"
puts stderr "\n\t Version $version\n"
puts stderr "\t*********************************************** *****\n"
}
module-whatis "Set up environment for the portland compilers"
# for Tcl script use only
set version "3.1.6"
# Make sure no other hpc modulefiles are loaded before loading this module
eval set [ array get env MODULESHOME ]
source $MODULESHOME/modulefiles/hpc/utils.tcl
isModuleInListLoaded $hpc_module_list
setenv PGI /opt/pgi
prepend-path PATH /opt/pgi/linux86-64/6.2/bin
setenv LM_LICENSE_FILE /opt/pgi/license.dat
prepend-path MANPATH /opt/pgi/linux86-64/6.2/man/
if [ module-info mode load ] {
ModulesHelp
}
--- Cut Here ---
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules