There are two very useful open-source tools.
Interested in particle astrophysics and plasma astrophysics. This blog is my research/private notebook.
Sunday, January 21, 2024
Sunday, December 10, 2023
combine pdf in linux
PDF Arranger is a small python-gtk application, which helps the user to merge or split PDF documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface.
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
SelectType=select/linear
AccountingStorageType=accounting_storage/none
AccountingStoreFlags=job_comment
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
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
Sunday, May 30, 2021
SSH free password login
step1 : Create public and private keys using ssh-key-gen on local-host
$ssh-keygen
step 2: Copy the public key to remote-host using ssh-copy-id
$ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
step 3: login remote host and change file permission
Change the permissions of .ssh to 700
$chmod 700 .ssh
Change the permissions of .ssh/authorized_keys to 640
$chmod 640 .ssh/authorized_keys
Friday, December 4, 2020
Display figure in remote machine
import matplotlib matplotlib.use('tkagg') import matplotlib.pyplot as plt plt.plot([1, 2, 3]) plt.show()
ssh -p port_number -X user@xxxx
Reference: https://stackoverflow.com/questions/3453188/matplotlib-display-plot-on-a-remote-machineSunday, November 15, 2020
Linux resource management tool Slurm
Slurm is a group utilities used for managing workloads on computer clusters.
Some clusters use Slurm as the batch queuing system and the scheduling mechanism.
Jobs are submitted to Slurm from a login node and Slurm handles scheduling these jobs on nodes.
sinfo -l command displays information about nodes and partitions.
sbatch job.sh submit a job where job.sh is the script you want to run.
scancel jobID cancels a job
squeue -u userID shows state of jobs
An example for job submit script, e.g., job.slurm
Execute script
$ sbatch job.slurm
Wednesday, November 11, 2020
Show logged users in Linux
There are few simple commands which can display who are logged in the Linux.
w
who
users
last
Typing one of these commands in the terminal, it will display the logged in users information.
Thursday, September 17, 2020
Play open red alert on chromebook
Command & Conquer: Red Alert is a real-time strategy game of the Command & Conquer franchise.
It is easy to play the classic open red alert game on Chromebook once you get the Linux beta.
method 1
sudo apt update sudo apt install snapd sudo snapd install openramethod 2
wget https://github.com/OpenRA/OpenRA/releases/download/release-20200503/OpenRA-Red-Alert
-x86_64.AppImage
sudo chmod +x OpenRA-Red-Alert-x86_64.AppImage ./OpenRA-Red-Alert-x86_64.AppImageenjoying your game!
Friday, August 28, 2020
Image viewer feh
feh is a light-weight, configurable and versatile image viewer.
It is very small, and good for your disk.
Example:
feh -Z -x. file_name.png
vi .bashrc and add
alias feh='feh -Z -x.'
Reference:
https://man.finalrewind.org/1/feh/

