Avoiding clumps in cacio e pepe?
Achieving a creamy sauce for cacio e pepe, and dishes like it (carbonara comes to mind) is not as straight forward as some would have you think. Fortunately, while we strive for the perfect emulsification, those attempts that don't exactly work are still delicious.  

Here are some tips:
(1) Make sure your cheese is grated as finely as possible, and that it is at room temperature or warmer.  A microplane is perfect. 

(2) The water you add can't be too hot.  Scoop some pasta water out halfway through the cooking process, allow it to cool, and use that to add later.  

(3) Drain pasta and allow to cool a minute before dressing. 

(4) Some find that combining pasta and cheese in a cool pan is better (so that you can control heating). 

(5) Some combine the water and the cheese, then add that mixture to the pasta.

(6) The addition of fat (butter, cream, oil) helps the cheese to emulsify, but this addition varies and is sometimes not included.  

It's all about practice and adjustment.  Much of this information came from here, and I can vouch for more success (sadly,not perfection) using these techniques.