Using environment modules: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<-- this is only preliminary text; this article needs more work --> === Example === Consider this simple python3 script that should calculate Pi to 1 million digits: <source ...") |
No edit summary |
||
Line 17: | Line 17: | ||
In the list you should note that python3 is indeed available to be loaded, which then can be loaded with the following command: | In the list you should note that python3 is indeed available to be loaded, which then can be loaded with the following command: | ||
module load python/3.3.3 | module load python/3.3.3 | ||
== See also == | |||
* [[B4F_cluster | B4F Cluster]] | |||
* [[Lx6_and_Lx7_compute_nodes | Lx6 and Lx7 compute nodes]] | |||
* [[Environment_Modules | Environment Modules]] | |||
* [[Control_R_environment_using_modules | Control R environment using modules]] | |||
* [[Create_shortcut_log-in_command | Create a shortcut for the ssh log-in command]] | |||
* [[Installing_R_packages_locally | Installing R packages locally]] | |||
== External links == | |||
* http://modules.sourceforge.net | |||
* http://www.admin-magazine.com/HPC/Articles/Environment-Modules |
Revision as of 00:35, 11 December 2013
<-- this is only preliminary text; this article needs more work -->
Example
Consider this simple python3 script that should calculate Pi to 1 million digits: <source lang='python'> from decimal import * D=Decimal getcontext().prec=10000000 p=sum(D(1)/16**k*(D(4)/(8*k+1)-D(2)/(8*k+4)-D(1)/(8*k+5)-D(1)/(8*k+6))for k in range(411)) print(str(p)[:10000002]) </source>
Loading modules
In order for this script to run, the first thing that is needed is that Python3, which is not the default Python version on the cluster, is load into your environment. Availability of (different versions of) software can be checked by the following command:
module avail
In the list you should note that python3 is indeed available to be loaded, which then can be loaded with the following command:
module load python/3.3.3
See also
- B4F Cluster
- Lx6 and Lx7 compute nodes
- Environment Modules
- Control R environment using modules
- Create a shortcut for the ssh log-in command
- Installing R packages locally