Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion roles/ood_igv/files/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,19 @@ cd "${HOME}"
# Start Integrative Genomics Viewer
#

# Determine memory for JVM in IGV
default_jvm_other_mb=512 # default to 0.5 GB
total_available_mb=$(($SLURM_MEM_PER_CPU * $SLURM_CPUS_PER_NODE))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see these two variables set in a job.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't know this only set in a sbatch job, which is the way we start IGV job.
So I see it now.

if [ $total_available_mb -le $((default_jvm_other_mb * 10)) ]; then
heap_available_mb=$((9 * $total_available_mb / 10)) # total < 5G --> heap = 90% of total
else
heap_available_mb=$((total_available_mb - default_jvm_other_mb)) # otherwise heap = total - 512
fi

# Load the required environment
module load <%= context.version %>
# Launch IGV
module list
set -x
igvtools_gui.command &
igv.sh
igv.sh -Xmx${heap_available_mb}m