Wednesday, July 30, 2014

Using sudo -l to check sudo rights

If you need to do a quick check whether on sudo rights for your userid, you can check quickly by
doing a sudo -l

$ sudo -l 

Matching Defaults entries for user1 on this host:
    requiretty, !visiblepw, always_set_home, env_reset, env_keep="COLORS
    DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS", env_keep+="MAIL PS1
    PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE
    LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY
    LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL
    LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY",
    secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

User user1 may run the following commands on this host:
    (ALL) ALL

Saturday, July 26, 2014

Installing GNOME Desktop on CentOS 6 on a console

To install GNOME Desktop and X Windows using the console for CentOS 6.5, do use the command
# yum groupinstall "Desktop" "Desktop Platform" "X Windows System"

Thursday, July 24, 2014

Using pip to install python packages

Pointer 1: To install specific version of packages do
# pip install 'numpy==1.5.1'
Pointer 2: To show what files was installed
# pip show --files numpy
---
Name: numpy
Version: 1.8.1
Location: /usr/local/python-2.7.8/lib/python2.7/site-packages
Requires:
Files:
../numpy/__init__.py
.....
.....
Pointer 3: Uninstall a package
# pip uninstall num
Uninstalling SomePackage:
Pointer 4: Upgrade a package:
# pip install --upgrade SomePackage
[...]
Found existing installation: SomePackage 1.0
Uninstalling SomePackage:
Successfully uninstalled SomePackage
Running setup.py install for SomePackage
Successfully installed SomePackage
Pointer 5: List what packages are outdated:
# pip list --outdated
SomePackage (Current: 1.0 Latest: 2.0)
References:
  1. pip 1.5.6 - A tool for installing and managing Python packages
  2. pip - installation

Wednesday, July 23, 2014

Installing and Compiling Python 2.7.8 on CentOS 5

Step 1: Download the Python 2.7.8 from Python Site Step 2: Use GCC44 to compile. If you have not done it, do
# yum install gcc44 gcc44-c++ gcc44-gfortran
Step 3: Update your alias in your .bashrc
alias gcc='gcc44'
Step 4: Configure python 2.7.8
# cd python-2.7.8
# ./configure --prefix=/usr/local/python-2.7.8
# make -j 8
# make install
Step 5: Update the PATH and LD_LIBRARY_PATH in your .bashrc
export PATH=$PATH:/usr/local/python-2.7.8/bin.........
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/python-2.7.8/lib
Step 6: Download get-pip.py For more information see pip installation site Create a directory inside python2.7 directory and put pip in that directory
# mkdir /usr/local/python-2.7.8/pip
# wget https://bootstrap.pypa.io/get-pip.py .
Step 7: Install pip with Administrator rights
# python2.7 get-pip.py
If setuptools (or distribute) is not already installed, get-pip.py will install setuptools for you. To upgrade an existing setuptools (or distribute), run
# pip install -U setuptools
# pip install numpy

Tuesday, July 22, 2014

Finding Performance bottlenecks in your application




This is an interesting blog How to find performance bottlenecks in your application by using gperftools and KCachegrind to profile performance bottlenecks.

Do take a look and happy reading.

Monday, July 21, 2014

Encountering the pars.yacc:5426 error when installing Grace 5.1.23 on CentOS 5

I encountered Encountering the pars.yacc:5426: error: âlog2â undeclared here (not in a function) when installing Grace-5.1.23 on CentOS 5 when Installing Grace (xmgrace) on CentOS 5 and 6

I used gcc44 as the gcc compilers.
pars.yacc:5426: error: âlog2â undeclared here (not in a function)
make[1]: *** [pars.o] Error 1
make[1]: Leaving directory `/root/Downloads/grace-5.1.23/src'
make: *** [subdirs] Error 1

The only solution is to use Grace 5.1.22. It will compile nicely. 

Sunday, July 20, 2014

Checking loaded apache modules



To check loaded apache modules, you can take a look at
#  apachectl -M
OR
# apache2ctl -M


core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
auth_basic_module (shared)
auth_digest_module (share)
.....
.....
.....

.....
reqtimeout_module (shared)
php5_module (shared)

Thursday, July 17, 2014

/usr/lib64/libxml2.a: could not read symbols: Bad value

For more information on how to install python 2.7 and python-igraph, do look at the blog entry


When I was install python-igraph, I encountered the error
# python2.7 setup.py install

/usr/bin/ld: /usr/lib64/libxml2.a(entities.o): 
relocation R_X86_64_32 against `a local symbol' 
can not be used when making a shared object; recompile with -fPIC 

/usr/lib64/libxml2.a: could not read symbols: Bad value

The solution for this can be found igraph-help http://lists.gnu.org/archive/html/igraph-help/2014-05/msg00045.html

If summary, rename the libxml2.a to libxml2.a.org to ensure that the setup script of the Python interface does not find it when needed -- the installer will then fall back to /usr/lib64/libxml2.so (i.e. the dynamic version of the libxml2 library)
# mv /usr/lib64/libxml2.a /usr/lib64/libxml2.a.org

When I was install python-igraph, I encountered the error

# python2.7 setup.py install

/usr/bin/ld: /usr/lib64/libm.a(entities.o): 
relocation R_X86_64_32 against `a local symbol' 
can not be used when making a shared object; recompile with -fPIC 

# mv /usr/lib64/libm.a /usr/lib64/libm.a.org

Compiling igraph-0.7.1 on CentOS 5

Setting up the igraph-0.7.1 in C is quite easy Step 1: yum install gcc44 and above
# yum install gcc44 gcc44-c++ gcc44-gfortran
Step 2: Install libxml2 libraries
# yum install libxml2
Step 3: Download the igraph-0.7.1 from the igraph C site
# ./configure --prefix=/usr/local/igraph-0.7.1
# make -j 8
# make install

Wednesday, July 16, 2014

OpenLDAP Configuration on RHEL 6.x / CentOS 6.x

This is a good youtube in configuring OpenLDAP Configuration on RHEL 6.x / CentOS 6.x

Tuesday, July 15, 2014

mmgetstate -a lists all nodes in unknown state

After I setup the GPFS NSD Nodes, I did a "mmgetstate -a", I noticed that my NSD Nodes shows all the compute nodes in an unknown state.

# mmgetstate -a 
.....
.....
node1    unknown
node2    unknown 
node3    unknown
.....
.....

There are a lot of reasons why "mmgetstate -a" produce the unknown state. For my case, it was a simple resolution, it was just that my /etc/hosts file was not updated. After I updated the /etc/hosts file for all the NSD Node, my solution was fixed.


Monday, July 14, 2014

iWARP Update Roadmap 2014



An interesting information on iWARP roadmap with OpenFabric Alliance iWARP Update



40Gb Ethernet - A Competitive Alternative to InfiniBand



This paper supports this conclusion with three real application benchmarks running on IBM’s Rackswitch G8316, a 40Gb Ethernet aggregation switch, in conjunction with Chelsio Communications’ 40Gb Ethernet Unified Wire network adapter. This paper shows how iWARP offers comparable application level performance at 40Gbps with the latest InfiniBand FDR speeds.

40Gb Ethernet: A Competitive Alternative to InfiniBand - LAMMPS, WRF and Quantum ESRESSO Modeling with 40Gb iWARP Technology

Sunday, July 13, 2014

Extracting file with xz format

If you need to extract something with a hello.xz, do use the command unxz

# unxz hello.xz

Thursday, July 10, 2014

ldap: unrecognized service on CentOS 6

I was starting to configure the ldap server and was starting the service. I did

# service ldap start
ldap: unrecognized service

Realise for CentOS 6, ldap is replaced for slapd
# service  slapd  start

Wednesday, July 9, 2014

Tsubanne-KFC Supercomputing and Green Revolution Cooling Carnojet breached 4GFlops per watts



Seven months after shattering records on the Green500, the Tsubame-KFC supercomputer running on Green Revolution Cooling’s CarnotJet™ System remains undefeated at the #1 spot.

In November 2013 when the Tsubame-KFC claimed it’s #1 spot, it was the first supercomputer to have breached the 4 GigaFLOPS/watt (Four Billion Floating Point Operations Per Second per Watt), beating its closest competitor by over 30%.

For more information, see http://www.green500.org/lists/green201406 

Tuesday, July 8, 2014

mca_oob_tcp_msg_recv: readv failed: Connection reset by peer

I was encountering the error from one of the users.

[compute-node1:00864] [[44805,0],0]-[[44805,1],7] mca_oob_tcp_msg_recv: readv failed: Connection reset by peer (104)
[compute-node1:00864] [[44805,0],0]-[[44805,1],0] mca_oob_tcp_msg_recv: readv failed: Connection reset by peer (104)
[compute-node1:00864] [[44805,0],0]-[[44805,1],1] mca_oob_tcp_msg_recv: readv failed: Connection reset by peer (104)
[compute-node1:00864] [[44805,0],0]-[[44805,1],2] mca_oob_tcp_msg_recv: readv failed: Connection reset by peer (104)
[compute-node1:00864] [[44805,0],0]-[[44805,1],5] mca_oob_tcp_msg_recv: readv failed: Connection reset by peer (104)
--------------------------------------------------------------------------
mpirun has exited due to process rank 3 with PID 869 on
node compute-node1 exiting improperly. There are two reasons this could occur:

1. this process did not call "init" before exiting, but others in
the job did. This can cause a job to hang indefinitely while it waits
for all processes to call "init". By rule, if one process calls "init",
then ALL processes must call "init" prior to termination.

2. this process called "init", but exited without calling "finalize".
By rule, all processes that call "init" MUST call "finalize" prior to
exiting or it will be considered an "abnormal termination"

This may have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).

There are several things to check
  1. Disabled selinux
    vim /etc/selinux/config
    .....
    .....  
    SELINUX=disabled
    .....
    .....

  2. Diagnose your IB Network
    For more information, see Diagnostic Tools to diagnose Infiniband Fabric Information

  3. Check that your memory ulimit configuration is correct for /etc/security/limits.conf. See blog entry A relook at libibverbs: Warning: RLIMIT_MEMLOCK is 32768 bytes. This will severely limit memory registrations

  4. If your scheduler is torque, you have to configure the pbs_mom, see Default ulimit setting in torque overide ulimit setting

Monday, July 7, 2014

Examine shell and environment variables using set command

Set Command is different from the printenv environment is that the Set Command display both the shell and environment environment. One interesting feature is that it display the output in alphabet order. For more information on printenv. See Examine the Linux Environment using printenv

$ set | less

AMBERHOME=/usr/local/amber10
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="2" [2]="25" [3]="1" [4]="release" [5]="x86_64-redhat-linux-gnu")
BASH_VERSION='3.2.25(1)-release'
COLORS=/etc/DIR_COLORS.xterm
COLUMNS=157
CVS_RSH=ssh
DIRSTACK=()
EUID=500
GROUPS=()
G_BROKEN_FILENAMES=1
HISTFILE=/home/me/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/home/me
HOSTNAME=headnode.cluster.com
HOSTTYPE=x86_64
IFS=$' \t\n'
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LD_LIBRARY_PATH=......
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LINES=46
LOADEDMODULES=
LOGNAME=me
LS_COLORS='no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'
MACHTYPE=x86_64-redhat-linux-gnu
MAIL=/var/spool/mail/me
MAILCHECK=60
MANPATH=:/opt/xcat/share/man:
MKL_HOME=/opt/intel/mkl/10.2.6.038
....
....
....
....
....

Examine the Linux Environment using printenv

If you wish to examine the environment variables, you can use the command printenv command

$ printenv | less

MODULE_VERSION_STACK=3.2.9
MANPATH=:/opt/xcat/share/man:
HOSTNAME=headnode.cluster.com
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=172.20.4.28 53794 22
SSH_TTY=/dev/pts/3
PERL_BADLANG=0
USER=me
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
LD_LIBRARY_PATH=......................................
XCATROOT=/opt/xcat
MODULE_VERSION=3.2.9
MAIL=/var/spool/mail/me
PATH=...........................
INPUTRC=/etc/inputrc
PWD=/home/me
LANG=en_US.UTF-8
MODULEPATH=/usr/local/Modules/contents
LOADEDMODULES=
MKL_HOME=/opt/intel/mkl/10.2.6.038
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SHLVL=1
HOME=/home/me

PBS_DEFAULT=headnode.cluster.com
LOGNAME=me
CVS_RSH=ssh
SSH_CONNECTION=xxx.xxx.xxx.xxx 22
MPI_HOME=/usr/local/mpi/intel
MODULESHOME=/usr/local/Modules/3.2.9
LESSOPEN=|/usr/bin/lesspipe.sh %s
AMBERHOME=/usr/local/amber10
G_BROKEN_FILENAMES=1
module=() {  eval `/usr/local/Modules/$MODULE_VERSION/bin/modulecmd bash $*`
}
_=/usr/bin/printenv

Thursday, July 3, 2014

Error while loading shared libraries: libXmu.so.6: cannot open shared object file: No such file or directory on CentOS 6

If you using gaussview and you encountered this error on CentOS 6 or RH6, 

$ /usr/local/gaussian/gv/gview.exe: error while loading shared libraries: 
libXmu.so.6: cannot open shared object file: No such file or directory

This is due to the missing libXmu libraries and related dependencies. Just simply do a

# yum install libXmu*

or if you wish to check which repo supplies the libXmu

# yum whatprovides libXmu

libXmu-1.1.1-2.el6.i686 : X.Org X11 libXmu/libXmuu runtime libraries
Repo        : base
Matched from:

libXmu-1.1.1-2.el6.x86_64 : X.Org X11 libXmu/libXmuu runtime libraries
Repo        : base
Matched from:

libXmu-1.1.1-2.el6.i686 : X.Org X11 libXmu/libXmuu runtime libraries
Repo        : installed
Matched from:
Other       : Provides-match: libXmu

Wednesday, July 2, 2014

Food. Water. Data Center

This is a very hilarious short video clip titled "Food. Water. Data Center" from Intel .

From ATMs to GPS navigation the data center powers our day. What would a day without the data center look like