HTCondor运行Java文件

  1. 常规配置

  ####################
  #
  # Example 1
  # Execute a single Java class
  #
  ####################

  universe       = java
  executable     = Hello.class
  arguments      = Hello
  output         = Hello.output
  error          = Hello.error
  queue

2. 含有文件传输的配置

  ####################
  #
  # Example 1
  # Execute a single Java class,
  # not on a shared file system
  #
  ####################

  universe       = java
  executable     = Hello.class
  arguments      = Hello
  output         = Hello.output
  error          = Hello.error
  should_transfer_files = YES
  when_to_transfer_output = ON_EXIT
  queue

 应用条件:

If submitting the job where a shared file system is not accessible, the submit description file becomes

3. 含有多个文件传输

For programs that consist of more than one .class file, identify the files in the submit description file:
executable = Stooges.class
transfer_input_files = Larry.class,Curly.class,Moe.class

4. 文件中含有多个Jar包,并且需要必要的文件传输

jar_files  = anexecutable.jar,sortmerge.jar,statemap.jar,commons-lang-2.1.jar
arguments  = some.main.ClassFile
executable = anexecutable.jar

 打包Jar文件时:

% jar cvf Library.jar Larry.class Curly.class Moe.class Stooges.class

编译时:

 java -classpath OneJarFile.jar TheMainClass

5. Java虚拟机约束:

   5.1 Packages

 package hpc;
 public class CondorDriver
 {
     // class definition here
 }
 
 #配置文件
arguments = hpc.CondorDriver

   5.2 JVM version

requirements = (JavaVersion=="3.2")

   5.3Benchmark speeds

requirements = (JavaMFlops>4.5)

 5.4 JVM配置

java_vm_args = -DMyProperty=Value -verbose:gc -Xmx1024m

  详细介绍:http://research.cs.wisc.edu/htcondor/manual/v7.8/2_8Java_Applications.html

你可能感兴趣的:(HTCondor运行Java文件)