Tensorflow script to run on single core



I am running my tensorflow script on the cluster and it gets aborted with the message that I am using 6 cores when my job requested only 1. But I do not have any parallelization in my code. I use standard tensorflow functions and everything runs fine on my local machine. How do I fix this issue on the cluster?

Curator: Katia


TensorFlow does indeed use multiple CPU cores by default and all cores are wrapped in cpu:0. Following has an example to run TensorFlow on a single core.


From my experience, you still need to request 2 CPU cores when you set intra_op_parallelism_threads=1 and inter_op_parallelism_threads=1. It looks like with this setup there is still a master python script that uses 1 core and then the tf.Session() will use another one.