Dealing with large systems


K-points parallelization
By default Lumen is parallelized on frequencies, that is the most efficient way to distribute calculations among the different processors.
If your system is very large and requires more memory than the available one on your cluster you can change the parallelization strategy. By using the flag "-V par" you will get the parallelization options in your input, you can decide to turn on the parallelization on k-points in such a way that the product of cores in k-space and in frequency-space is equal to the total number of cores. For example if have 16 cores you can set:

NL_CPU= "4 4"                   # [PARALLEL] CPUs for each role
NL_ROLEs= "w k"                 # [PARALLEL] CPUs roles (w,k)
                            
and this will reduce the amount of memory used by the wave-function. If you are working with Real-Time Bethe Salpter equation you can set also

COLL_CPU= "4 4"                   # [PARALLEL] CPUs for each role
COLL_ROLEs= "qp q"                 # [PARALLEL] CPUs roles (k,b)
                            
Notice that in the Oscillator calculation memory is mainly distributed on bands, and the number of processors on the bands should not be larger than the squared number of bands.


Open-MP
Another possibility is to compile the code with the --open-mp flag and then use the OpenMP parallelization. For example set the number of threads to 2 (usually export OMP_NUM_THREADS="2") and then tell to Lumen to use these two threads by setting in the input:

NL_Threads= 2                # [OPENMP/NL] Number of threads for nl-optics
DIP_Threads= 2               # [OPENMP/X] Number of threads for dipoles
                            
I advise you not to use more than 4 threads in your calculations.


Big Parallelization
How many cores may you use with lumen?
Image you want to calculate the SHG in 100 frequencies, then you can set

"4 cores Open-MP" x "10 cores k-points" x "100 cores frequencies" = 4000 cores.

I think this is the maximum you can get with this code.
Notice that the restart for interrupted calculations works only on frequencies.