自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(302)
  • 资源 (1)
  • 收藏
  • 关注

转载 Linux / Unix IO

IO分类标准IO: fopen, fread, fwrite, fseek, fclose, ...系统IO: open, read, write, readv, writev, pread, pwrite, close, fstat, fcntl, select,...异步IO: aio_read, aio_write, lio_listio, aio_error, aio_return

2012-10-23 11:29:00 436

转载 dd

打印SEGY数据3200字节文件头: dd if=segy.data bs=3200 count=1 conv=edcdic打印SEGY数据400字节二进制文件头:dd if=segy.data bs=400 skip=8 count=1 conv=swap | od -d说明,conv=swab只能对付两字节的short类型数据

2012-10-23 11:26:13 1060

转载 The elements of programming style

Write clearly - don't be too clever  清晰是最重要的,不要耍聪明Say waht you mean, simply and directly 词要达意Use library functions 不要重造轮子Avoid temprorary variables 避免滥用临时变量Write clearly - don't sacrifice clar

2012-10-23 11:25:23 822

转载 MPI提供分布式数据服务

借助MPI功能可以提供一种分布式数据服务。多个服务节点通过MPI_COMM形式组成一个逻辑服务器,维护一个“逻辑”上的数据文件,数据文件可能会分布存储在每个服务节点本地盘上,客户端可以从服务节点群获取数据!好处:每个服务节点可以利用本地磁盘和内存,提高响应时间适合:数据只读操作,e.g.,按关键字浏览相关函数:MPI_Comm_s

2012-10-23 11:24:20 871

转载 用MPI实现Hadoop Map/Reduce的TeraSort

http://emonkey.blog.sohu.com/166546157.html参与排序的MPI进程首先对输入文件进行划分,以确定每个进程计算的文件偏移量和长度,然后通过MPI-IO读取本进程需要排序的部分每个进程对要处理的数据用qsort进行本地排序,然后收集本进程的最小键值和最大键值,min_key, max_key,通过MPI_Allreduce()调用,每个进程获得全局的

2012-10-23 11:22:50 2364

转载 Libc学习

搜索和排序线性表搜索:lfind、lsearch、bsearch哈希搜索:hcreate、hdestroy、hsearch;hcreate_r、hdestroy_r、hsearch_r二叉树搜索:tsearch、tfind、tdelete、tdestroy、twalk模式匹配文件名匹配:fnmatchGlobbing: glob、glob64、wordexp、wor

2012-10-23 11:16:29 812

转载 关于MPI-IO

http://emonkey.blog.sohu.com/166467283.html1.基本概念进程私有文件指针:每个参与IO的进程都有一个私有的文件指针,进程间对该指针完全独立进程共享文件指针:所有参与IO的进程共享一个文件指针,任何进程对该指针的操作,都会同步更新其他进程中该指针文件视图:每个参与IO的进程都可以定义自有的文件视图,以表示本进程需读写文件哪些部分,以及这些

2012-10-23 11:14:58 3006

转载 安装MPI configure 配置

I was always confused with the parameters used in ./configure command. I did not know how to find the exact meaning of these parameters. Yesterday, I finally found the secrete: --help. After typin

2012-10-23 11:07:53 5340

转载 MPI-IO:Open/close/delete

MPI_FILE_OPEN(comm, filename, amode, info, fh)IN   comm    组内通信域IN   filename  将打开的文件名IN   amode    打开方式IN   info    传递给运行时的信息OUT   fh     返回的文件句柄int MPI_File_open(MPI_Comm comm, char * filename

2012-10-23 11:05:05 2505

转载 环境搭建

1.mac .profile[caoj7@cnencaoj7mbp2 99-tools]$cat ~/.profilealias grep='grep --color=auto'alias ll='ls -l'PS1='[\u@\h \W]\$'#autotoolsexport PATH=/Users/caoj7/program/common/bin:$PA

2012-10-22 17:58:29 522

转载 C语言字符串处理的库函数

使用C语言字符串处理的库函数,务必包含头文件string.h,即#include       1、 比较字符串大小函数         1) 忽略大小写---strcasecmp函数原型: int strcasecmp (const char *s1, const char *s2);函数说明: 用来比较参数s1和s2字符串,比较时会自动忽略大小写的差异

2012-10-22 08:05:09 662

转载 What is the different between a Cluster and MPP supercomputer architecture?

The difference is huge. I'll spare you the LMGTFY answer, although you really should try that sometime.In a cluster, each machine is largely independent of the others in terms of memory, disk, etc

2012-10-19 14:02:55 1049

转载 Lustre vs. HDFS

1. Challenges of Hadoop + HDFSHadoop cannot make task is data local absolutelySave big MapTask outputs in local Linux file system will get OS/disk I/O bottleneckReduce node need to use HTTP to s

2012-10-18 16:21:38 2937

转载 Why use HDFS over Lustre and / or GPFS?

Apache Hadoop: Why use HDFS over Lustre and / or GPFS?Curious to understand what some specific use cases would be for adopting HDFS as a file system over Lustre or GPFS. i.e. what kind o

2012-10-18 15:24:26 1194

转载 Update a driver in an initrd file

Update a driver in an initrd fileRecently I found myself wanting to put SUSE Linux Enterprise Desktop 11 SP1 on to machine with a Sandybridge chipset. This was a problem as the e1000e driver in SL

2012-10-18 07:45:18 633

转载 demod -a

The driver should have come with an installer script, that copies themodule to the correct directory your runtime kernel is using formodules. If the driver download is nothing but a .ko file, do yo

2012-10-17 17:35:13 855

转载 Linux modprobe Command Examples to View, Install, Remove Modules

modprobe utility is used to add loadable modules to the Linux kernel. You can also view and remove modules using modprobe command.Linux maintains /lib/modules/$(uname-r) directory for modules and

2012-10-17 17:28:51 752

转载 link: hard link vs. symbolic link

一 链接文件    链接有两种方式,软链接和硬链接。  1 软链接文件  软链接又叫符号链接,这个文件包含了另一个文件的路径名。可以是任意文件或目录,可以链接不同文件系统的文件。    链接文件甚至可以链接不存在的文件,这就产生一般称之为"断链"的问题(或曰“现象"),链接文件甚至可以循环链接自己。类似于编程语言中的递归。  用ln -s 命令可以生成一个软连接,如下:

2012-10-17 14:33:33 712

原创 lustre02: 安装

============================================1. Required Tools and Utilitiesa) e2fsprogs 见后面server和client安装b) which perlc) ssh /pdsh (recommended, optional)./configure --prefix=/usr/local

2012-10-16 14:53:43 1182

原创 lustre-01: 简介

------------------------------------2. Componentsa) MDSMDS target (MDT).b) OSS (Object Storage Server)OSS targets (OSTs)c) client Metadata Client (MDC), Object Storage Client (OSC), an

2012-10-16 14:47:33 692

转载 modprobe 命令

1、modprobe 命令是根据depmod -a的输出/lib/modules/version/modules.dep来加载全部的所需要模块。2、删除模块的命令是:modprobe -r filename3、系统启动后,正常工作的模块都在/proc/modules文件中列出。使用lsmod命今也可显示相同内容。4、在内核中有一个“Automatic kernel modu

2012-10-16 07:21:31 4288

转载 inux添加用户(user)到用户组(group)

将一个用户添加到用户组中,千万不能直接用: usermod -G groupA 这样做会使你离开其他用户组,仅仅做为 这个用户组 groupA 的成员。 应该用 加上 -a 选项: usermod -a -G groupA user-a 代表 append, 也就是 将自己添加到 用户组groupA 中,而不必离开 其他用户组。 命令的所有的选项,及其含义: O

2012-10-12 18:06:37 803

原创 shell-16: /etc/init.d/slurm-serverd

#!/bin/sh## chkconfig: 2345 80 50# description: slurm_server is for setup the socket at slurm side# # processname: slurm_server ## Source function library.. /etc/rc.d/init.d/funct

2012-10-11 17:14:58 917

转载 shell-15:if语句

if 语句格式if  条件then Commandelse Commandfi                              别忘了这个结尾If语句忘了结尾fitest.sh: line 14: syntax error: unexpected end of fi    if 的三种条件表达式

2012-10-11 15:07:34 611

原创 把之前slurm_server变成daemon

#include#include#include#include #include #include #include #include #include "socket_server.h"static void sig_term_func(int SIG){ if(SIG == SIGTERM){ syslog(LOG_INFO, "terminated.");

2012-10-11 14:02:44 418

转载 vi

在用户的家目录下,建立文件.vimrc;$vi .vimrc添加几行:set nu//设置行号set autoindentset ts=4 //这个是设置tap的大小为4个空格。ModesVi has two modes: insertion mode, and command mode.The editor begins in comman

2012-10-11 13:55:56 418

转载 find

This article lists some of the more useful ways of utilizing the find command.These commands will work on most Linux distributions, and have been tested on recent versions of Fedora.To find a

2012-10-11 13:53:20 521

转载 Kill -9 Why You Should Not Use It Unless Absolutely Necessary

It has come to my attention that there is a great wave of people out there that think using kill -9 on everything is a great idea. Who are these people and how did they acquire such an insidious habit

2012-10-11 13:47:35 956

转载 mac/linux终端光标的快捷键操作

常用的快捷键:Ctrl + d        删除一个字符,相当于通常的Delete键(命令行若无所有字符,则相当于exit;处理多行标准输入时也表示eof)Ctrl + h        退格删除一个字符,相当于通常的Backspace键Ctrl + u        删除光标之前到行首的字符Ctrl + k        删除光标之前到行尾的字符Ctrl + c

2012-10-11 11:33:18 9055 3

转载 一些Mac OS X技巧

重启Finder有些设置更改以后需要重启Finder才能生效,最简单的方法就是按住option,再右键点击Finder,选择“重新开启”。此外还可在终端运行如下代码:killall Finder更改文件关联方式右键选择显示简介,在“打开方式”一栏中选择想要使用的程序,然后点击“全部更改…”按钮。禁用虚拟内存Mac OS X有个很奇葩的设定,它把内存分为了可用内存

2012-10-11 11:30:47 2141

原创 ReadCode-001: memcpy memset bzero

#include #include #include struct student{ int age; char name[15];};typedef struct student student_t;int main(void) { student_t stu1, *stu1_ptr; stu1.age = 12; strcpy(stu1.name, "amao");

2012-10-10 14:23:36 762

转载 shell-14: linux awk 命令应用

linux awk 命令应用:awk的语法:awk [ -F re] [parameter...] ['prog'] [-f progfile][in_file...]参数说明:-F re:允许awk更改其字段分隔符。parameter: 该参数帮助为不同的变量赋值。'prog': awk的程序语句段。这个语句段必须用单拓号:'和'括起,以防被shell解释。这个程序语

2012-10-10 08:03:07 626

转载 linux 下 syslog 系统日志应用

syslog 系统日志应用 1) 概述      syslog是Linux系统默认的日志守护进程。默认的syslog配置文件是/etc/syslog.conf文件。程序,守护进程和内核提供了访问系统的日志信息。因此,任何希望生成日志信息的程序都可以向 syslog 接口呼叫生成该信息。      几乎所有的网络设备都可以通过syslog协议,将日志信息以用户数据报协议(UDP)方式传送

2012-10-10 08:02:12 1453

原创 make-003: 强大的Makefile

1.CC=gccCFLAGS=-g -Wallall:slurm_clientslurm_client: slurm_client.o config.o socket_client.o $(CC) $(CFLAGS) $^ -o $@%.o: %.c $(CC) $(CFLAGS) -c $< clean: rm -f *.o slurm_client2.

2012-10-09 17:47:51 485

转载 在Linux下编写Daemon

在Linux(以Redhat Linux Enterprise Edition 5.3为例)下,有时需要编写Service。Service也是程序,一般随系统启动用户不干预就不退出的程序,可以称为Service。Linux下的Service一般称为Daemon。 以上是广义的Service的定义。Linux下的服务一般放在/etc/init.d文件夹下。浏览一下这个文件夹下

2012-10-09 16:04:57 429

转载 shell-13: /etc/init.d/munge

[caoj7@node001 study]$ cat /etc/init.d/munge#!/bin/sh################################################################################ $Id: munge.init.in 890 2011-01-20 01:54:21Z chris.m.dunlap $##

2012-10-09 15:39:12 2039

原创 linux c中return 与exit的区别

1.return 是c语言中的关键字,而exit是linux中的系统调用。return是表示函数的返回,而exit是进程的终止。如果return 或者exit出现在main函数中,两者的作用是一样。如果return出现在子程序中表示返回,而exit出现在子进程中表示终止子进程。2.通常情况:exit(0)表示程序正常, exit(1)/exit(

2012-10-09 15:07:47 5472

原创 linux 守护进程 daemon (1)

Daemon程序简介        Daemon是长时间运行的进程,通常在系统启动后就运行,在系统关闭时才结束。一般说Daemon程序在后台运行,是因为它没有控制终端,无法和前台的用户交互。Daemon程序一般都作为服务程序使用,等待客户端程序与它通信。我们也把运行的Daemon程序称作守护进程。      比如,我们的网络服务程序,可以在完成创建套接口,绑定套接口,设置套接口为监听模式后

2012-10-09 14:14:44 1890

原创 syslog(),openlog(),closelog()

这里面的三个函数openlog, syslog, closelog是一套系统日志写入接口。另外那个vsyslog和syslog功能一样,只是参数格式不同。    通常,syslog守护进程读取三种格式的记录消息。此守护进程在启动时读一个配置文件。一般来说,其文件名为/etc/syslog.conf,该文件决定了不同种类的消息应送向何处。例如,紧急消息可被送向系统管理员(若已登录),并在控制台上

2012-10-09 14:07:35 427

转载 Linux常用C函数-文件权限控制篇

文件权限控制篇access,alphasort,chdir,chmod,chown,chroot,closedir,fchdir,fchmod,fchown,fstat,ftruncate,getcwd,link,lstat,opendir,readdir,readlink,remove,rename,rewind

2012-10-09 11:12:08 3914

嵌入式Linux开发入门

《嵌入式Linux开发入门》全书资料及其PPT

2011-10-24

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除