Yay, I should have given you way more information. I'd just gotten up when I wrote that so my brain probably wasn't on all the way.
This is on the three musketeers cluster. I'm using x10c++ to compile. That works fine.
I get the same error message for every program I run, so a simple "hello world" program will do fine.
To run I type
./a.out
I've also tried
srun ./a.out