Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

GCP Batch compute resource bug

Hi, there seems to be some bug in how GCP Batch sanity checks if the specified machine-type can satisfy the compute resource requirement. I got the following error message:

"message": "machine_type field is invalid. machine_type \"e2-highcpu-16\" cannot satisfy compute_resource cpu_milli:16000 memory_mib:16384",
But e2-highcpu-16 should have exactly 16000 cpu_milli and 16384 memory_mib.
3 REPLIES 3

Hi @gradientopt,

Thanks for the finding and feedback! In the meantime while Batch is investigating this, I think you can temporary bypass this without using the `memory_mib` field. You don't have to specify the `compute_resource` field if you already explicitly filled in the `machine_type` field.

Thanks!

 

But if I did not specify the compute_resource field, Batch would assume a default value for that, which may cause undesired number of runnables on a single machine?

If you are concerned about the multiple tasks for a job and how the tasks are assigned to the VMs,  you can refer more on using `parallelism`,  `taskCountPerNode` fields under TaskGroup: 

https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#taskgroup. Those fields can help you arrange the task assignments to the VMs while we are dealing with the issue.
 
For the runnables, Batch runs each task's runnables under the same VM.
 
BTW, we already take your feedback and if everything goes smoothly, you should be able to see the fix after around 2 weeks!
 
Thanks!