Processing math: 100%

Labels

Friday, December 30, 2022

Install Slurm on my personal Fedora laptop

Slurm (Simple Linux Utility for Resource Management) is a group utilities used for managing workloads on computer clusters. It can also be sued in your personal laptop. 


  $sudo dnf install slurm slurm-slurmd slurm-slumrctld
  $sudo -u munge /usr/sbin/mungekey -v
  $sudo systemctl start munge
  $sudo systemctl status munge
  $sudo systemctl enable munge
  $munge -n | unmunge // check munge works
  $hostname -f // find out hostname
  $sudo vi  /etc/slurm/slurm.conf
  


ClusterName=localcluster
SlurmctldHost=localhost  // or hostname
MpiDefault=pmix
ProctrackType=proctrack/cgroup
ReturnToService=1
SlurmctldPidFile=/var/run/slurm/slurmctld.pid
SlurmctldPort=6817
SlurmdPidFile=/var/run/slurm/slurmd.pid
SlurmdPort=6818
SlurmdSpoolDir=/var/spool/slurm/d
SlurmUser=root
StateSaveLocation=/var/spool/slurm/ctld
SwitchType=switch/none
InactiveLimit=0
KillWait=30
MinJobAge=300
SlurmctldTimeout=120
SlurmdTimeout=300
Waittime=0

SchedulerType=sched/backfill
SelectType=select/linear
AccountingStorageType=accounting_storage/none
AccountingStoreFlags=job_comment
JobCompType=jobcomp/none
JobAcctGatherFrequency=30
JobAcctGatherType=jobacct_gather/none
SlurmctldDebug=info
SlurmctldLogFile=/var/log/slurm/slurmctld.log
SlurmdDebug=info
SlurmdLogFile=/var/log/slurm/slurmd.log
NodeName=localhost CPUs=12 Sockets=1 CoresPerSocket=6 ThreadsPerCore=2 RealMemory=10000 State=UNKNOWN
PartitionName=sbatch Nodes=ALL Default=YES MaxTime=INFINITE State=UP


change the Node information (marked as red color) to your laptop configuration. 

$ sudo systemctl start slurmctld
$ sudo systemctl status slurmctld
$ sudo systemctl enable slurmctld
$ sudo systemctl status slurmd
$ sudo systemctl enable slurmd

// test the installation
$ srun ls 


Reference:

https://src.fedoraproject.org/rpms/munge

http://docs.nanomatch.de/technical/SimStackRequirements/SingleNodeSlurm.html

https://blog.llandsmeer.com/tech/2020/03/02/slurm-single-instance.html


Thursday, December 22, 2022

Collision Energy

 The kinetic energy between two colliding particles can be expressed in terms of center of mass and relative velocity by

Ek=12m1v21+12m2v22=12Mv2c+12μv2r,

a sum of a center-of-mass term and a relative momentum term.

where M, vc, ν, and vr are given by

M=(m1+m2);

vc=m1v1+m2v2m1+m2;

μ=m1m2m1+m2;

vr=v1v2.


12μv2r is called collision energy.

amu is short for atomic mass unitProtons have a positive electrical charge of one (+1) and a mass of 1 atomic mass unit (amu), which is about 1.67×10−27 kilograms.



Reference:

https://chem.libretexts.org/Bookshelves/Physical_and_Theoretical_Chemistry_Textbook_Maps/Map%3A_Physical_Chemistry_for_the_Biosciences_(Chang)/02%3A_Properties_of_Gases/2.8%3A_Molecular_Collisions_and_the_Mean_Free_Path

https://web.chem.ox.ac.uk/teaching/Physics%20for%20CHemists/Mechanics/Collisions.html

https://www.angelo.edu/faculty/kboudrea/periodic/structure_mass.htm



Wednesday, December 21, 2022

Adiabatic Cooling

An adiabatic process is one in which no heat enters or leaves the system.


The thermdynamic first law takes the form

dU=PdV,

since dQ=0.

Note that Cv=(U/T)V , but the internal energy of an ideal gas depends only on the temperature and is independent of the volume (because there are no intermolecular forces). Thus for an ideal gas, we have

dU=CvdT=PdV

PV=RT=CpCv)T

γ=Cp/Cv

Then we have

TVγ1=const
dln(T)/dt=(γ1)u
where we have use 
1VdVdt=u
where u is the flow speed.

Since KBTE, here E is thermal energy. We have 
dln(E)/dt=(γ1)u

For non-relativistic particle, γ=5/3, E=p2/m.
For relativistic particle, γ=4/3, E=pc,
we have 
dpdt=p3u

The bulk of particles lose energy by adiabatic cooling due to the work that protons exert on the expanding material. Particles (pressure ?) do (positive) work on the expanding medium cause their bulk energy reduce.


Reference:

https://github.com/bolverk/theoretical_physics_digest