[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [condor-users] question about using Condor_G



On Wed, 31 Mar 2004, Yuhong Feng wrote:

> Dear Condor-users,
>
> First, thanks for Mr. Jaime Frey 's suggestion about
> my last email. However, I encounter new problems. Here
> is my description file:
>
> executable = print.class
> transfer_input_files=print.class
> globusscheduler = surya/jobmanager-condor
> Universe = globus
> GlobusRSL = (condor_submit=(transfer_files
> ALWAYS)(Universe java)(transfer_input_files
> print.class))
> arguments = print $(input)
> input = print.in
> output = non-stagedJava.$(cluster).$(process).out
> error = non-stagedJava.$(cluster).$(process).error
> log = non-stagedJava.$(cluster).$(process).log
> transfer_files = ALWAYS
> should_transfer_files = YES
> when_to_transfer_output = on_exit
> queue 1
>
> My java file:
> import java.io.*;
>
> public class print{
>         public static  void main(String[] args) {
>  try
>                         {
>                                 // Open the file that
> is the first
>                                 // command line
> parameter
>                                         if
> (args.length > 0){
>
> System.out.println(args[0]);
>                                         }
>
>                          String filename = new
> String(args[0]);
>
> System.out.println("File :"+filename);
>
> FileInputStream fstream = new
>
> FileInputStream(filename);
>
>                                         // Convert our
> input stream to a
>                                         //
> DataInputStream
>
> DataInputStream in =
>                                                 new
> DataInputStream(fstream);
>
>                                         // Continue to
> read lines while
>                                         // there are
> still some left to read
>                                         while
> (in.available() !=0)
>                                         {
>                                                 //
> Print file line to screen
>
> System.out.println (in.readLine());
>                                         }
>
>                                         in.close();
>                         }
>                 catch (Exception e)
>                 {
>                         System.err.println(" input
> error");
>                 }
>
>
>         }
> }
>
> The error message in
> non-stagedJava.$(cluster).$(process).error is :
>  input error
>
> That is, the transferred file print.in can not be
> open by print.class. The print.class runs ok, other
> information retrieved from
> non-stagedJava.$(cluster).$(process).out shows
> that the clss run well. what is the problem? would you
> please help me figure it out. your kind help and
> patience are highly appreciated.

First, you shouldn't have to set transfer_input_files as part of
GlobusRSL. The remote Condor system should automatically transfer
print.class from the front-end node to the execute node as part of the
java universe.

Second, the file you specify with the "input" parameter in your submit
file becomes the standard input of your program (i.e. System.in). You
can't depend on a copy of it being in your job's execute directory under
the same name. Either specify it as an input file to be transferred or
read it from System.in.

+------------------------------------+-------------------------------+
|             Jaime Frey             |There are 10 types of people in|
|         jfrey@xxxxxxxxxxx          |the world: Those who understand|
|   http://www.cs.wisc.edu/~jfrey/   |  binary, and those who don't  |
+------------------------------------+-------------------------------+
Condor Support Information:
http://www.cs.wisc.edu/condor/condor-support/
To Unsubscribe, send mail to majordomo@xxxxxxxxxxx with
unsubscribe condor-users <your_email_address>