Error occurred during initialization of VM: Trimmomatic

Hi all,
I got the following error while running kneaddata.

My command:

kneaddata --input1 HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1.fq --input2 HNM5_EKDN230019645-1A_HFC3WDSX7_L2_2.fq --reference-db …/ --output knead_HNM5 --trimmomatic /dss/dssfs02/lwp-dss-0001/u7b03/u7b03-dss-0000/ra78zut/lisa_fetal_metagenome/Trimmomatic-0.39/ --bypass-trf --max-memory 600000 --threads 200 --trimmomatic-options=“Xmx60g” --trimmomatic-options=“Xms60g”

I have increased the memory up to 600000 but still get the error saying

06/26/2023 03:06:33 PM - kneaddata.knead_data - INFO: Running kneaddata v0.12.0
06/26/2023 03:06:33 PM - kneaddata.knead_data - INFO: Output files will be written to: lisa_fetal_metagenome/knead_HNM5
06/26/2023 03:06:33 PM - kneaddata.knead_data - DEBUG: Running with the following arguments:
verbose = False
input1 = HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1.fq
input2 = HNM5_EKDN230019645-1A_HFC3WDSX7_L2_2.fq
unpaired = None
output_dir = lisa_fetal_metagenome/knead_HNM5
scratch_dir =
reference_db = hg37dec_v0.1
bypass_trim = False
output_prefix = HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1_kneaddata
threads = 200
processes = 1
trimmomatic_quality_scores = -phred33
bmtagger = False
bypass_trf = True
run_trf = False
fastqc_start = False
fastqc_end = False
store_temp_output = False
remove_intermediate_output = False
cat_final_output = False
log_level = DEBUG
log = lisa_fetal_metagenome/knead_HNM5/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1_kneaddata.log
trimmomatic_path = lisa_fetal_metagenome/Trimmomatic-0.39/trimmomatic-0.39.jar
run_trim_repetitive = False
max_memory = 600000
trimmomatic_options = Xmx60g Xms60g
sequencer_source = NexteraPE
bowtie2_path = /dss/dsshome1/0F/ra78zut/miniconda3/envs/kneadata/bin/bowtie2
bowtie2_options = --very-sensitive-local --phred33
decontaminate_pairs = strict
reorder = False
serial = False
bmtagger_path = None
trf_path = None
match = 2
mismatch = 7
delta = 7
pm = 80
pi = 10
minscore = 50
maxperiod = 500
fastqc_path = None
remove_temp_output = True
input = lisa_fetal_metagenome/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1.fq lisa_fetal_metagenome/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_2.fq
discordant = True

06/26/2023 03:06:33 PM - kneaddata.utilities - INFO: Reformatting file sequence identifiers …
06/26/2023 03:08:40 PM - kneaddata.utilities - INFO: Reformatting file sequence identifiers …
06/26/2023 03:10:45 PM - kneaddata.utilities - INFO: Reordering read identifiers …
06/26/2023 03:23:30 PM - kneaddata.utilities - INFO: READ COUNT: raw pair1 : Initial number of reads ( lisa_fetal_metagenome/knead_HNM5/reordered_j1kmal93_reformatted_identifierszfjspj3q_HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1 ): 50740544.0
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: READ COUNT: raw pair2 : Initial number of reads ( lisa_fetal_metagenome/knead_HNM5/reordered_wgnx1o_h_reformatted_identifiersf3t1zor4_HNM5_EKDN230019645-1A_HFC3WDSX7_L2_2 ): 50740544.0
06/26/2023 03:24:06 PM - kneaddata.utilities - DEBUG: Checking input file to Trimmomatic : lisa_fetal_metagenome/knead_HNM5/reordered_j1kmal93_reformatted_identifierszfjspj3q_HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1
06/26/2023 03:24:06 PM - kneaddata.utilities - DEBUG: Checking input file to Trimmomatic : lisa_fetal_metagenome/knead_HNM5/reordered_wgnx1o_h_reformatted_identifiersf3t1zor4_HNM5_EKDN230019645-1A_HFC3WDSX7_L2_2
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Running Trimmomatic …
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Execute command: java -Xmx600000 -jar lisa_fetal_metagenome/Trimmomatic-0.39/trimmomatic-0.39.jar PE -threads 200 -phred33 lisa_fetal_metagenome/knead_HNM5/reordered_j1kmal93_reformatted_identifierszfjspj3q_HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1 lisa_fetal_metagenome/knead_HNM5/reordered_wgnx1o_h_reformatted_identifiersf3t1zor4_HNM5_EKDN230019645-1A_HFC3WDSX7_L2_2 lisa_fetal_metagenome/knead_HNM5/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1_kneaddata.trimmed.1.fastq lisa_fetal_metagenome/knead_HNM5/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1_kneaddata.trimmed.single.1.fastq lisa_fetal_metagenome/knead_HNM5/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1_kneaddata.trimmed.2.fastq lisa_fetal_metagenome/knead_HNM5/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1_kneaddata.trimmed.single.2.fastq Xmx60g Xms60g
06/26/2023 03:24:06 PM - kneaddata.utilities - CRITICAL: Error executing: java -Xmx600000 -jar lisa_fetal_metagenome/Trimmomatic-0.39/trimmomatic-0.39.jar PE -threads 200 -phred33 lisa_fetal_metagenome/knead_HNM5/reordered_j1kmal93_reformatted_identifierszfjspj3q_HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1 lisa_fetal_metagenome/knead_HNM5/reordered_wgnx1o_h_reformatted_identifiersf3t1zor4_HNM5_EKDN230019645-1A_HFC3WDSX7_L2_2 lisa_fetal_metagenome/knead_HNM5/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1_kneaddata.trimmed.1.fastq lisa_fetal_metagenome/knead_HNM5/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1_kneaddata.trimmed.single.1.fastq lisa_fetal_metagenome/knead_HNM5/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1_kneaddata.trimmed.2.fastq lisa_fetal_metagenome/knead_HNM5/HNM5_EKDN230019645-1A_HFC3WDSX7_L2_1_kneaddata.trimmed.single.2.fastq Xmx60g Xms60g

Error message returned from Trimmomatic :
Error occurred during initialization of VM
Too small maximum heap

06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Total memory = 62.21303939819336 GB
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Available memory = 54.09303665161133 GB
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Free memory = 54.34709167480469 GB
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Percent memory used = 13.1 %
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: CPU percent = 0.0 %
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Total cores count = 56
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Total disk = 31.106517791748047 GB
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Used disk = 3.9095611572265625 GB
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Percent disk used = 12.6 %
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Process create time = 2023-06-26 15:06:32
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Process user time = 872.65 seconds
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Process system time = 177.27 seconds
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Process CPU percent = 0.0 %
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Process memory RSS = 0.08400344848632812 GB
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Process memory VMS = 0.14055252075195312 GB
06/26/2023 03:24:06 PM - kneaddata.utilities - INFO: Process memory percent = 0.13502546941753749 %

Hi @MonicaSteffi ,
Trimmomatic is definitely running out of heap memory for your input samples. Could you try the demo samples to rule out the Trimmomatic issue on your side. Also, how big are the input files? It is very uncommon for Trimmomatic to run out of memory since you have allocated 62GB.

This might be unrelated but you have passed the duplicate trimmomatic options:
--trimmomatic-options=“Xmx60g” --trimmomatic-options=“Xms60g”

Regards,
Sagun