force evaluation of vars memory_mb, num_cpus to be int fixes #7903

change if statements to evaluate memory_mb and num_cpus as an int.