From 347af772f6b3b68a161d699317017c442efb9acf Mon Sep 17 00:00:00 2001 From: bbimber Date: Thu, 15 Oct 2020 09:58:45 -0700 Subject: [PATCH 1/2] prepare to migrate to new-lustre --- .../genotypeassays/panel/HaplotypePanel.js | 4 ++-- .../pipeline/ExacloudResourceSettings.java | 2 +- .../SequenceJobResourceAllocator.java | 24 ++++--------------- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/GenotypeAssays/resources/web/genotypeassays/panel/HaplotypePanel.js b/GenotypeAssays/resources/web/genotypeassays/panel/HaplotypePanel.js index f94e24535..a62e7e768 100644 --- a/GenotypeAssays/resources/web/genotypeassays/panel/HaplotypePanel.js +++ b/GenotypeAssays/resources/web/genotypeassays/panel/HaplotypePanel.js @@ -591,14 +591,14 @@ Ext4.define('GenotypeAssays.panel.HaplotypePanel', { } else { rankedPctMatches[totalPctPresent] = rankedPctMatches[totalPctPresent] || []; - if (rankedPctMatches[totalPctPresent].indexOf(names) == -1) { + if (rankedPctMatches[totalPctPresent].indexOf(names) === -1) { rankedPctMatches[totalPctPresent].push(names); } pctExplainedByMatch[names] = totalPctPresent; rankedMatches[matchesUnion.length] = rankedMatches[matchesUnion.length] || []; - if (rankedMatches[matchesUnion.length].indexOf(names) == -1) { + if (rankedMatches[matchesUnion.length].indexOf(names) === -1) { rankedMatches[matchesUnion.length].push(names); } } diff --git a/primeseq/src/org/labkey/primeseq/pipeline/ExacloudResourceSettings.java b/primeseq/src/org/labkey/primeseq/pipeline/ExacloudResourceSettings.java index b1a9ecdd1..f2a916d9a 100644 --- a/primeseq/src/org/labkey/primeseq/pipeline/ExacloudResourceSettings.java +++ b/primeseq/src/org/labkey/primeseq/pipeline/ExacloudResourceSettings.java @@ -32,7 +32,7 @@ public List getParams() put("minValue", 512); }}, 1028), ToolParameterDescriptor.create("localSSD", "Request Nodes With SSD Scratch", "If selected, -C ssdscratch will be added to the submit script, which limits to node with faster SSD scratch space. This might be important for I/O intense jobs.", "checkbox", null, null), - ToolParameterDescriptor.create("useGScratch", "Use GScratch Working Space", "If selected, this job will use the GCratch pilot as working space, which may be faster in some cases than lustre.", "checkbox", null, null), + ToolParameterDescriptor.create("useLustre", "Use Old Lustre Working Space", "If selected, this job will use the older Lustre working space.", "checkbox", null, null), ToolParameterDescriptor.create("useExclusive", "Use Exclusive Flag", "If selected, the job allocation can not share nodes with other running jobs. This should not be selected unless you are sure about this. It can help protect memory-intensive, long-running jobs.", "checkbox", null, null), ToolParameterDescriptor.create("covidRelated", "COVID Related Job", "If selected, this job will be flagged as --comment=COVID to help ACC track these jobs.", "checkbox", null, null) ); diff --git a/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java b/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java index 338065053..c6afe9c51 100644 --- a/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java +++ b/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java @@ -279,7 +279,6 @@ public void addExtraSubmitScriptLines(PipelineJob job, RemoteExecutionEngine eng possiblyAddSSD(job, engine, lines); possiblyAddExclusive(job, engine, lines); - possiblyAddGScratch(job, engine, lines); possiblyAddCOVID(job, lines); } else @@ -314,10 +313,10 @@ public Map getEnvironmentVars(PipelineJob job, RemoteExecutionEn { Map ret = new HashMap<>(); - if (job instanceof HasJobParams && getGScratchValue((HasJobParams)job)) + if (job instanceof HasJobParams && getUseLustreValue((HasJobParams)job)) { - job.getLogger().info("Requiring using GScratch pilot as working space"); - ret.put("USE_GSCRATCH", "1"); + job.getLogger().info("Requiring using original lustre as working space"); + ret.put("USE_LUSTRE", "1"); } return ret; @@ -419,10 +418,10 @@ private void possiblyAddSSD(PipelineJob job, RemoteExecutionEngine engine, List< } } - private boolean getGScratchValue(HasJobParams job) + private boolean getUseLustreValue(HasJobParams job) { Map params = (job).getJobParams(); - String val = StringUtils.trimToNull(params.get("resourceSettings.resourceSettings.useGScratch")); + String val = StringUtils.trimToNull(params.get("resourceSettings.resourceSettings.useLustre")); if (val == null) { return false; @@ -431,19 +430,6 @@ private boolean getGScratchValue(HasJobParams job) return Boolean.parseBoolean(val); } - private void possiblyAddGScratch(PipelineJob job, RemoteExecutionEngine engine, List lines) - { - if (getGScratchValue((HasJobParams)job)) - { - job.getLogger().info("Requiring infiniband node, because GScratch was selected as working space"); - String line = "#SBATCH -C IB"; - if (!lines.contains(line)) - { - lines.add(line); - } - } - } - private void possiblyAddQOS(PipelineJob job, RemoteExecutionEngine engine, List lines) { //first remove existing From f895c36c88cfb09f1b524b832fd1af9023b74f6e Mon Sep 17 00:00:00 2001 From: bbimber Date: Sun, 18 Oct 2020 07:16:31 -0700 Subject: [PATCH 2/2] Remove unnecessary error logging --- .../primeseq/pipeline/SequenceJobResourceAllocator.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java b/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java index c6afe9c51..6fbab0b82 100644 --- a/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java +++ b/primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java @@ -281,10 +281,6 @@ public void addExtraSubmitScriptLines(PipelineJob job, RemoteExecutionEngine eng possiblyAddCOVID(job, lines); } - else - { - job.getLogger().error("This job type does not implement HasJobParams"); - } } private void possiblyAddCOVID(PipelineJob job, List lines)