Nine Rivers

Molecular modeling in Materials Sciences Web development Programming IT

Entries for the ‘Programming’ Category

Internal overflow compressing coordinates

I occasionally got this error while running some mpi programs. I could not find the exact reason. Even when I google it, it seems no relevant explanation of it. By investigating the codes with debugger, I notices some data in the memory are huge, when I correct them, the error information was gone too. Therefore [...]

An MPI implementation I didn’t know before

DeinoMPI is an implementation of MPI-2 for Microsoft Windows. DeinoMPI is a derived work from MPICH2 provided by Argonne National Lab.  By starting with the MPICH2 code base DeinoMPI inherits a stable and complete implementation of the MPI-2 standard.  DeinoMPI heavily modifies the original code base and does not rely on anything from Argonne National [...]

为了环保也要提高代码效率!

目前全球有约10亿台计算机,每台按100Wh实际功率计算,总功率为1亿千瓦时。也就是说每小时耗电量为1亿千瓦。按计算机一天工作10小时计算,一天全球消耗总电量为10亿千瓦时。世界超大型水电站(如三峡电站)在汛期全部机组开动发电量不过4亿千瓦时(参见)。意味着我们需要2-3个这样的超大水电站全负荷供电才能满足基本需求。我们知道,建设一个这样的电站要耗费数以亿计的金钱和数十年的人工。但是,如果作为程序员,往往可以轻易地提高编码质量和运行效率以达到节省计算时间的目的,变相地节约了宝贵的能源,有利于保护地球环境。我觉得如果所有程序员都朝这个方向努力,每天节省一个三峡电站的电量是完全可能的。

Control file extensions of Notepad2

By default Notepad2 add a .txt extension to the file name when you save a newly created file. For files already having extensions, this will not be done. However, this is sometimes annoying if you often create files which do not use txt as extension although they are actually plain text files. I think this [...]

用VC和gcc同时编译unicode编码的c++源程序

经常在C++程序中加入中文注释,但是如果使用不同的编辑器,编码识别或转换不当,会导致非ASCII字符乱码。

禁用Visual Studio的Addins

某些VS的Addins会导致程序异常缓慢或出错,一个小技巧是在启动VS的时候提前按住左边的shift键,即可禁止加载所有插件。

Print directory tree on Windows and Linux using tree, sed, awk or Python

Windows http://chxkyy.javaeye.com/blog/213864

Formlayout – an user-friendly way to interact

Bash: exit codes for background jobs

Useful commands: wait <pid>: wait the background job with specified pid to be finished and return the exit code ( hint: stored in $? ) jobs -p: list the pids of all the background jobs (hint: use for statement of bash to loop over each process) ( sleep 30s; /bin/false ) & : generate a [...]

Lammps performance with different compilers

This is just a rough comparison of the influence of compilers on the performance of lammps code on a VIC3.

Your Name (required)

Your Email (required)

Subject

Your Message

留言类型: 一般留言 交换链接

captcha

Enter the validation code here: