The cluster module¶
The cluster module contains various functions related to compute clusters (and also single machines).
Module that holds all compute-cluster-related functions
- rapthor.lib.cluster.get_available_memory()¶
Returns the available memory in GB
Note: a call to ‘free’ is used, which is parsed for the “available” value, the last entry on the second line of output.
- Returns:
- available_gbint
Available memory in GB
- rapthor.lib.cluster.get_fast_solve_intervals(cluster_parset, numsamples, numobs, target_timestep, antenna, ndir)¶
Returns the optimal solution interval and chunk size (both in number of time slots) for an observation so that the fast-phase solves in DPPP will fit in memory
- Parameters:
- cluster_parsetdict
Cluster-specific parset dictionary
- numsamplesint
Total number of time samples in the observation
- numobsint
Total number of observations
- target_timestepint
Target number of time samples for the fast-phase solve
- antennastr
Antenna type: “HBA” or “LBA”
- ndirint
Number of directions/patches in the calibration
- Returns:
- samples_per_chunkint
Size of chunk in number time slots
- solintint
Solution interval in number of time slots that will ensure the solve fits in the available memory
- rapthor.lib.cluster.get_slow_solve_intervals(cluster_parset, numsamples, numobs, target_freqstep, target_timestep, antenna, ndir)¶
Returns the optimal solution interval (in number of time slots) and chunk size (in number of frequency channels) for an observation so that the slow-gain solves in DPPP will fit in memory
- Parameters:
- cluster_parsetdict
Cluster-specific parset dictionary
- numsamplesint
Total number of frequency samples in the observation
- numobsint
Total number of observations
- target_freqstepint
Target number of frequency samples for the slow-gain solve
- target_timestepint
Target number of time samples for the slow-gain solve
- antennastr
Antenna type: “HBA” or “LBA”
- ndirint
Number of directions/patches in the calibration
- Returns:
- samples_per_chunkint
Size of chunk in number of frequency channels
- solintint
Solution interval in number of frequency channels that will ensure the solve fits in the available memory