I'm trying to compile and run a program remotely. However, I'd like to this within a screen and also I'd like to run this using grid engine on another node after I ssh. Currently I have:
ssh me@server screen -R session 'qlogin; cd path; mvn options program'
This basically works, but I get a message saying that I must be connected to a terminal. I read about this and added the -t option to ssh. With that, my command breaks: it seems like I ssh over, screen starts, then doesn't know about the "mvn" command and terminates my session.
I'm wondering why this is happening and how to correctly launch jobs from my local machine, within a screen, on a remote node while using grid engine.