How to run beast.jar file using Slurm?
2
0
Entering edit mode
4.4 years ago
kabir.deb ▴ 80

I have installed BEAST using conda in HPC.

$conda install -c bioconda beast

Now I'm trying to run it through Slurm script using 10 million generation

#!/bin/sh
#SBATCH --job-name=Beast_10Mn             # Job name
#SBATCH --ntasks=16                       # Run on the no. of CPU
#SBATCH --ntasks-per-node=4               # cores to spread across distinct nodes
#SBATCH --output=BST_log_%j               # Standard output log
#SBATCH --error=job.%J.err                # Standard error log


for i in dipTime_10mn.xml
do
echo "${i}"
java -jar /lib/beast.jar -threads 16 "${i}"
done;

But it shows Error: Unable to access jar file /lib/beast.jar

It will be an immense help if someone kindly helps.

Thanks,

BEAST Phylogeny jar HPC Slurm • 2.8k views
ADD COMMENT
2
Entering edit mode

If you are using SLURM on a cluster it is unlikely that you have permissions to write to /lib directory. Your beast.jar must be installed in a local directory by conda. Find and replace that path.

You would also want to use the for loop outside to set individual SLURM jobs up to make this efficient. Submitting a single job with a for loop inside it is not taking advantage of your cluster resources.

ADD REPLY
2
Entering edit mode
for i in dipTime_10mn.xml

looks wrong to me

ADD REPLY
0
Entering edit mode
4.3 years ago
kabir.deb ▴ 80

SOLVED

#!/bin/sh
#SBATCH --job-name=R4_beast            # Job name
#SBATCH --ntasks=2                     # Run on the no. of CPU
#SBATCH --ntasks-per-node=2            # cores to spread across distinct nodes
#SBATCH --output=R4_%j.log             # Standard output log
#SBATCH --error=R4_%J.err              # Standard error log

for i in *.xml
do
echo "${i}"
/home/d.kabiraj/software/BEAST2.6/beast2.6/bin/XML_input/R4/beast/bin/beast "${i}"
done;

Instead of jar file I used sh file with multiple XML input.

However, still I have a problem I can not connect with the BEAGLE library

ADD COMMENT
1
Entering edit mode
4.4 years ago
h.mon 35k

If you installed BEAST with conda, it won't be located at /lib/. Besides, BEAST has several wrapper scripts, you don't need to call java -jar.

The conda installer will put the wrapper scripts (applauncher, beast, beauti, loganalyser, logcombiner, treeannotator, treestatin) in the base conda PATH, or in the BEAST env PATH, in case you installed BEAST onto its own environment (which is advisable).

ADD COMMENT

Login before adding your answer.

Traffic: 1953 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6