ubuntu测试 ubuntu返回图形界面

老铁们,大家好,相信还有很多朋友对于ubuntu测试和ubuntu返回图形界面的相关问题不太懂,没关系,今天就由我来为大家分享分享ubuntu测试以及ubuntu返回图形界面的问题,文章篇幅可能偏长,希望可以帮助到大家,下面一起来看看吧!

ubuntu查看版本信息命令(详解三个方法查看ubuntu系统版本信息)

Ubuntu系统版本查询详解

Ubuntu相比于RedHat与CentOS,体积更小且更为简洁,适合用于测试环境。在命令行中检测Ubuntu版本有多种方法,下面详细介绍三种常用方法。

方法一:使用lsb_release实用程序

lsb_release是一个显示Linux发行版LSB信息的实用程序,适用于检测Ubuntu版本。无论运行何种桌面环境或Ubuntu版本,均可使用此方法。

执行命令:lsb_release-a,查看Description行获取Ubuntu版本信息。

从输出结果可以看出,当前系统使用的是Ubuntu 14.04 LTS。

若仅需查看Description行信息,可执行:lsb_release-d。

方法二:使用cat命令

通过cat命令读取包含系统标识文本的文件,可获取Ubuntu版本信息。

方法一:执行命令:cat/etc/issue,显示文件内容。

方法二:在运行systemd的较新Ubuntu版本上,执行命令:cat/etc/os-release,获取操作系统标识数据。

方法三:使用hostnamectl命令

hostnamectl命令允许用户设置主机名,同时也能用于检查Ubuntu版本。

执行命令:hostnamectl,查看Ubuntu版本信息。

个人更偏好使用cat/etc/issue命令来查看Ubuntu版本。你的习惯是怎样的呢?

ubuntu benchmark怎么进行测试

一、Linpack简介

Linpack是国际上最流行的用于测试高性能计算机系统浮点性能的benchmark。通过对高性能计算机采用高斯消元法求解一元N次稠密线性代数方程组的测试,评价高性能计算机的浮点性能。

Performance Linpack,也叫高度并行计算基准测试,它对数组大小N没有限制,求解问题的规模可以改变,除基本算法(计算量)不可改变外,可以采用其它任何优化方法。前两种测试运行规模较小,已不是很适合现代计算机的发展。

HPL是针对现代并行计算机提出的测试方式。用户在不修改任意测试程序的基础上,可以调节问题规模大小(矩阵大小)、使用CPU数目、使用各种优化方法等等来执行该测试程序,以获取最佳的性能。HPL采用高斯消元法求解线性方程组。求解问题规模为N时,浮点运算次数为(2/3* N^3-2*N^2)。因此,只要给出问题规模N,测得系统计算时间T,峰值=计算量(2/3* N^3-2*N^2)/计算时间T,测试结果以浮点运算每秒(Flops)给出。HPL测试结果是TOP500排名的重要依据。

二、Linpack安装与测试

1. Linpack安装条件:

在安装HPL之前,系统中必须已经安装了编译器、并行环境MPI以及基本线性代数子方程(BLAS)或矢量图形信号处理库(VSIPL)两者之一。

在Ubuntu下,使用apt-get安装gfortran,mpich2,每个计算节点都需要安装

安装完后,可先使用mpicc编译helloworld验证mpi集群是否工作正常

hpl linpack缺省配置是使用atlas的库,所以这里我们安装ATLAS

参考

根据atlas的安装文档,首先要switch off cpu throttling.首先安装cpufrequtils和cpufreqd这两个包,也许还要安装powernowd包

从下载atlas

cd ATLAS

mkdir build

cd build

../configure

make

编译没有问题的话会在lib目录下生成几个静态库

2.安装与编译Linpack:

第一步,从www.netlib.org/benchmark/hpl网站上下载HPL包hpl.tar.gz并解包

cd hpl-2.1

cp setup/Make.Linux_PII_CBLAS_gm Make.x86_64

vi Make.x86_64

修改下列配置:

ARCH= x86_64

TOPdir=$(HOME)/projects/hpl-2.1

LAdir=$(HOME)/projects/ATLAS/build/lib

LAinc=

LAlib=$(LAdir)/libcblas.a$(LAdir)/libatlas.a

然后开始编译:

make arch=x86_64

如果出现符号找不到的问题,请检查LAlib的库的位置

cd bin/x86_64

在这个目录下生成了两个文件, HPL.dat是linpack计算的配置文件, xhpl是测试程序

这里有关于HPL.dat的配置说明:

其中几个重要的参数(必须针对集群环境修改)

1#表示只做一次计算,使用下面的第一个数

100000 30 34 35 Ns#矩阵大小,为了测试性能,一般取N*N*8~内存总量,集群时考虑总内存量

1# of NBs

192 2 3 4 NBs#分块大小,经验值192

4 1 4 Ps# PxQ应该等于整个集群的进程数,一般等于cpu核数

16 4 1 Qs# P一般<=Q

如果是单机,可以运行mpiexec-n 64./xhpl来看一下是否工作正常。

对于集群,首先需要保证所有机器的可以相互使用ssh无密码登录(比如要从s1登录到s2,需要把s1上的.ssh/id_rsa.pub内容拷贝到s2的.ssh/authorized_keys里。

然后创建mpi_hosts文件,内容就是集群内各机器名称,每个机器一行。

在每个机器上,都需要有相同的用户,以及同样的hpl-2.1路径和文件HPL.data,xhpl程序

运行mpiexec-n 64-f mpi_hosts,./xhpl

注意:

1.矩阵不能太小,要保证矩阵数据可以占用大量内存,运行时可以free来查看内存使用量,用top,然后按1来查看cpu每个核的使用情况

2.节点间数据传输量比较大,应该使用万兆网络,否则网络会成为瓶颈。

3.本文只是为了验证,并不是为了优化benchmark。如果要达到更好的benchmark数值,应该使用优化的blas库,比如intel的mkl。intel的mkl本身就带了linpack测试程序

ubuntu14.04怎么测试cuda是否安装成功

首先,我装的系统是Ubuntu 14.04.1。

1.预检查

按照参考链接1中所示,检查系统。

执行命令:

:~$ lspci| grep-i nvidia

03:00.0 3D controller: NVIDIA Corporation GK110GL [Tesla K20c](rev a1)

04:00.0 VGA compatible controller: NVIDIA Corporation GK106GL [Quadro K4000](rev a1)

04:00.1 Audio device: NVIDIA Corporation GK106 HDMI Audio Controller(rev a1)

发现有K20和K4000两块GPU,还有一块Audio的应该是声卡。

然后,执行命令检查系统版本:

~$ uname-m&& cat/etc/*release

x86_64

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=14.04

DISTRIB_CODENAME=trusty

DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

NAME="Ubuntu"

VERSION="14.04.1 LTS, Trusty Tahr"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 14.04.1 LTS"

VERSION_ID="14.04"

HOME_URL=""

SUPPORT_URL=""

BUG_REPORT_URL=""

可以看到,机器是ubuntu14.04的版本。

然后,使用gcc--version检查gcc版本是否符合链接1中的要求:

~$ gcc--version

gcc(Ubuntu 4.8.2-19ubuntu1) 4.8.2

Copyright(C) 2013 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

检查完毕,就去nvidia的官网(参考链接3)上下载驱动,为下载的是ubuntu14.04的deb包。

2.安装

Deb包安装较为简单,但是安装过程中提示不稳定,不过用着也没啥出错的地方。

先按照参考链接2安装必要的库。

sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev

还是按照官网上的流程来。

$ sudo dpkg-i cuda-repo-<distro>_<version>_<architecture>.deb

$ sudo apt-get update

$ sudo apt-get install cuda

可能需要下载较长时间,但是没关系,放在那等着就是。

没啥问题就算安装好了。

安装过程中提示:

*** Please reboot your computer and verify that the nvidia graphics driver is loaded.***

*** If the driver fails to load, please use the NVIDIA graphics driver.run installer***

*** to get into a stable state.

我没管,提示使用.run安装比较稳定,但我现在用着没问题。

3.配置环境

我的系统是64位的,因此配置环境时在.bashrc中加入

$ export PATH=/usr/local/cuda-6.5/bin:$PATH

$ export LD_LIBRARY_PATH=/usr/local/cuda-6.5/lib64:$LD_LIBRARY_PATH

配置完环境后,执行命令

~$ source.bashrc

使其立刻生效。

4.安装sample

配置好环境后,可以执行如下命令:

$ cuda-install-samples-6.5.sh<dir>

这样,就将cuda的sample拷贝到dir文件夹下了。该命令只是一个拷贝操作。

然后进入该文件夹,执行make命令进行编译,编译时间较长,需要等待。

5.验证安装是否成功

5.1.驱动验证

首先,验证nvidia的驱动是否安装成功。

~$ cat/proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module 340.29 Thu Jul 31 20:23:19 PDT 2014

GCC version: gcc version 4.8.2(Ubuntu 4.8.2-19ubuntu1)

5.2. Toolkit验证

验证cuda toolkit是否成功。

~$ nvcc-V

nvcc: NVIDIA(R) Cuda compiler driver

Copyright(c) 2005-2014 NVIDIA Corporation

Built on Thu_Jul_17_21:41:27_CDT_2014

Cuda compilation tools, release 6.5, V6.5.12

5.3.设备识别

使用cuda sample已经编译好的deviceQuery来验证。deviceQuery在<cuda_sample_install_path>/bin/x_86_64/linux/release目录下。我的结果如下,检测出了两块GPU来。

~/install/NVIDIA_CUDA-6.5_Samples/bin/x86_64/linux/release$./deviceQuery

./deviceQuery Starting...

CUDA Device Query(Runtime API) version(CUDART static linking)

Detected 2 CUDA Capable device(s)

Device 0:"Tesla K20c"

CUDA Driver Version/ Runtime Version 6.5/ 6.5

CUDA Capability Major/Minor version number: 3.5

Total amount of global memory: 4800 MBytes(5032706048 bytes)

(13) Multiprocessors,(192) CUDA Cores/MP: 2496 CUDA Cores

GPU Clock rate: 706 MHz(0.71 GHz)

Memory Clock rate: 2600 Mhz

Memory Bus Width: 320-bit

L2 Cache Size: 1310720 bytes

Maximum Texture Dimension Size(x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)

Maximum Layered 1D Texture Size,(num) layers 1D=(16384), 2048 layers

Maximum Layered 2D Texture Size,(num) layers 2D=(16384, 16384), 2048 layers

Total amount of constant memory: 65536 bytes

Total amount of shared memory per block: 49152 bytes

Total number of registers available per block: 65536

Warp size: 32

Maximum number of threads per multiprocessor: 2048

Maximum number of threads per block: 1024

Max dimension size of a thread block(x,y,z):(1024, 1024, 64)

Max dimension size of a grid size(x,y,z):(2147483647, 65535, 65535)

Maximum memory pitch: 2147483647 bytes

Texture alignment: 512 bytes

Concurrent copy and kernel execution: Yes with 2 copy engine(s)

Run time limit on kernels: No

Integrated GPU sharing Host Memory: No

Support host page-locked memory mapping: Yes

Alignment requirement for Surfaces: Yes

Device has ECC support: Enabled

Device supports Unified Addressing(UVA): Yes

Device PCI Bus ID/ PCI location ID: 3/ 0

Compute Mode:

< Default(multiple host threads can use::cudaSetDevice() with device simultaneously)>

Device 1:"Quadro K4000"

CUDA Driver Version/ Runtime Version 6.5/ 6.5

CUDA Capability Major/Minor version number: 3.0

Total amount of global memory: 3071 MBytes(3220504576 bytes)

( 4) Multiprocessors,(192) CUDA Cores/MP: 768 CUDA Cores

GPU Clock rate: 811 MHz(0.81 GHz)

Memory Clock rate: 2808 Mhz

Memory Bus Width: 192-bit

L2 Cache Size: 393216 bytes

Maximum Texture Dimension Size(x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)

Maximum Layered 1D Texture Size,(num) layers 1D=(16384), 2048 layers

Maximum Layered 2D Texture Size,(num) layers 2D=(16384, 16384), 2048 layers

Total amount of constant memory: 65536 bytes

Total amount of shared memory per block: 49152 bytes

Total number of registers available per block: 65536

Warp size: 32

Maximum number of threads per multiprocessor: 2048

Maximum number of threads per block: 1024

Max dimension size of a thread block(x,y,z):(1024, 1024, 64)

Max dimension size of a grid size(x,y,z):(2147483647, 65535, 65535)

Maximum memory pitch: 2147483647 bytes

Texture alignment: 512 bytes

Concurrent copy and kernel execution: Yes with 1 copy engine(s)

Run time limit on kernels: Yes

Integrated GPU sharing Host Memory: No

Support host page-locked memory mapping: Yes

Alignment requirement for Surfaces: Yes

Device has ECC support: Disabled

Device supports Unified Addressing(UVA): Yes

Device PCI Bus ID/ PCI location ID: 4/ 0

Compute Mode:

< Default(multiple host threads can use::cudaSetDevice() with device simultaneously)>

> Peer access from Tesla K20c(GPU0)-> Quadro K4000(GPU1): No

> Peer access from Quadro K4000(GPU1)-> Tesla K20c(GPU0): No

deviceQuery, CUDA Driver= CUDART, CUDA Driver Version= 6.5, CUDA Runtime Version= 6.5, NumDevs= 2, Device0= Tesla K20c, Device1= Quadro K4000

Result= PASS

这样,cuda就安装成功了。

阅读剩余
THE END