The Environment Modules utility allows dynamic modification of a user environment (shell environment variables such as PATH, LD_LIBRARY_PATH, etc). The Environment Module utility works with a set of system or user configure "modulefiles" which specify the necessary environment settings necessary to use a particular development tool or toolset, such as Intel® Parallel Studio XE. More information on the Environment Utility and modulefiles can be found here http://modules.sourceforge.net/
Each modulefile contains the information needed to configure the shell environment for a specific version of a development tool or toolset. Once the Modules utility has a modulefile configured for a particular tool, typically by the system administrator, the system user's environment can be modified using the 'module' command which interprets modulefiles. Typically modulefiles instruct the module command to alter or set shell environment variables such as PATH, MANPATH, etc. modulefiles may be shared by many users on a system and users may have their own collection to supplement or replace the shared modulefiles. This utility and collection of modulefiles allows users to test code with different versions of the tools such as compilers quickly and easily.
Environment modules give you control over your environment by keeping track of what variables are changed giving you the ability to remove those same entries, preventing variable bloat.
Linux* and OS X*
First, install the Intel Development Tools on your system or cluster. Note that the Intel Development Tools ( Parallel Studio XE, Cluster Edition, Composer Edition, etc) do NOT come packaged with modulefiles. Instead the bash or tcsh/csh script files, named '*vars.sh' or '*vars.csh' (VARS scripts) are installed to the installation 'bin' directory (directories). To use the tools, first of all set up the environment using the 'source' command. i.e.
source [install-dir]composer_xe_2015.x.yyy/bin/ifortvars.sh intel64
There are two ways you can create modulefiles, the obvious way is by hand, using the provided script files *vars.[sh | csh] as reference. DO NOT DO IT THIS WAY, the VARS script files usually call a series of other dependent scripts. Also some scripts take arguments, such as the 'compilervars.sh' scripts, while others do not. Unraveling this nest of scripts is nearly impossible and error prone.
Alternatively you can use a utility '
env2' to automate the process. The '
env2' utility executes a script, capturing the changes it makes to the environment, and echoes those env vars and settings in a format suitable for a modulefile. This output can be captured to create your module file. in order to get the correct information you will need to redirect the output from stdout to a file.
env2' utility can be found at http://env2.sourceforge.net/
echo "#%Module" > my_module_file
perl env2 -from bash -to modulecmd "[install-dir]/parallel_studio_xe_201m.0.nnn/psxevars.sh <intel64|ia-32>" >> my_module_file
module' instructions to use the compiler tools through module file.
Note:You can find more information about Environment modules here http://modules.sourceforge.net/
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804