Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGV: pull up computation of jvm heap memory into OOD job script #77

Open
wants to merge 1 commit into
base: uab-prod
Choose a base branch
from
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))

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.

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