My latest DRMAA-based C application failed silently on a SGE 6 installation. Even with STRACE, it was not possible to figure out why the application stucked already in the drmaa_init(). I found here the relevant trick to get some useful output:
Source a magic debugging script (source sge-root/util/dl.csh) and use the new command dl 1 to enable some SGE debugging output on console.
I also experienced that DRMAA functions do not trigger a flushing of STDOUT. If you do some printf of the last error buffer and continue with the next DRMAA function call, you might see nothing. You should therefore use some kind of flushing debugging macro, or state setlinebuf(stdout) at the beginning of your program.