gatk-3.8/doc_archive/developer-zone/(howto)_Speed_up_GATK_compi...

2.2 KiB

(howto) Speed up GATK compilation

http://gatkforums.broadinstitute.org/gatk/discussion/5784/howto-speed-up-gatk-compilation


TL;DR: mvn -Ddisable.shadepackage verify


Background

In addition to Queue's GATK-wrapper codegen, relatively slow scala compilation, etc. there's still a lot of legacy compatibility from our ant days in the Maven scripts. Our mvn verify behaves more like when one runs ant, and builds everything needed to bundle the GATK.

As of GATK 3.4, by default the build for the "protected" code generates jar files that contains every class needed for running, one for the GATK and one for Queue. This is done by the Maven shade plugin, and are each called the "package jar". But, there's a way to generate a jar file that only contains META-INF/MANIFEST.MF pointers to the dependency jar files, instead of zipping/shading them up. These are each the "executable jar", and FYI are always generated as it takes seconds, not minutes.


Instructions for fast compilation

While developing and recompiling Queue, disable the shaded jar with -Ddisable.shadepackage. Then run java -jar target/executable/Queue.jar ... If you need to transfer this jar to another machine / directory, you can't copy (or rsync) just the jar, you'll need the entire executable directory.

# Total expected time, on a local disk, with Queue:
#   ~5.0 min from clean
#   ~1.5 min per recompile
mvn -Ddisable.shadepackage verify

always available

java -jar target/executable/Queue.jar --help

not found when shade disabled

java -jar target/package/Queue.jar --help</code class="pre_md">

If one is only developing for the GATK, skip Queue by adding -P\!queue also.

mvn -Ddisable.shadepackage -P\!queue verify

always available

java -jar target/executable/GenomeAnalysisTK.jar --help

not found when queue profile disabled

java -jar target/executable/Queue.jar --help</code class="pre_md">