How to Install Numpy and Scipy on Rocks Cluster 6.1.1

I recently installed Numpy and Scipy on a cluster built with Rocks 6.1.1. The guide I used was based upon this wiki page. Python was installed under this directory: /share/apps/python . Here are the steps I took.
Python installation

wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
tar zxvf Python-2.7.8.tgz
cd Python-2.7.8
./configure --prefix=/share/apps/python --with-readline=gnu
make -j30
make install
cd ..

Lapack installation

wget http://www.netlib.org/lapack/lapack-3.5.0.tgz
tar zxvf lapack-3.5.0.tgz
cd lapack-3.5.0
cp INSTALL/make.inc.gfortran make.inc

Edit make.inc and change OPTS and NOOPT

OPTS = -O2 -fPIC
NOOPT = -O0 -fPIC

make -j20
make blaslib lapacklib tmglib lapack_testing
cd ..

Atlas installation

wget http://sourceforge.net/projects/math-atlas/files/Stable/3.10.2/atlas3.10.2.tar.bz2
tar -jxvf atlas3.10.2.tar.bz2
cd ATLAS
mkdir ATLAS_LINUX
cd ATLAS_LINUX
../configure -Fa alg -fPIC --prefix=/share/apps/python --with-netlib-lapack-tarfile=/root/lapack-3.5.0.tgz
make
cd lib
make shared
make ptshared
cd ..
make install
cd ../..

UMFPACK UFconfig AMD installation

wget http://www.cise.ufl.edu/research/sparse/umfpack/current/UMFPACK.tar.gz
wget https://www.cise.ufl.edu/research/sparse/UFconfig/current/SuiteSparse_config.tar.gz
wget http://www.cise.ufl.edu/research/sparse/amd/current/AMD.tar.gz

mkdir sparse
tar zxvf UMFPACK.tar.gz
tar zxvf SuiteSparse_config.tar.gz
tar zxvf AMD.tar.gz
mv AMD SuiteSparse_config UMFPACK sparse
cd sparse/SuiteSparse_config

Modify this file SuiteSparse_config.mk . Note that the following listing is for the file content, not commands to input.

CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -m64
F77 = gfortran
F77FLAGS = $(FFLAGS) -O -m64 -fPIC
INSTALL_LIB = /share/apps/python/lib
INSTALL_INCLUDE = /share/apps/python/include
BLAS = -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/share/apps/python/lib -llapack -lf77blas -lcblas -latlas -lgfortran
LAPACK = -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/share/apps/python/lib -llapack -lf77blas -lcblas -latlas -lgfortran
METIS_PATH =
METIS =
UMFPACK_CONFIG = -DNCHOLMOD
CHOLMOD_CONFIG = -DNPARTITION

Now, it’s ready for compiling.

cd ../UMFPACK
make -j20 library
make install

cd ../AMD
make
make install

cd ..
cp SuiteSparse_config/SuiteSparse_config.h /share/apps/python/include/
cd ..

Fftw installation

wget http://www.fftw.org/fftw-3.3.4.tar.gz
tar zxvf ffw-3.3.4.tar.gz
cd ffw-3.3.4
./configure --enable-sse2 --enable-threads --with-combined-threads CFLAGS="-O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -pthread -fPIC -m64" FFLAGS="-g -O2 -fPIC -m64" CXXFLAGS="-g -O2 -fPIC -m64" --prefix=/share/apps/python
make -j20
make install
cd ..

Numpy installation

wget http://sourceforge.net/projects/numpy/files/NumPy/1.8.1/numpy-1.8.1.tar.gz
tar zxvf numpy-1.8.1.tar.gz
cd numpy-1.8.1

Create a site.cfg file. Again, the following is the file content.

[DEFAULT]
library_dirs = /share/apps/python/lib
include_dirs = /share/apps/python/include
[atlas]
atlas_libs = lapack, f77blas, cblas, atlas
[amd]
amd_libs = amd
[umfpack]
umfpack_libs = umfpack, gfortran
[fftw]
libraries = fftw3

Now, let’s build it.

/share/apps/python/bin/python setup.py build
/share/apps/python/bin/python setup.py install --prefix=/share/apps/python
cd ..

Scipy installation

wget http://sourceforge.net/projects/scipy/files/scipy/0.14.0/scipy-0.14.0.tar.gz
tar zxvf scipy-0.14.0.tar.gz
cd scipy-0.14.0
/share/apps/python/bin/python setup.py build
/share/apps/python/bin/python setup.py install --prefix=/share/apps/python
cd ..

HP Printer Smart Install Problem

Printer installation is usually a trivial job that only takes about five to ten minutes. It took me two hours to finally get one installed today! This printer is called a HP Color LaserJet M451dn. The printer is equipped with Smart Install, which is supposed to simplify printer installation. However, it ended up causing major problems for me.

Traditionally, you connect the printer to the computer and then you specify a driver during printer installation. That’s it. It’s very straightforward. The Smart Install is different. When you connect a printer with Smart Install, the printer connects as a CD drive with the installation software. I tried this route and ran the installation software. It did not work. I then followed the second method in the installation guide that came with the printer. The second method requires you to put the driver CD in the CD drive, run the installation software first, and then connect the printer. Not only did it not work, it also took about 20 minutes each time I tried it.

I found out that I was not alone. A lot of people online reported the same problem.

HP LaserJet Pro 400 Color M451dn : problem installing driver

I tried some of the suggestions, but they did not work either. I finally managed to get it working. Here are the steps.

  1. Make sure the printer is not connected to the computer.
  2. Disable Smart Install on the printer. This is done by using the panel on the printer. It’s under Setup Menu -> Service -> Smart Install
  3. Download the latest universal print driver from HP and install it. Enter your model number in this site to find the driver.
    http://www8.hp.com/us/en/drivers.html
  4. Reboot the computer after you install the latest universal print driver.
  5. Connect the printer to your computer using a USB cable.

This should fix it. Otherwise, the other method to try is to connect the printer to the network and install it as a network printer.

How to Override Group ID for LDAP in Enterprise Linux 6.5

I recently set up a Linux server with LDAP user information. The group id (gid) from LDAP is not useful on this server. It took me a while to figure out how to override the group id. The trick is to modify this file /etc/nslcd.conf . Add this line to the file.

map passwd gidNumber "gid_number"

Replace the gid_number with the number you want. Save the file and restart the service.

sudo /sbin/service nslcd restart

 

Rocks Cluster Compute Node Installation Problem using PowerConnect N2024

We bought a PowerConnect N2024 switch for a small cluster. During the installation, the DHCP server did not seem to work. The compute node could not get an IP address and the installation failed. I saw a FAQ about the problem with PowerConnect 5224.

http://central6.rocksclusters.org/roll-documentation/base/6.1.1/faq-configuration.html#DELL-POWERCONNECT

I had a hard time while trying to follow the guide. The first problem I had was with entering the command to assign an IP address for the switch. I didn’t know that there were two different modes for the switch. You need to enter

enable

first to enter the command. After you enter the command, the prompt changes from > to #. You can then enter the command to assign an IP address for the switch.

config
interface vlan 1
ip address 10.1.2.3 255.0.0

The second problem I had was that I couldn’t find the place to change “edge port” settings. The guide suggested that this setting could be labeled as “fast link”. On the N2024 switch, it is not called either “edge port” or “fast link”; it is called Port Fast. You can enable this setting by going to Switching -> Spanning Tree -> Global Settings -> Port Fast.

powerconnect-portfast

Rocks Cluster Node Installation Problem “Unable to read package metadata” Solved

When I installed the first compute node in my Rocks cluster, the installation went smoothly and I didn’t have any problems. However, I ran into a lot of problems when I installed the second node.

The installation always failed with this error message:

Unable to read package metadata.This may be due to a missing repodata directory. Please ensure that your install tree has been correctly generated. Cannot retrieve repository metadata (repomd.xml) for repository: anaconda-base-201404140147.x86_64. Please verify it’s path and try again.

I searched the Rocks mailing list and found some suggestions. One suggestion was to rebuild the repository.

cd /export/rocks/install
sudo rm -rf rocks-dist
sudo rocks create distro

I did it and restarted the installation. Unfortunately, this did not fix the problem. I could not find other solutions besides rebuilding the master node.

I then began to track down the problem by myself. My clue was that the node cannot retrieve repomd.xml. I found the file under /export/rocks/install/rocks-dist/x86_64/repodata and then found the problem when I tried to list the parent directory. Here is the output:

 

total 20
drwxr-xr-x 5 root root 4096 Jul 29 15:41 build
drwxrwx--- 3 root root 4096 Jul 29 15:41 force
drwxr-xr-x 2 root root 4096 Jul 29 15:42 images
drwxr-xr-x 4 root root 4096 Apr 14 04:26 RedHat
drwxrwx--- 2 root root 4096 Jul 29 15:42 repodata

Note that the force and repodata directories have different permissions than others had. In order for the computer node to retrieve the repomd.xml file, the permissions have to be fixed. I changed the permissions for these two folders and restarted the installation. The installation went past the point where it failed before. However, it failed again and complained about a different file. I checked the missing file and found that there were other directories with the same permission problem. I then used this command to fix all the permission problems.

sudo chmod -R o+r,o+x /export/rocks/install

 

How to Enable Debug Logging on CentOS 6.5

I have been doing a lot of works on machines running CentOS 6.5 lately. The debug logging was not enabled by default. Here is how to enable it.

  1. Use a text editor to edit this file /etc/rsyslog.conf.
  2. Insert this line
    *.debug                                     /var/log/debug
  3. Save the file
  4. Restart the service by running this command
    sudo /sbin/service rsyslog restart

After the rsyslog service has been restarted, you can check this file /var/log/debug for debugging info.

“Adobe Acrobat does not support Internet Explorer’s Enhanced Protected Mode (EPM)” Error Message

One user reported that whenever she opened up a link to a PDF file from Internet Explorer, this error message popped up.

acrobat-epm

 

Adobe Acrobat does not support Internet Explorer’s Enhanced Protected Mode (EPM). Either install the latest version of Adobe Reader or disable EPM in Internet Explorer.

This message puzzled me for a while because Enhanced Protect Mode is for IE 10 or above. My user still uses IE 8, and there was no EPM for IE 8. I then checked the version of Acrobat Reader and it was already the latest version, so there was no need to update it.

Later, I found out that there were two Acrobats installed on the machine. One was the Acrobat Pro 9 and the other was the Acrobat Reader 11. The default program to open PDF files was set to Acrobat Pro 9 and this was the cause of the error message. I tried to set the default program to Acrobat Reader 11 and the problem was fixed.

Here are the steps to set Acrobat Reader 11 as the default program for PDF files.

  1. Open Acrobat Reader 11.
  2. Click on Edit -> Preferences.
  3. Click on General on the side bar.
  4. Click on the button Select Default PDF Handler.
  5. Click on the drop down box and select Adobe Reader XI.
  6. Click on Apply and then OK to exit out the dialogs.