Explicitly label isinf and isnan with std:: namespace identifier.
add explicit openMP flags, because my Mac didn't define them.