Since the question was edited, here is an updated answer.
1. How to estimate the numbers which we initialize the SLURM directives:
As far as I understand, the way to decide the numbers that you initialise the SLURM directives are by empirical means.
So one way to estimate those numbers are by running your script on a very small subset on your local PC and logging various specifications of your PC. This could help you to calculate how long, how much memory you might need for a larger population (more molecules, more stronger basis sets etc).
For example, if you run a CCSD_T calculation for 1 molecule containing 20 atoms on your local PC.
And suppose it takes 14 mins on your local PC which has 32 GB RAM, 6 cores.
So if you wanted to run the calculations for 100 such molecules on the supercomputer, with 32GB RAM and 6 cores, you can estimate that it would take 100*14 = 1400 mins, which is about 23 hours !
So perhaps you would want to increase the RAM to 64GB or maybe 128GB.
Which would mostly half and quarter your time. So maybe at 128GB it would take 6 hours.
So in that way you can say:
#SBATCH --time=6:00:00
#SBATCH --cpus-per-task=6
#SBATCH --mem=128000
2. Good rules of thumb for determining the values for SLURM directives:
For the --mem= directive, use values which are powers of 2.
To Print out what values are initialized when you run the shell script
You can access the various parameters using the SLURM environment variables.
A complete list of the environment variables are found on the SLURM webpage.
input-environment-variables
output-environment-variables
Here is an example of how to print information regarding these parameters using SLURM environment variables:
Say we have a test.sh
with the following contents:
#!/bin/bash
#SBATCH -J QE68
#SBATCH --ntasks=16
#SBATCH --ntasks-per-core=1
#SBATCH --partition=defq
#SBATCH --mem=800
#SBATCH -o %x-%j.out
#SBATCH -e %x-%j.err
printf "N tasks per core %s\n" "$SLURM_NTASKS_PER_CORE"
printf "Number of tasks %s\n" "$SLURM_NTASKS"
printf "Memory per node %s\n" "$SLURM_MEM_PER_NODE"
Upon scheduling this sh script with: sbatch test.sh
In the output file, we would see the following output:
N tasks per core 1
Number of tasks 16
Memory per node 800