The code that is commented below works on Kilkenny, but not on BG/Q. Therefore, I had to do an older implementation without the c_ptr and stuff. Once it works on their end I can uncomment this. It's just left here for the future.