The most often used MPI (message passing interface), which are portable software to distribute and share memory in parallel clusters, and exchange data/information between different nodes, are
1. OPENMPI
2. MPICH
file types:
*.o file: objective file
*.a: a combination of multiple *.o files
*.so: shared object, similar to dynamic link library.
linking a *.so file
-L: list the file path.
-lmkl: link libmkl.so file.
two often used environmental variables in Linux.
LD_LIBRARY_PATH: In Linux, the environment variable LD_LIBRARY_PATH is a colon-separated set of directories where libraries should be searched for first, before the standard set of directories.
PATH: PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files (i.e., ready-to-run programs) in response to commands issued by a user. It increases both the convenience and the safety of such operating systems and is widely considered to be the single most important environmental variable.
"env" command will show all the current environmental variables and their values for the current user.
For PATH only, we can use 'env | grep PATH'.
Adding a path:
PATH="/usr/sbin:$PATH"
or
export PATH=$PATH:/usr/sbin
or
An addition to a user's PATH variable can be made permanent by adding it to that user's .bash_profile file.
.bashrc and .bashprofile
.bash_profile is executed when you login. Stuff you put in there might be your PATH and other important environment variables.
.bashrc is used for non login shells. I'm not sure what that means. I know that RedHat executes it everytime you start another shell (su to this user or simply calling bash again) You might want to put aliases in there but again I am not sure what that means. I simply ignore it myself.
.profile is the equivalent of .bash_profile for the root. I think the name is changed to let other shells (csh, sh, tcsh) use it as well. (you don't need one as a user)
icc: intel c compiler
impi: intel mpi.
Module: The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles. Each modulefile contains the information needed to configure the shell for an application. Once the Modules package is initialized, the environment can be modified on a per-module basis using the module command which interprets modulefiles. Typically modulefiles instruct the module command to alter or set shell environment variables such as PATH, MANPATH, etc. modulefiles may be shared by many users on a system and users may have their own collection to supplement or replace the shared modulefiles.
Modules can be loaded and unloaded dynamically and atomically, in an clean fashion. All popular shells are supported, including bash, ksh, zsh, sh, csh, tcsh, as well as some scripting languages such as perl andpython.
Modules are useful in managing different versions of applications. Modules can also be bundled into metamodules that will load an entire suite of different applications.
"ldd yourprogram" will show a list of the libraries that are needed for myprogram.
Now let's start to compile a parallel version of VASP.
The system information is following.
OS: "uname -rms", show Linux 2.6.18-348.6.1.el5 x86_64.
Hardware: grep "model name" /proc/cpuinfo, Intel(R) Xeon(R)
Compiler: ifort -v, mpif90 -v, icc -v. I used intel compiler.
Now let's start to compile a parallel version of VASP.
The system information is following.
OS: "uname -rms", show Linux 2.6.18-348.6.1.el5 x86_64.
Hardware: grep "model name" /proc/cpuinfo, Intel(R) Xeon(R)
Compiler: ifort -v, mpif90 -v, icc -v. I used intel compiler.
No comments:
Post a Comment