cat /proc/cpuinfo
cat /proc/meminfo
ethtool -i eth0
df -h
lsb_release -a
getconf LONG_BIT
uname -a
zzfrom:http://hi.baidu.com/ganss/blog/item/656b095432b65f56574e0074.html
除了最简单的运行gcc/g++ filename(这样只能运行最简单的小程序)外,GCC都需要用各种选项来实现其强大的功能。
下面是GCC的一些常用选项描述:
生成特定格式的文件:
-E 只激活预处理,但不生成文件,需要把它重定向到一个输出文件里面。例子:
gcc -E hello.c > pianoapan.txt
gcc -E hello.c | more
-C 在预处理的时候,不删除注释信息,一般和-E使用,有时候用这个分析程序很方便。
-S 只激活预处理和编译,就是指把文件编译成为汇编代码。
例子: gcc -S hello.c
-c 只激活预处理,编译,和汇编,也就是他只把程序做成obj文件
例子: gcc -c hello.c
-o 指定目标文件名称,例子:
gcc -o hello hello.c
使用ps3,调用blas函数时,考察函数花费时间,发现还不如不使用使用spe的blas优化实现,即cellsdk的blas实现花费的时间要比netlib的那个blas实现时间还多.
编译过程分别如下:
使用cellsdk的blas库实现:
mpicc data_plot.c -I/opt/cell/sdk/usr/include/ -Wall -L . /home/duanple/hete_show/hete_lib/src/hetelib.a -lblas -lspe2 -lm -lnuma
env BLAS_NUMSPES=5 BLAS_HUGE_FILE=/home/duanple/huge/blas_lib.bin numactl –cpunodebind=0 –membind=0 ./a.out
使用netlib的实现:
make plot
mpicc data_plot.c -I/opt/cell/sdk/usr/include/ -Wall -L . /home/duanple/hete_show/hete_lib/src/hetelib.a /home/duanple/CBLAS/lib/LINUX/cblas_LINUX.a /home/duanple/BLAS/blas_LINUX.a
./a.out
cell上的编译命令:
/usr/bin/ppu32-gcc -o blas_dblat1 blas_dblat1.o -Wl,-rpath /usr/lib -L/opt/cell/sdk/usr/lib -R/opt/cell/sdk/usr/lib -m32 -Wl,-m,elf32ppc /usr/lib/libblas.so -lspe2 -lm -lnuma
注意malloc和free内存使用的头文件及函数
#include <malloc_align.h>
#include <free_align.h>
http://www.91linux.com/html/article/network/20090120/15461.html
一,什么情况下需要远程开机?
如果我们的服务器没有部署在本地(实际上通常都是这样的,我们会把服务器托管到IDC机房),
而且服务器在机房中不止一台,其中一台被关闭时,则我们可以远程连接一台没有关机的服务器上,
然后进行远程开机.
二,远程开机需要的软件
它需要wakeonlan这个软件,
从何处得到它?
它的官方站是:http://sourceforge.net/projects/wake-on-lan/
如果使用rpm包可以从这里下载:http://dag.wieers.com/rpm/packages/wol/
如果使用fedora,则可以用yum命令安装:
yum install wol
三,如何进行远程开机?
先不要急着去关闭你的linux服务器,你首先要确定它是否支持远程开机?
第一步:登录到目标服务器,用ethtool这个命令打印出网卡的信息
[root@localhost lhd]# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
先看个网址:yellow dog的论坛: http://www.yellowdog-board.com/viewforum.php?f=19
安装完yellow dog 6.2之后发现只有一些cell的编译工具,却没有发现需要使用的一些开发包,重新将安装盘mount作为repo。
[root@cell-node1 dev]# mount /dev/cdrom /mnt/yd6cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@cell-node1 dev]# cd /mnt/yd6cdrom
[root@cell-node1 yd6cdrom]# ls
etc eula.txt images LICENSE ppc PS3 RELEASE-NOTES RELEASE-NOTES.en repodata RPM-GPG-KEY TRANS.TBL YellowDog
[root@cell-node1 yd6cdrom]#
如果不加入MPI的通信函数,比如只有MPI_Init MPI_Finalize,或者一些本地操作,二者可以正确互联,但是如果加入mpi操作,则出现如下操作。
[node2][[44798,1],0][btl_tcp_endpoint.c:638:mca_btl_tcp_endpoint_complete_connect] connect() to 10.10.4.70 failed: No route to host (113)
ifconfig:
ifconfig eth0
ifconfig eth0 192.168.0.1 netmask 255.255.255.0
ifconfig eth0 up
ifconfig eth0 down
gateway:
# route add default gw 192.168.30.1 eth0
dns:
# vi etc/resolv.conf
nameserver 202.131.80.1
nameserver 202.131.80.5
zzfrom:http://www.ydl.net/support/solutions/ydl_6.x/
The following were prepared by Fixstars staff or the greater YDL community and are specific to Yellow Dog Linux v.6.0 and v.6.1.
Installation, Updates, & Applications:
How to locate your lost E17 Shelf. How to install/remove applications using the Package Manager. How to update applications using the Package Updater. How to update, install, remove local packages using yum. How to update BMC on a PowerStation How to use =&2=&zzfrom:http://www.ydl.net/support/solutions/ydl_6.x/video-config.shtml
Introduction
The PS3 is both a game console and a computer. Game consoles traditionally output to TV screens, computers traditionally output to computer monitors. TV screens and computer monitors have very little in common. The PS3 can output to both, and can also output to High-Definition (HD) TV screens. Since this involves several completely different sets of standards, things can get complex. This HOWTO will show you how to make your selected PS3 video mode permanent.
zzfrom:http://www.terrasoftsolutions.com/support/solutions/ydl_5.0/video-config.shtml
ntroduction
The PS3 is both a game console and a computer. Game consoles traditionally output to TV screens, computers traditionally output to computer monitors. TV screens and computer monitors have very little in common. The PS3 can output to both, and can also output to High-Definition (HD) TV screens. Since this involves several completely different sets of standards, things can get complex. This HOWTO will show you how to make your selected PS3 video mode permenant.
PS3 上 Linux 安装的默认显示配置取决于您的安装方法。如果您正在使用一个普通的 NTSC 或 PAL 电视机(而不是 HDTV 或连接到监视器的 VGA 转换器),就无法使用 YDL 的图形安装模式,因为它会试图设置一个更高的扫描分辨率。
参考文章:
拼了,冲精华,最新YellowDogLinux 6.2 for PS3专贴、
HowTo: Fullscreen on a 1080p HDTV
修改分辨率:
# vim /boot/etc/yaboot.conf
找到append="video=ps3fb:mode:5 rhgb quiet root=LABEL=/1"
修改mode后面的参数:比如上面的5,如果想全屏,需要再在这些id+128,比如5+128=133
Video mode ID:
0:auto mode
YUV 60Hz 1:480i 2:480p 3:720p 4:1080i 5:1080p
YUV 50Hz 6:576i 7:576p 8:720p 9:1080i 10:1080p
RGB 60Hz 33:480i 34:480p 35:720p 36:1080i 37:1080p
RGB 50Hz 38:576i 39:576p 40:720p 41:1080i 42:1080p
VESA 11:WXGA 12:SXGA 13:WUXGA
CBLAS是BLAS的C语言接口。BLAS的全称是Basic Linear Algebra Subprograms,中文大概可以叫做基础线性代数子程序。主要是用于向量和矩阵计算的高性能数学库。本身BLAS是用Fortran写的,为了方便 C/C++程序的使用,就有了BLAS的C接口库CBLAS。BLAS的主页是http://www.netlib.org/blas/,CBLAS的下 载地址也可以在这个页面上找到。
测试Open MPI的安装
命令"ompi_info"可用来检测Open MPI的安装状态。该命令会返回 一个关于你的Open MPI安装的大概信息。
Note that the ompi_info command is extremely helpful in determining which components are installed as well as listing all the run-time settable parameters that are available in each component (as well as their default values).
有时候发现,曾经在何时丢失了重要的东西,心里总会有空空的感觉。有时候发现,总是在何时掩藏了真正的心意,于是会发现坦白真的需要勇气。人的内心真是一种复杂的东西,总会寻找着自己珍视的东西,却也害怕拥有珍视的东西,害怕有一天会把它丢掉,总会不断的错过。得到了一些,又总会失去一些,无法珍视得到的,也就无法得到珍视的。
include 文件 <inttypes.h> 提供有助于使代码与显式指定大小的数据项兼容(无论编译环境如何)的常量、宏和派生类型。它包含用于处理 8 位、16 位、32 位和 64 位对象的机制。该文件是新的 1999 ISO/IEC C 标准的一部分,文件内容反映了导致它包含在 1999 ISO/IEC C 标准中的建议。文件即将更新,以便完全与 1999 ISO/IEC C 标准一致。<inttypes.h> 提供的基本功能包括:
最近遇到一个超级难查的错误,一方面所因为程序所MPI并行程序,很难debug,基本没有啥可用的调试工具。其实之前用ubuntu编译完mpi程序后,执行即出现了错误,虽然没有解决,但我怀疑所环境问题。可能某些链接库的版本不对。
所以我用centos编译的open mpi是可以的,但是在将我的32位机与64位机并行时,在处理简单的程序时是没有问题的。
如下:
#include "mpi.h"
#include <stdio.h>
#include <math.h>
int main(int argc,char ** argv)
{
int myid, numprocs;
int namelen;
int type_size;
char processor_name[MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Get_processor_name(processor_name,&namelen);
fprintf(stderr,"Hello World! Process %d of %d on %s\n",myid, numprocs, processor_name);
zz from:http://zsxxsz.javaeye.com/blog/470359
关键字: c语言,数据类型,32位,64位
1、概述
C语言有一些非常基本的数据类型,正是这些基本类型让我们可以延伸了无限的用户自定义类型,本文主要介绍了 int, size_t, time_t, long, long long int 等基本数据类型在Linux32 及 Linux64 的使用情况。表面看上去,这些类型确实太基础太简单,似乎没啥可讲的,实事似乎也是如此,用过C的对这些都已经非常熟悉了,这还用讲?在PC 64位机器 出来之前,我们确实不用太关注这些,因为在32位机上编程,似乎很少出现过什么问题,但64位机出来了,象Linux 也支持64位机器,问题就来了,为什么?因为它们的长度发生了变化,而我们的程序也就有可能需要改变一下。








