how to check job submission log

Asked by Hieu Vu

hi,

I create a simple parameter sweep app:

public static void main(String[] args) {
  // TODO Auto-generated method stub
// System.out.println(args[0]);
  String para = args[0];
  String inputFile = args[1];
  try {
   String current;
   current = new java.io.File( "." ).getCanonicalPath();
   String inputPath = current + "/" + inputFile;
   System.out.println("Start reading input file");
   System.out.println("--------------------------");
   FileInputStream fstream = new FileInputStream(inputPath);
   DataInputStream in = new DataInputStream(fstream);
   BufferedReader br = new BufferedReader(
     new InputStreamReader(in));
   String strLine;
   while ((strLine = br.readLine()) != null) {
    System.out.println(strLine);
   }
   System.out.println("--------------------------");
   System.out.println("Input file is processed with parameter " + para);

  } catch (IOException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }

 }

The execution result on my machine:

hieu@hieu-PC:~$ cat input.txt
This is input file

hieu@hieu-PC:~$ java -jar SimpleParaSweep.jar 100 input.txt
Start reading input file
--------------------------
This is input file

--------------------------
Input file is processed with parameter 100

Then I made an execution script on the server:
[hieuvt pearl] /home/hieuvt > cat SimpleParaSweep/SimpleParaSweep.sh
java -jar SimpleParaSweep.jar $1 input.txt > SimpleParaSweep_$1.txt

and a jsdl file on my machine:

hieu@hieu-PC:~/work/htcaas/HTCaaSCLI/jsdl$ cat SimpleParaSweep.jsdl
<JobDefinition xmlns="http://schemas.ggf.org/jsdl/2005/11/jsdl" xmlns:ns2="http://schemas.ggf.org/jsdl/2005/11/jsdl-posix" xmlns:ns3="http://schemas.ogf.org/jsdl/2009/03/sweep">
    <JobDescription>
        <Application>
            <ApplicationName>SimpleParaSweep</ApplicationName>
            <ns2:POSIXApplication>
                <ns2:Executable>SimpleParaSweep.sh</ns2:Executable>
                <ns2:Argument>EXPNUM</ns2:Argument>
            </ns2:POSIXApplication>
        </Application>
        <DataStaging>
            <FileName>execution script</FileName>
            <Source>
                <URI>/home/hieuvt/SimpleParaSweep/SimpleParaSweep.sh</URI>
            </Source>
        </DataStaging>
        <DataStaging>
            <FileName>output_file</FileName>
            <Target>
                <URI>/home/hieuvt/SimpleParaSweep/sps_EXPNUM.out</URI>
            </Target>
        </DataStaging>
    </JobDescription>
    <ns3:Sweep>
        <ns3:Assignment>
            <ns3:DocumentNode>
                <ns3:Match>EXPNUM</ns3:Match>
            </ns3:DocumentNode>
     <ns3:LoopInteger start="1" end ="10" step="1" />
    </ns3:Sweep>
</JobDefinition>

When I try to submit this .jsdl file via CLI, it got some errors:

HTCaaS : HTCaaSCLI >> htcaas-job-submit -f jsdl/SimpleParaSweep.jsdl
 JSDL : jsdl/SimpleParaSweep.jsdl
Failed to submit. 'metaJob ID' is 'null'.

What was wrong? How can I check the submission log?

Question information

Language:
English Edit question
Status:
Solved
For:
HTCaaS Edit question
Assignee:
Seoyoung Kim Edit question
Solved by:
Hieu Vu
Solved:
Last query:
Last reply:
Revision history for this message
Seoyoung Kim (sssyyy77) said :
#1

Hi hieu,

It will be run if you change a property of ApplicationName in JSDL into 'general' like below.

 <JobDefinition xmlns="http://schemas.ggf.org/jsdl/2005/11/jsdl" xmlns:ns2="http://schemas.ggf.org/jsdl/2005/11/jsdl-posix" xmlns:ns3="http://schemas.ogf.org/jsdl/2009/03/sweep">
    <JobDescription>
        <Application>
            <ApplicationName>general</ApplicationName>
            <ns2:POSIXApplication>
                <ns2:Executable>SimpleParaSweep.sh</ns2:Executable>
                <ns2:Argument>EXPNUM</ns2:Argument>
            </ns2:POSIXApplication>
        </Application>
        <DataStaging>
            <FileName>execution script</FileName>
            <Source>
                <URI>/home/hieuvt/SimpleParaSweep/SimpleParaSweep.sh</URI>
            </Source>
        </DataStaging>
        <DataStaging>
            <FileName>output_file</FileName>
            <Target>
                <URI>/home/hieuvt/SimpleParaSweep/sps_EXPNUM.out</URI>
            </Target>
        </DataStaging>
    </JobDescription>
    <ns3:Sweep>
        <ns3:Assignment>
            <ns3:DocumentNode>
                <ns3:Match>EXPNUM</ns3:Match>
            </ns3:DocumentNode>
     <ns3:LoopInteger start="1" end ="10" step="1" />
    </ns3:Sweep>
</JobDefinition>

-Seoyoung

Revision history for this message
Seoyoung Kim (sssyyy77) said :
#2

Additionally, we are in progress of developing checking submission log on CLI.
After completing, we will let you know.

Thank you.

Revision history for this message
Hieu Vu (hieuvt2008) said :
#3

thanks for reply!!!
I have to do some more changes and it works :)

JRE is also packaged to prevent java version conflict:

[hieuvt pearl] /home/hieuvt/SimpleParaSweep > cat SimpleParaSweep.sh
#/bin/bash
tar -xzvf jre-7u40-linux-x64.tar.gz
jre1.7.0_40/bin/java -jar SimpleParaSweep.jar $1 input.txt > SimpleParaSweep_$1.out

Finally here is the .jsdl file:

$ cat SimpleParaSweep.jsdl
<JobDefinition xmlns="http://schemas.ggf.org/jsdl/2005/11/jsdl" xmlns:ns2="http://schemas.ggf.org/jsdl/2005/11/jsdl-posix" xmlns:ns3="http://schemas.ogf.org/jsdl/2009/03/sweep">
    <JobDescription>
        <Application>
            <ApplicationName>general</ApplicationName>
            <ns2:POSIXApplication>
                <ns2:Executable>SimpleParaSweep.sh</ns2:Executable>
                <ns2:Argument>EXPNUM</ns2:Argument>
            </ns2:POSIXApplication>
        </Application>
        <DataStaging>
            <FileName>execution script</FileName>
            <Source>
                <URI>/home/hieuvt/SimpleParaSweep/SimpleParaSweep.sh</URI>
            </Source>
        </DataStaging>
 <DataStaging>
            <FileName>jre</FileName>
            <Source>
                <URI>/home/hieuvt/SimpleParaSweep/jre-7u40-linux-x64.tar.gz</URI>
            </Source>
        </DataStaging>
 <DataStaging>
     <FileName>jar file</FileName>
            <Source>
                <URI>/home/hieuvt/SimpleParaSweep/SimpleParaSweep.jar</URI>
            </Source>
 </DataStaging>
        <DataStaging>
     <FileName>input.txt</FileName>
     <Source>
  <URI>/home/hieuvt/SimpleParaSweep/input.txt</URI>
     </Source>
 </DataStaging>
 <DataStaging>
            <FileName>output_file</FileName>
            <Target>
                <URI>/home/hieuvt/SimpleParaSweep/SimpleParaSweep_EXPNUM.out</URI>
            </Target>
        </DataStaging>
    </JobDescription>
    <ns3:Sweep>
        <ns3:Assignment>
            <ns3:DocumentNode>
                <ns3:Match>EXPNUM</ns3:Match>
            </ns3:DocumentNode>
     <ns3:LoopInteger start="1" end ="10" step="1" />
 </ns3:Assignment>
    </ns3:Sweep>
</JobDefinition>