How can I measure over time memory and time usage for my Java model run by a PBS script on a cluster?

38 views Asked by At

First question on stack overflow, do not hesitate to give me advices !

I have a model written in JAVA, which is called by a PBS script to run on a cluster. It generate time dependent data. I am trying to optimize its memory use and simulation time. To do so, I would like to store over time, the memory and time needed by the model for each year of simulation. Do you think it is possible ? And if so, how would you advise me to do ?

Many thanks !

(I already have tried to add the time argument before the call for JAVA command line, but it does not give much information.)

Here is the PBS code that I use :

#!/bin/bash
#PBS -l ncpus=1
#PBS -l mem=10
#PBS -l walltime=10:00:00

. /appli/anaconda/latest/etc/profile.d/conda.sh
conda activate MODEL
  
rm -rfv $SCRATCH/0D/*

cp -r $HOME/MODELDIRECTORY/0D $SCRATCH

cp $HOME/MODELDIRECTORY/inst/java/MODEL.jar $SCRATCH/0D

cd $SCRATCH/0D

time java -Xmx6g -jar MODEL.jar CONFIG.csv >& output.log
0

There are 0 answers