#!/bin/bash
#SBATCH --job-name=idalonerun
#SBATCH --output=shell.out
#SBATCH --ntasks-per-node=1
#SBATCH --nodes=1
#SBATCH --cpus-per-task=12
#SBATCH --time=15:00:00
#SBATCH -A htl100
#SBATCH --qos hotel
#SBATCh --mem 32G
#SBATCH --mail-type=BEGIN,END,FAIL
#SBATCH --mail-user=haas@uwm.edu

# ---------------------------------------------------------------------
 
# SLURM script to run id on a single node.
# Submit this script at a command prompt ($) with:
# "sbatch idalonerun.shl"
# Equivalent to:
# "srun idalone.shl"
# but better because it runs id in batch mode.
  
# Note that all lines above "# ---" must be the first lines that SLURM
# encounters.  After that, a comment is formed with "# comment," i.e., a
# single "#", a space, and then the comment.
 
# module load intel/mkl/64/2017/0.098
cd /tscc/nfs/home/haas/profbio/intelkit/files/
haashome="/tscc/nfs/home/haas"
javahome="/tscc/nfs/home/haas/jdk-19"
ar="/cm/shared/apps/spack/0.17.3/cpu/opt/spack/linux-rocky9-cascadelake/gcc-11.2.0/gigaspaces"
arj="/cm/shared/apps/spack/0.17.3/cpu/opt/spack/linux-rocky9-cascadelake/gcc-11.2.0/java"
# Note that "*" is to match .jar files only in the -cp option.
$javahome/bin/java -Djava.rmi.server.useCodebaseOnly=false -Djava.security.policy=${haashome}/id/policy.all -Djava.rmi.server.RMIClassLoaderSpi=net.jini.loader.pref.PreferredClassProvider -classpath ${haashome}/id:${arj}/*:${ar}/lib/optional/*:${ar}/lib/platform/*:${ar}/lib/required/*:${arj}/derby/lib/derby.jar -Xms10g -Xmx10g Run_id $1 standalone noname --max-mem-size=10g
