Tensorflow
Overview
TensorFlow is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them. The flexible architecture allows you to deploy computation to one or more CPUs or GPUs. Note that there are NO GPUs in the iCSF.
Version 1.8.0 (using python 3.5) and 1.12.0 (python 3.6) for CPUs only has been installed on the iCSF 256GB nodes only.
The GPU versions are not available – there are no GPUs in the iCSF.
Restrictions on use
There are no access restrictions on the iCSF.
Set up procedure
Ensure you are logged in to an incline256 node, by logging in to:
incline256.itservices.manchester.ac.uk
To check you are on a correct node, look at your command prompt:
[username@incline24 ~] # # Must be incline21 -- incline26
To access the software you must then load the following modulefile:
# Python 3.6 module load apps/gcc/tensorflow/1.12.0-py36-cpu # Python 3.5 module load apps/gcc/tensorflow/1.8.0-py35-cpu
The above modulefiles will load one of the following modulefiles automatically:
apps/binapps/anaconda3/5.0.1
(provides python 3.6.3)apps/binapps/anaconda3/4.2.0
(provides python 3.5.2)
Running the application
Simply run python
on the iCSF node you have logged in to. The Tensorflow library can be imported as with any other python library. For example:
python >>> import tensorflow as tf;
You will receive a warning about AVX FMA
. This can be safely ignored (although it does indicate we currently have a less optimized version of tensorflow installed).
Alternatively, create a python script (e.g., my-script.py
) as follows, which specifies how many cores to use:
import tensorflow as tf # Get number of cores reserved by the batch system (NSLOTS is automatically set) NUMCORES=6 print("Using", NUMCORES, "core(s)" ) # Create TF session using correct number of cores sess = tf.Session(config=tf.ConfigProto(inter_op_parallelism_threads=NUMCORES, intra_op_parallelism_threads=NUMCORES)) # Now create a TF graph a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a') b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b') c = tf.matmul(a, b) # Run the graph and print result print(sess.run(c))
To run the script:
python my-script.py
Further info
Updates
None.