Got the following error when training a MNIST model...it was working before.
('nvidia-smi error', 'Failed to initialize NVML: Driver/library version mismatch\n') 'NoneType' object has no attribute 'getitem' 2017-07-25 15:45:20,572 ERROR (MainThread-8045) 1: Failed to allocate GPU, trying again... ('nvidia-smi error', 'Failed to initialize NVML: Driver/library version mismatch\n') 'NoneType' object has no attribute 'getitem' 2017-07-25 15:45:30,590 ERROR (MainThread-8045) 1: Failed to allocate GPU, trying again... INFO:tensorflow:TensorBoard is in debug mode. INFO:tensorflow:Starting TensorBoard in directory /root/spark/work/app-20170725154449-0000/0 INFO:tensorflow:TensorBoard path_to_run is: {'/root/spark/work/app-20170725154449-0000/0/tensorboard_1': None} INFO:tensorflow:Event Multiplexer initializing. INFO:tensorflow:Event Multiplexer done initializing INFO:tensorflow:TensorBoard reload process beginning INFO:tensorflow:Starting AddRunsFromDirectory: /root/spark/work/app-20170725154449-0000/0/tensorboard_1 INFO:tensorflow:Done with AddRunsFromDirectory: /root/spark/work/app-20170725154449-0000/0/tensorboard_1 INFO:tensorflow:TensorBoard reload process: Reload the whole Multiplexer INFO:tensorflow:Beginning EventMultiplexer.Reload() INFO:tensorflow:Finished with EventMultiplexer.Reload() INFO:tensorflow:TensorBoard done reloading. Load took 0.001 secs INFO:tensorflow:TensorBoard is tag: 41
Did you update your CUDA driver and/or CuDNN libraries recently? The key log seems to be:
Failed to initialize NVML: Driver/library version mismatch
I didn't. I used the provided launch script. It worked last week. I was able to train mnist model and run the prediction just fine :( Any ami change ?
export AMI_IMAGE=ami-f6d25596
export EC2_REGION=us-west-2
export EC2_ZONE=us-west-2a
export SPARK_WORKER_INSTANCES=3
export EC2_INSTANCE_TYPE=p2.xlarge
export EC2_MAX_PRICE=0.8
${TFoS_HOME}/scripts/spark-ec2
--key-pair=${EC2_KEY} --identity-file=${EC2_PEM_FILE}
--region=${EC2_REGION} --zone=${EC2_ZONE}
--ebs-vol-size=50
--instance-type=${EC2_INSTANCE_TYPE}
--master-instance-type=${EC2_INSTANCE_TYPE}
--ami=${AMI_IMAGE} -s ${SPARK_WORKER_INSTANCES}
--spot-price ${EC2_MAX_PRICE}
--copy-aws-credentials
--hadoop-major-version=yarn --spark-version 1.6.0
--no-ganglia
--user-data ${TFoS_HOME}/scripts/ec2-cloud-config.txt
launch TFoSdemo
Hmmm, have you seen these? https://stackoverflow.com/questions/43022843/nvidia-nvml-driver-library-version-mismatch https://devtalk.nvidia.com/default/topic/1000667/failed-to-initialize-nvml-driver-library-version-mismatch/
let me try it and update you...thanks
Yes by restarting master and all slaves solves the issue. After launching the cluster, do a start cluster again will restart the master and all slaves. See below.
export AMI_IMAGE=ami-f6d25596
export EC2_REGION=us-west-2
export EC2_ZONE=us-west-2a
export SPARK_WORKER_INSTANCES=3
export EC2_INSTANCE_TYPE=g2.2xlarge
export EC2_MAX_PRICE=0.8
export EC2_KEY=
export EC2_PEM_FILE=
export TFoS_HOME=TensorFlowOnSpark
${TFoS_HOME}/scripts/spark-ec2
--key-pair=${EC2_KEY} --identity-file=${EC2_PEM_FILE}
--region=${EC2_REGION} --zone=${EC2_ZONE}
--ebs-vol-size=50
--instance-type=${EC2_INSTANCE_TYPE}
--master-instance-type=${EC2_INSTANCE_TYPE}
--ami=${AMI_IMAGE} -s ${SPARK_WORKER_INSTANCES}
--copy-aws-credentials
--hadoop-major-version=yarn --spark-version 1.6.0
--no-ganglia
--user-data ${TFoS_HOME}/scripts/ec2-cloud-config.txt
start TFoSdemo