diff --git a/lib/remote_submit.cpp b/lib/remote_submit.cpp index efb050847e..e90fd0f5be 100644 --- a/lib/remote_submit.cpp +++ b/lib/remote_submit.cpp @@ -355,13 +355,33 @@ int submit_jobs( } for (unsigned int j=0; j\n" - "local_staged\n" - "%s\n" - "\n", - infile.physical_name - ); + switch (infile.mode) { + case FILE_MODE_LOCAL_STAGED: + sprintf(buf, + "\n" + "local_staged\n" + "%s\n" + "\n", + infile.physical_name + ); + break; + case FILE_MODE_REMOTE: + sprintf(buf, + "\n" + "remote\n" + "%s\n" + "%f\n" + "%s\n" + "\n", + infile.url, + infile.nbytes, + infile.md5 + ); + break; + default: + fprintf(stderr, "unsupported file mode %d\n", infile.mode); + exit(1); + } request += buf; } request += "\n"; diff --git a/lib/remote_submit.h b/lib/remote_submit.h index 12aeef9ec3..498ff6a8e0 100644 --- a/lib/remote_submit.h +++ b/lib/remote_submit.h @@ -32,12 +32,33 @@ using std::string; using std::vector; using std::map; +// Input file modes. +// Only LOCAL_STAGED and REMOTE are implemented now. +// +#define FILE_MODE_LOCAL 1 +#define FILE_MODE_LOCAL_STAGED 2 +#define FILE_MODE_SEMILOCAL 3 +#define FILE_MODE_INLINE 4 +#define FILE_MODE_REMOTE 5 + struct INFILE { - char physical_name[256]; // BOINC physical name - char src_path[256]; // path on submit machine + int mode; // see above + char logical_name[256]; // filename on execution machine. - // not used; could be used to check consistency w/ input template + // Supplied by Condor, but not currently used. + // could be used to check consistency w/ input template + char src_path[256]; + // path on submit machine + // used by Condor GAHP; not part of the API + + // the following used for LOCAL_STAGED + char physical_name[256]; // BOINC physical name + + // the following used for REMOTE + char url[256]; + double nbytes; + char md5[256]; }; struct JOB { diff --git a/samples/condor/boinc_gahp.cpp b/samples/condor/boinc_gahp.cpp index 93814eab9a..fab6c6a8b7 100644 --- a/samples/condor/boinc_gahp.cpp +++ b/samples/condor/boinc_gahp.cpp @@ -236,6 +236,7 @@ int COMMAND::parse_submit(char* p) { int ninfiles = atoi(strtok_r(NULL, " ", &p)); for (int j=0; j