Tuesday, February 19, 2013

compile CPMD+PLUMED on a cray XT 5 machine

1. cd CPMD
2. export plumedir= your plumed directory
3. cp $plumedir/patches/cpmdpathcfile to current directory.
4. ./mkconfig.sh CRAY-XT4 > Makefile
5. ./cpmdpatch -patch
6. vi Makefile, and make following changes:
    change all XT4 to XT5.
    delete the -fno-exceptions in cflags.
7. make
after a long screen output, you should have cpmd.x executable file.

Note: Other MPI compiler wrappers such as mpiccmpicxxmpif77 and mpi90 may be not available in cray, not as in the intel/sun machine.
   

some knowledge about compilation on different architecture

Recently I am compiling some serial and parallel software packages.
Some often used abbreviations are listed below.

Before you compile the software, be sure that you know the architecture of the machine you will install. Is it IBM, CARY, or SUN? Generally speaking, the hardware could be very different, but the software OS is Unix/Linux.   

Now let's talk the compilers. The two most common languages are Fortran and C/C++ for scientific calculations. So you need know the compilers for both languages.

Several most often used Fortran compilers:
Intel: ifort
The Portland Group, Inc: pgf77, pgf90, pghpf
G95 project: g95
GNU (free software union) project: gfortran (forked off from g95)

Several most often used C/C++ compilers:
Intel: icc
The Portland Group, Inc: pgcc (for C), pgCC (for C++), 

GNU (free software union) project: gcc, gCC (cc and CC in fact are similar like gcc and gCC. However, cc or CC is a standard Unix compiler while gcc or gCC is produced by GNU.)


Often used mathematical library
MKL library from INTEL including Linear Algebra, Fast Fourier Transforms (FFT), Vector Math and Statistics. Cluster-based versions of LAPACK and FFT are also included to support MPI-based distributed memory computing.
 fftw from FFTW.org
 BLAS and LAPACK for linear algebra.
 
Parallel tools:
OPENMPI
MPICH


Wednesday, February 6, 2013

How to write a science paper?

I am deeply influenced by Chairman Mao, the former Chinese communist leader. He has mentioned the famous three paragraph writing: what is the definition of your research, why we do this research, and how we will do. I think it works for all the social, engineering, and science manuscript writing.

What is the definition of your research? Or what is the problem?
You need briefly introduce the background of your research, clearly narrow your research fields, give the conditions, and explain the limitation.
For example, if you study a kind of metal alloy, firstly, you should explain to your readers how the alloy is frequently used. You need specify the ratio of different metals, working conditions of this alloy, and general uses of the alloy.
And what is the problem of current alloy or related research.

Why we do this research?
You should briefly list two or three important points.
For example, for the alloy: Why the problem deserves further research? The challenges and future benefits if we make better alloy. And what can we do?

how we will do?
We can claim we improve some physical properties for this alloy by adding some elements. How we add elements? We can list the experimental procedures, conditions, device information, etc. How we test the new products? We can show how we measure the properties of the new alloy: Melting points, force constants, etc.

Finally, in the conclusion part, we can summarize the results, future influences of new alloy, and what we can do to improve it in the future.


Monday, February 4, 2013

Install JAVA plugin in Firefox in an Redhat Linux box

First, you need make sure you have JAVA installed.
For Redhat, you should use RPM based JAVA installation.

1. Open a terminal, type command "java -version" to make sure that you have the newest JAVA installed.
2. In general, the java should be installed here: /user/java
3. Use following command to make sure you enable JAVA in firefox.
    "ls ~/mozilla/plugins/"
    If it is empty, you need link java to this directory.
4. Use command "ln -s /usr/java/default/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/".
5. Be careful if there are many versions of JAVA in /usr/java directory, please use default one. Otherwise you will have conflicts because the firefox can only load one JAVA version.
6. If you have old version in ~/.mozilla/plugins/ directory, you should delete it.
7. Go to JAVA test page: "http://www.java.com/en/download/testjava.jsp", now you should be able to see the JAVA runs now.