2014年10月19日

摘要: // MPI1.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "mpi.h"#include #include #include int main(int argc, char* argv[]){ int done=0,n,myid,numpro... 阅读全文
posted @ 2014-10-19 11:11 程序+爱=人生 阅读(798) 评论(0) 推荐(0) 编辑

2014年10月17日

摘要: 配置MPI经历了不少波折,把这些经历记录下来,告诫后来人。1.版本要对下载MPI,去官方网站http://www.mpich.org/downloads/选择x86-64版本2.步骤要对1)点击mpich2-1.4.1p1-win-x86-64.msi运行2)一直next下去,当选择安装目录的时候根... 阅读全文
posted @ 2014-10-17 19:08 程序+爱=人生 阅读(651) 评论(0) 推荐(0) 编辑

2014年9月26日

摘要: // EnumSort.cpp : 定义控制台应用程序的入口点。//枚举排序/*枚举排序(Enumeration Sort)是一种最简单的排序算法,通常也称为秩排序(Rank Sort)。该算法的具体思想是(假设按关键字递增排序),对每一个待排序的元素统计小于它的所有元素的个数,从而得到该元素最终处... 阅读全文
posted @ 2014-09-26 10:01 程序+爱=人生 阅读(332) 评论(0) 推荐(0) 编辑

2014年9月24日

摘要: // Pi.cpp : 定义控制台应用程序的入口点。//求圆周率PI#include "stdafx.h"#include #include #include #include using namespace std;static long num_steps=1000000000;//定义所分的块... 阅读全文
posted @ 2014-09-24 11:16 程序+爱=人生 阅读(1525) 评论(0) 推荐(0) 编辑
 
摘要: // Sum_section.cpp : 定义控制台应用程序的入口点。//section功能:;//1.指定其内部的代码划分给线程中某个线程,不同的section由不同的线程执行;//2.将一个任务划分成独立的几个section,且section之间是并行执行的;#include "stdafx.h... 阅读全文
posted @ 2014-09-24 11:02 程序+爱=人生 阅读(1012) 评论(0) 推荐(0) 编辑

2014年9月14日

摘要: 1.首先,下载32位的MPICH2,(注意哦,是32位,不是64位)http://202.117.4.228/files/B117000000042632/www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.4.1p1/mpic... 阅读全文
posted @ 2014-09-14 10:34 程序+爱=人生 阅读(2890) 评论(0) 推荐(0) 编辑

2014年8月29日

摘要: 第一步:下载eclipse-jee-kepler-SR2-linux-gtk-x86_64.tar.gz注意:如果电脑是64位,就下载linux下的64位eclipse,不要下载32位的eclipse,不然会无法启动eclipse第二步:下载最新版本的hadoop插件重命名:将下载的插件重命名为"h... 阅读全文
posted @ 2014-08-29 10:36 程序+爱=人生 阅读(264) 评论(0) 推荐(0) 编辑

2014年8月21日

摘要: 关于字符串函数的应用细则,例子程序 – jerny函数名: stpcpy 功 能: 拷贝一个字符串到另一个 用 法: char *stpcpy(char *destin, char *source); 程序例: #include #include int main(void) { ch... 阅读全文
posted @ 2014-08-21 13:11 程序+爱=人生 阅读(295) 评论(0) 推荐(0) 编辑
 
摘要: C、传统 C++ #include //设定插入点 #include //字符处理 #include //定义错误码 #include //浮点数处理 #include //文件输入/输出 #include //参数化输入/输出 #include //数据流输入/输出 #include... 阅读全文
posted @ 2014-08-21 12:53 程序+爱=人生 阅读(216) 评论(0) 推荐(0) 编辑
 
摘要: 1:字符数组换为字符串见代码[cpp]view plaincopyprint?#include#includeusingnamespacestd;intmain(){chara[10]="aaaabbbba";strings(&a[0],&a[strlen(a)]);cout#includeusin... 阅读全文
posted @ 2014-08-21 10:44 程序+爱=人生 阅读(242) 评论(0) 推荐(0) 编辑