/images/avatar.png

Install Slurm in Ubuntu

Install

1
sudo apt install slurm-wlm slurm-wlm-doc -y 

Modify config

1
2
rm /etc/slurm-llnl/slurm.conf 
vi /etc/slurm-llnl/slurm.conf 

Example of config

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# slurm.conf file generated by configurator easy.html.
# Put this file on all nodes of your cluster.
# See the slurm.conf man page for more information.
#
ControlMachine=girl
#ControlAddr=
#
#MailProg=/bin/mail
MpiDefault=none
#MpiParams=ports=#-#
ProctrackType=proctrack/pgid
ReturnToService=1
SlurmctldPidFile=/var/run/slurm-llnl/slurmctld.pid
#SlurmctldPort=6817
SlurmdPidFile=/var/run/slurm-llnl/slurmd.pid
#SlurmdPort=6818
SlurmdSpoolDir=/var/spool/slurmd
SlurmUser=slurm
#SlurmdUser=root
StateSaveLocation=/var/spool/slurm-llnl
SwitchType=switch/none
TaskPlugin=task/none
#
#
# TIMERS
#KillWait=30
#MinJobAge=300
#SlurmctldTimeout=120
#SlurmdTimeout=300
#
#
# SCHEDULING
FastSchedule=1
SchedulerType=sched/backfill
SelectType=select/linear
#SelectTypeParameters=
#
#
# LOGGING AND ACCOUNTING
AccountingStorageType=accounting_storage/none
ClusterName=cluster
#JobAcctGatherFrequency=30
JobAcctGatherType=jobacct_gather/none
#SlurmctldDebug=3
#SlurmctldLogFile=
#SlurmdDebug=3
#SlurmdLogFile=
#
#
# COMPUTE NODES
NodeName=girl CPUs=4 State=UNKNOWN
PartitionName=debug Nodes=girl Default=YES MaxTime=INFINITE State=UP

Mkdir and Chown

安装Python导致VNC黑屏解决方案

问题在于VNCServer使用Python编写,所以受到系统Python版本影响。

解决方案:

1
2
3
4
5
6
7
8
9
$ cd $HOME
$ vim .bashrc
找到如下语句:
   export PATH="/home/user/anaconda2/bin:$PATH"
并修改为,并保存退出。
   export PATH="$PATH:/home/user/anaconda2/bin"
$ vncserver -kill :id
$ source .bashrc
$ conda config --set auto_activate_base false #取消conda自动启动base

i3.different types of machine learning

Q. What Are the Different Types of Machine Learning?

Supervised learning

A model makes predictions or decisions based on past or labeled data. Labeled data refers to sets of data that are given tags or labels, and thus made more meaningful.

Unsupervised learning

In this case, we don’t have labeled data, a model can identify patterns, anomalies, and relationships in the input data.

Reinforcement learning

The model learn based on the rewards received from the previous action.

lc2.Add Two Numbers

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.

You may assume the two numbers do not contain any leading zero, except the number 0 itself.

Example 1:

https://cdn.jsdelivr.net/gh/JoshuaChou2018/oss@main/uPic/addtwonumber1.jpg

1
2
3
Input: l1 = [2,4,3], l2 = [5,6,4]
Output: [7,0,8]
Explanation: 342 + 465 = 807.

Example 2: