Operating System - Linux
1827871 Members
1366 Online
109969 Solutions
New Discussion

wait input---submit interactive job by slurm and lsf

 
proteinx
Occasional Contributor

wait input---submit interactive job by slurm and lsf


Hi, Dear all:
I am new system admin of HP cluster which is running lsf over slurm.
I am following the example script to submit the interactive job by this

bsub -I -n1 -ext "SLURM[nodelist=n[14]]" srun ./hostname

there is no problem at all. But when I run another program which need user's input on the screen, it never comes up and system wait like the following:

Job <271851> is submitted to default queue .
<>
<>

the program contains the following:

/**********************************

printf("Enter a line of text (<80 chars)\n");
ch = getchar();
char_count = 0;
while( (ch != '\n') && (char_count < MAXBUFFERSIZE)) {
buffer[char_count++] = ch;
ch = getchar();
}
buffer[char_count] = 0x00; /* null terminate buffer */
printf("\nThe line you entered was:\n");
printf("%s\n", buffer);


/***************************/

which runs fine in normal linux.

So, am I missing something? How can I get user's input when I submit a interactive job?