added mpi stack autodetection; split check_cpu_binding() into a separate subroutine that can run independently of whether or not the nodefile needs to be hacked