#!/bin/bash
#BSUB -J Relion_test
#BSUB -q gpuqueue
#BSUB -n 4 #This is number of gpu's
#BSUB -R span[ptile=4]
#BSUB -R rusage[mem=5]
#BSUB -gpu "num=1"
#BSUB -sla lpSC
#BSUB -W 10:00
#BSUB -m lp-gpu ls-gpu lt-gpu
#BSUB -o %J.stdout
#BSUB -eo %J.stderr
#BSUB -B
#BSUB -u <email ID >
#BSUB -L /bin/bash


#### this mpirun/relion combo works; others complain about mpirun or program not compiled with mpirun...

cd /lila/data/hpcadmin/home/neeraj/relion_benchmark_new/

# Launch MPI job.

module load openmpi
module load cuda
source /programs/sbgrid.shrc
          
echo "THis is the path $PATH"
echo "start time $(date)"
         
time mpirun -n 5 relion_refine_mpi --i Particles/shiny_2sets.star --ref emd_2660.map:mrc --firstiter_cc --ini_high 60 --ctf --ctf_corrected_ref --iter 25 --tau2_fudge 4 --particle_diameter 360 --K 6 --flatten_solvent --zero_mask --oversampling 1 --healpix_order 2 --offset_range 5 --offset_step 2 --sym C1 --norm --scale --random_seed 0 --o class3d  --j 6 --dont_combine_weights_via_disc --pool 500 --gpu >benchmark3.out 2>benchmark3.err
      
echo "This is finished time $(date)"