Skip to content

Blog

DRBD: Manual Split Brain Recovery

Split Brain in DRBD is a condition where each host think that resource in another host is outdated, thus synchronization won't be occured. This condition often occurs because of network or power failure which is indicated by these variables:

log: Split-Brain detected, dropping connection
connection-state: StandAlone/WFConnection

To manually recover the cluster from split brain condition, the following steps is required.

1. on victim connection state must be StandAlone
# drbdadm disconnect <resource>
2. set victim as secondary
# drbdadm secondary <resource>
3. reconnect victim
# drbdadm connect --discard-my-data <resource>
4. on the survivor, if the connection state StandAlone enter following command
# drbdadm connect <resource>

Reference: http://www.drbd.org/users-guide-8.4/s-resolve-split-brain.html

DRBD: Troubleshooting and Error Recovery of Hard Drive Failure or Replacement

DRBD refers to block devices designed as a building block to form high availability cluster. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based RAID-1. (DRBD)

Sometimes we have a disk failure on hard drive which contains DRBD backing device. The following steps can be used to replace or recover the failed drive.

1. detach drbd resource from broken backing storage
# drbdadm detach <resource>
2. check state of drbd disk
# drbdadm dstate <resource>
Diskless/UpToDate
3. if using internal meta data, bind DRBD device to new hard disk
# drbdadm create-md <resource>
# drbdadm attach <resource>
4. if using external meta data DRBD unable to recognize hard drive was swapped, need additional step
# drbdadm create-md <resource>
# drbdadm attach <resource>
# drbdadm invalidate <resource>

Reference: http://www.drbd.org/users-guide-8.4/ch-troubleshooting.html

FreeBSD Check TCP/UDP Open Port or Services

In this short tutorial I will show how to check TCP/UDP open port or services in FreeBSD box. For checking open port or services which uses port in FreeBSD simply issue the following commands.

  1. check TCP connection
sockstat -Ptcp
  1. check UDP connection
sockstat -Pudp

Combine with grep to search port used by specific service or service which using specific port.

  1. use grep to get service or port
sockstat -Ptcp | grep <port number>
sockstat -Ptcp | grep -i <service name>
sockstat -Pudp | grep <port number>
sockstat -Pudp | grep -i <service name>

Installing Postfix with Auth SASL and LDAP Support on FreeBSD

Install packages using FreeBSD port.

1. Install postfix

# Options for postfix-2.11.0,1
_OPTIONS_READ=postfix-2.11.0,1
_FILE_COMPLETE_OPTIONS_LIST=BDB CDB INST_BASE LDAP_SASL LMDB MYSQL NIS OPENLDAP PCRE PGSQL SASL2 SPF SQLITE TEST TLS VDA DOVECOT DOVECOT2 SASLKRB5 SASLKMIT
OPTIONS_FILE_SET+=BDB
OPTIONS_FILE_SET+=CDB
OPTIONS_FILE_UNSET+=INST_BASE
OPTIONS_FILE_SET+=LDAP_SASL
OPTIONS_FILE_UNSET+=LMDB
OPTIONS_FILE_UNSET+=MYSQL
OPTIONS_FILE_UNSET+=NIS
OPTIONS_FILE_SET+=OPENLDAP
OPTIONS_FILE_SET+=PCRE
OPTIONS_FILE_UNSET+=PGSQL
OPTIONS_FILE_SET+=SASL2
OPTIONS_FILE_UNSET+=SPF
OPTIONS_FILE_UNSET+=SQLITE
OPTIONS_FILE_SET+=TEST
OPTIONS_FILE_SET+=TLS
OPTIONS_FILE_UNSET+=VDA
OPTIONS_FILE_UNSET+=DOVECOT
OPTIONS_FILE_UNSET+=DOVECOT2
OPTIONS_FILE_UNSET+=SASLKRB5
OPTIONS_FILE_UNSET+=SASLKMIT

2. install openldap

# Options for openldap-client-2.4.38
_OPTIONS_READ=openldap-client-2.4.38
_FILE_COMPLETE_OPTIONS_LIST=FETCH
OPTIONS_FILE_UNSET+=FETCH

3. install cyrus-sasl2

# Options for cyrus-sasl-2.1.26_4
_OPTIONS_READ=cyrus-sasl-2.1.26_4
_FILE_COMPLETE_OPTIONS_LIST=ALWAYSTRUE AUTHDAEMOND KEEP_DB_OPEN  OBSOLETE_CRAM_ATTR BDB MYSQL PGSQL SQLITE2 SQLITE3 CRAM DIGEST LOGIN NTLM OTP PLAIN SCRAM
OPTIONS_FILE_UNSET+=ALWAYSTRUE
OPTIONS_FILE_SET+=AUTHDAEMOND
OPTIONS_FILE_UNSET+=KEEP_DB_OPEN
OPTIONS_FILE_SET+=OBSOLETE_CRAM_ATTR
OPTIONS_FILE_UNSET+=BDB
OPTIONS_FILE_UNSET+=MYSQL
OPTIONS_FILE_UNSET+=PGSQL
OPTIONS_FILE_UNSET+=SQLITE2
OPTIONS_FILE_UNSET+=SQLITE3
OPTIONS_FILE_SET+=CRAM
OPTIONS_FILE_SET+=DIGEST
OPTIONS_FILE_SET+=LOGIN
OPTIONS_FILE_SET+=NTLM
OPTIONS_FILE_SET+=OTP
OPTIONS_FILE_SET+=PLAIN
OPTIONS_FILE_SET+=SCRAM

4. install cyrus-sasl2-saslauthd

# Options for cyrus-sasl-saslauthd-2.1.26
_OPTIONS_READ=cyrus-sasl-saslauthd-2.1.26
_FILE_COMPLETE_OPTIONS_LIST=BDB HTTPFORM OPENLDAP
OPTIONS_FILE_SET+=BDB
OPTIONS_FILE_SET+=HTTPFORM
OPTIONS_FILE_SET+=OPENLDAP

5. install postfwd

# Options for postfix-postfwd-1.32_1
_OPTIONS_READ=postfix-postfwd-1.32_1
_FILE_COMPLETE_OPTIONS_LIST=DOCS EXAMPLES POSTFWD2
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=EXAMPLES
OPTIONS_FILE_UNSET+=POSTFWD2

6. configure /usr/local/lib/sasl2/smtpd.conf

log_level: 3
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN

7. configure /usr/local/etc/saslauthd.conf

ldap_servers:
ldap_bind_dn:
ldap_bind_pw:
ldap_search_base:
ldap_auth_method: ssha
ldap_time_limit: 4
ldap_filter:

8. configure /usr/local/etc/postfix/main.cf

mtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes
smtpd_sasl_path = smtpd
smtp_sasl_type = cyrus
smtpd_sasl_security_options = noanonymous

smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination

9. configure /usr/local/etc/postfwd.conf

id=RULE001
 sasl_username=~/^(\S+)$/
 action=rcpt(sasl_username/200/3600/DEFER Too much emails for $$sasl_username)

10. configure /etc/rc.conf

postfix_enable="YES"
saslauthd_enable="YES"
saslauthd_flags="-a ldap"
postfwd_enable="YES"

Reference: http://ashterix.blogspot.com/2008/10/freebsd-postfix-sasl-openldap.html

iSCSI+LVM: Automatically Enable Volume Group Contain iSCSI Disk Physical Volume

When using iSCSI and LVM, sometimes we have to manually enable iSCSI disk that used as a physical volume in LVM. This is because LVM service is started earlier than iSCSI service so the iSCSI disk containing the physical volume is not present yet. Solution to this problem is to enable lvmetad in /etc/lvm/lvm.conf. The lvmetad is "LVM metadata daemon" that acts as in-memory cache of LVM metadata gathered from devices as they appear in the system. Whenever a block device appears and has PV label on it, it is automatically scanned via an udev rule. This update the lvmetad daemon with the LVM metadata found. Once the VG is complete (all the PVs making up the VG are present), the VG is activated. The lvmetad daemon is required for this LVM event-based autoactivation to work and the iSCSI disk must be present in the system after boot time.

enable lvmetad in lvm.conf
use_lvmetad = 1

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=474833

LVM: Adding New Physical Volume to Volume Group

Linux LVM is a logical volume manager for Linux kernel. Logical volume manager provides method of allocation space in mass storage device that more flexible than traditional partitioning scheme. Logical volume manager can create, resize, and combine partitions, potentially without interrupting system. (Wikipedia)

schema: new device /dev/sda
1. create needed partitions, label them with 8e (Linux LVM)
# fdisk /dev/sda
2. format partitons
# mkfs.ext4 /dev/sda1
3. create physical volume
# pvcreate /dev/sda1
4. extend existing volume group
# vgextend VolGroup00 /dev/sdb1
5. extend existing logical volume
extend LogVol01 to 16GB
# lvextend -L 16G /dev/VolGroup00/LogVol01
adding 1GB to LogVol01
# lvextend -l+1G /dev/VolGroup00/LogVol01
6. resize logical volume to new size
# resize2fs /dev/VolGroup00/LogVol01
7. create new logical volume
create new logical volume with size 16GB
# lvcreate -L 16GB -n LogVol02 VolGroup00
create new logical volume with all free space
# lvcreate -l+100%FREE -n LogVol02 VolGroup00
8. format new logical volume
# mkfs.ext4 /dev/VolGroup00/LogVol02

Reference: http://sujithemmanuel.blogspot.com/2007/04/how-to-add-disk-to-lvm.html

SMTP: Debugging SMTP with TLS/SSL and Auth

SMTP use TLS/SSL to secure connection to server and AUTH so only authenticated user can use the SMTP service. This tutorial will show steps to debug SMTP TLS/SSL and AUTH from Linux/Unix terminal.

  1. encode your login information in base64, the following perl command which requires MIME::Base64 will do encoding
perl -MMIME::Base64 -e 'print encode_base64("\000your_username\000your_password")'
# example output
# AHlvdXJfdXNlcm5hbWUAeW91cl9wYXNzd29yZA==
  1. connect to smtp server
# normal non-secured SMTP
$ telnet smtp.yourdomain.com 25

# TLS connection, check STARTTLS support with EHLO command
$ telnet smtp.yourdomain.com 25

220 SMTP banner
EHLO smtp.yourdomain.com
250 SMTP banner
250-smtp.yourdomain.com
250-PIPELINING
250-SIZE 36360000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit

$ openssl s_client -starttls smtp -crlf -connect smtp.yourdomain.com:25

# SSL connection
$ openssl s_client -crlf -connect smtp.yourdomain.com:465
  1. check AUTH support with EHLO command
# Connect to secure SMTP using TLS or SSL
$ openssl s_client -starttls smtp -crlf -connect smtp.yourdomain.com:25
# Or
$ openssl s_client -crlf -connect smtp.yourdomain.com:465

EHLO smtp.yourdomain.com
250-smtp.yourdomain.com
250-PIPELINING
250-SIZE 36360000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
  1. use AUTH command to authenticate
# connect to secure SMTP using TLS or SSL
$ openssl s_client -starttls smtp -crlf -connect smtp.yourdomain.com:25
# OR
$ openssl s_client -crlf -connect smtp.yourdomain.com:465

HELO smtp.yourdomain.com
250 smtp.yourdomain.com
AUTH PLAIN AHlvdXJfdXNlcm5hbWUAeW91cl9wYXNzd29yZA==
235 2.7.0 Authentication successful
if failed
535 5.7.8 Error: authentication failed: authentication failure
  1. test sending message
$ openssl s_client -crlf -connect smtp.yourdomain.com:465

HELO smtp.yourdomain.com
250 smtp.yourdomain.com
AUTH PLAIN AHlvdXJfdXNlcm5hbWUAeW91cl9wYXNzd29yZA==
235 2.7.0 Authentication successful
MAIL FROM: <your_username@yourdomain.com>
250 2.1.0 OK
RCPT TO: <your_destination@domain.com>
250 2.1.5 OK
DATA
354 End data with <CR><LF>.<CR><LF>
From: Your Name <your_username@yourdomain.com>
To: Your Destination Name <your_destination@domain.com>
Subject: Your Email Subject
Your Email Content
.
250 2.0.0 Ok: queued as 6A4C1D5153E
quit
Connection closed by foreign host.
Reference: <https://qmail.jms1.net/test-auth.shtml>

Find A Virtual Machine by MAC Address with VSphere Client and PowerCLI

It is usual task to find someone computer by its MAC address when there is an issue related to his computer in the local network. The common case is IP conflict or network abuse. But, if the MAC Address shows that machine is one of many scattered VMware virtual machine out there, how do we find it?

vSphere Client

If you have an VMware ESX or ESXi server, vSphere Client is tool to manage your virtual machines from remote computer. But, vSphere Client cannot tell the MAC Address of virtual machines from version 10 or higher and to find virtual machine based on MAC Address we must open the virtual machine Setting one by one. It is still possible when there are few virtual, but it is exhausting when we have many virtual machine.

vSphere PowerCLI

There is alternative method by using vSphere PowerCLI, a command-line tools to manage virtual machines in conjunction with vSphere Client. You can install vSphere PowerCLI by referring to this page. To find the virtual machine based on its MAC Address, open vSphere PowerCLI. powercli1

Connect to your Virtual Machine Server (ESX or ESXI) by using command Connect-VIServer. powercli2

After pressing [Enter] twice, you will be presented by a logon window. powercli3

Login to your Virtual Machines Server. powercli4

Then you can find the virtual machine by its MAC Address using this command Get-VM | Get-NetworkAdapter | Where {$_.MacAddress -eq "AA:BB:CC:DD:EE:FF"} | Format-List powercli5

The highlighted one is the virtual machine name in your server. Good luck!

Reference

Finding a virtual machine in VMware vSphere by the MAC address

Installing Zimbra Collaboration Server 8 FOSS on CentOS 6.5

Zimbra is a well known collaboration suite which includes email, calendaring, file sharing, activity streams, social communities and more. The most popular product from Zimbra is Zimbra Collaboration Server. Zimbra Collaboration Server comes with two version: Network Edition and Open Source Edition (FOSS). This documentation shows a simple way to install Zimbra Collaboration Server Open Source Edition in CentOS 6.5.

Zimbra Logo

Getting Started

Prepare the system

# yum update

Disable SELinux

# vi /etc/sysconfig/selinux
 SELINUXTYPE=disabled

Disable firewall

# service iptables stop
# service ip6tables stop
# chkconfig iptables off
# chkconfig ip6tables off

Disable postfix

# service postfix stop
# chkconfig postfix off

Edit hosts file

# vi /etc/hosts
 192.168.1.91 your.zimbra-domain.com

Install dependencies

# yum install nc wget nano make nc sudo sysstat libtool-ltdl glibc perl ntp

Edit ntp configuration file

# vi /etc/ntp.conf
 #server 3.centos.pool.ntp.org iburst
 server your.ntp-server.com iburst

Start ntpdate service

# service ntpdate start
# chkconfig ntpdate on

Make sure you have setup your NS records for your ZCS

your.zimbra-domain.com IN A  192.168.1.91
      IN MX 10 your.zimbra-domain.com

Zimbra Installation

Download zimbra collaboration server open source edition from here

# cd /tmp
# wget http://files2.zimbra.com/downloads/8.0.6_GA/zcs-8.0.6_GA_5922.RHEL6_64.20131203103705.tgz

Extract ZCS

# tar zxvf zcs-8.0.6_GA_5922.RHEL6_64.20131203103705.tgz

Install ZCS and follow the instructions

# cd zxvf zcs-8.0.6_GA_5922.RHEL6_64.20131203103705
# ./install.sh

Set http for web access

# su zimbra
$ zmtlsctl http
$ zmcontrol restart

Now you can access your new ZCS installation in http://your.zimbra-domain.com/.

Quantum Espresso 5.0.3 Using Intel Math Kernel Library 11.0 Optimization

Quantum Espresso is a software for electronic-structure calculations and materials modeling at the nanoscale. The installation of Quantum Espresso is quite easy because it includes external libraries which it needs. But we are encouraged to install Quantum Espresso using our own machine optimized external libraries such as Basic Linear Algebra Subprograms (BLAS), Linear Algebra Package (LAPACK), Scalable LAPACK (SCALAPACK), and Fastest Fourier Transform in the West (FFTW).

External Libraries

There are several repositories or development teams which provide external libraries. For example is Netlib which provides BLAS, LAPACK, and SCALAPACK. But, for machines with Intel processor, maybe the best external libraries out there is Intel® Math Kernel Library which has a non-commercial version as standalone or included in Intel® Parallel Studio XE 2013 for Linux that can be downloaded in Intel Non-Commercial Software Development. Intel® Math Kernel Library provides BLAS, LAPACK, SCALAPACK, and even FFTW interfaces.

Getting Started

My test machine is Supermicro X9DRD-7LN4F which has Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz with 8 cores and 16 threads and 64 GB RAM. For compilers I will be using Intel compilers which is included in Intel® Parallel Studio XE 2013 for Linux and OpenMPI for parallelization.

Installing Intel® Parallel Studio XE 2013 for Linux
tar zxvf sources/parallel_studio_xe_2013_sp1_update1.tgz
./parallel_studio_xe_2013_sp1_update1/install.sh

Please make your selection by entering an option.
Root access is recommended for evaluation.

1. Run as a root for system wide access for all users [default]
2. Run using sudo privileges and password for system wide access for all users
3. Run as current user to limit access to user level

h. Help
q. Quit

Please type a selection [1]: 3

Step 1 of 7 | Welcome
--------------------------------------------------------------------------------
Welcome to the Intel(R) Parallel Studio XE 2013 SP1 Update 1 for Linux*
installation program.


--------------------------------------------------------------------------------
You will complete the steps below during this installation:
Step 1 : Welcome
Step 2 : License agreement
Step 3 : Activation
Step 4 : Intel(R) Software Improvement Program
Step 5 : Options
Step 6 : Installation
Step 7 : Complete

--------------------------------------------------------------------------------
Press "Enter" key to continue or "q" to quit: [Enter]

Step 1 of 7 | Welcome > Missing Optional Prerequisite(s)
--------------------------------------------------------------------------------
There are one or more optional unresolved issues. It is highly recommended to
resolve them all before you continue the installation. You can fix them without
exiting from the installation and re-check. Or you can quit from the
installation, fix them and run the installation again.
--------------------------------------------------------------------------------
Missing optional prerequisites
-- Intel(R) Fortran Composer XE 2013 SP1 Update 1 for Linux*: Unsupported OS
-- Intel(R) C++ Composer XE 2013 SP1 Update 1 for Linux*: Unsupported OS
-- Power analysis is not enabled.
--------------------------------------------------------------------------------
1. Skip missing optional prerequisites [default]
2. Show the detailed info about issue(s)
3. Re-check the prerequisites

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 1

--------------------------------------------------------------------------------
Do you agree to be bound by the terms and conditions of this license agreement?
Type 'accept' to continue or 'decline' to go back to the previous menu: accept

Step 3 of 7 | Activation
--------------------------------------------------------------------------------
If you have purchased this product and have the serial number and a connection
to the internet you can choose to activate the product at this time. Activation
is a secure and anonymous one-time process that verifies your software licensing
rights to use the product. Alternatively, you can choose to evaluate the product
or defer activation by choosing the evaluate option. Evaluation software will
time out in about one month. Also you can use license file, license manager, or
remote activation if the system you are installing on does not have internet
access activation options.
--------------------------------------------------------------------------------
1. Use existing license [default]
2. I want to activate my product using a serial number
3. I want to evaluate my product or activate later
4. I want to activate either remotely, or by using a license file, or by using a license manager

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 1

Step 4 of 7 | Intel(R) Software Improvement Program
--------------------------------------------------------------------------------
Help improve your experience with Intel(R) software
Participate in the design of future Intel software. Select 'Yes' to give us permission to learn about how you use your Intel software and we will do the rest.
    - No personally identifiable information is collected
    - There are no additional follow-up emails by opting in
    - You can stop participating at any time

    Learn more about the Intel(R) Software Improvement Program
    http://software.intel.com/en-us/articles/software-improvement-program

With your permission, Intel may automatically receive anonymous information about how you use your current and future Intel(R) Software Development Products.
--------------------------------------------------------------------------------
1. Yes, I am willing to participate and improve Intel software. (Recommended)
2. No, I don't want to participate in the Intel(R) Software Improvement Program
at this time.

b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection: 2

Step 5 of 7 | Options > Pre-install Summary
--------------------------------------------------------------------------------
Install location:
    /home/pras/intel/parallel_studio_xe_2013

Component(s) selected:
    Intel(R) VTune(TM) Amplifier XE 2013 Update 13                         544MB
        Command line interface
        Sampling Driver kit
        Power Driver kit
        Graphical user interface

    Intel(R) Inspector XE 2013 Update 8                                    296MB
        Command line interface
        Graphical user interface

    Intel(R) Advisor XE 2013 Update 5                                      470MB
        Command line interface
        Graphical user interface

    Intel(R) Fortran Compiler XE 14.0 Update 1                             612MB
        Intel Fortran Compiler XE

    Intel(R) C++ Compiler XE 14.0 Update 1                                 580MB
        Intel C++ Compiler XE

    Intel(R) Debugger 13.0                                                 533MB
        Intel Debugger

    Intel(R) Math Kernel Library 11.1 Update 1                             2.0GB
        Intel MKL core libraries
        Intel(R) Xeon Phi(TM) coprocessor support
        Fortran 95 interfaces for BLAS and LAPACK
        GNU* Compiler Collection support

    Intel(R) Integrated Performance Primitives 8.0 Update 1                2.8GB
        Intel IPP single-threaded libraries

    Intel(R) Threading Building Blocks 4.2 Update 1                        127MB
        Intel TBB

    GNU* GDB 7.5                                                           170MB
        GNU* GDB 7.5 on Intel(R) 64 (Provided under GNU General Public License
v3)
        GDB Eclipse* Integration on Intel(R) 64 (Provided under Eclipse Public
License v.1.0)

Install Space Required:     7.1GB

Driver parameters:
    Sampling driver install type: Driver kit files will be installed only
    Power driver install type: Driver kit files will be installed only
    Drivers will be accessible to everyone on this system. To restrict access, select Customize Installation > Change advanced options > Driver is accessible to and set group access.


1. Start installation Now [default]
2. Customize installation

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 2

Step 5 of 7 | Options > Architecture selection
--------------------------------------------------------------------------------
Select the architecture(s) where your applications will run. If unsure, accept the default options below or see
http://software.intel.com/en-us/articles/about-target-architecture-selection-during-installation for more information.

Target Architecture(s) of your applications:
--------------------------------------------------------------------------------
1. [x]    IA-32
2. [x]    Intel(R) 64

3. Finish architecture selection [default]

Note: This system is an Intel(R) 64 architecture system.
Your application may be built to run on either IA-32 or Intel(R) 64
architectures.

b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [3]: 3

Step 5 of 7 | Options
--------------------------------------------------------------------------------
You are now ready to begin installation. You can use all default installation
settings by simply choosing the "Start installation Now" option or you can
customize these settings by selecting any of the change options given below
first. You can view a summary of the settings by selecting "Show pre-install
summary".
--------------------------------------------------------------------------------
1. Start installation Now [default]

2. Change install directory      [ /home/pras/intel/parallel_studio_xe_2013 ]
3. Change components to install  [ Custom ]
4. Show pre-install summary

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 3

Step 5 of 7 | Options > Component selection
--------------------------------------------------------------------------------
Select the component you wish to install. When you have completed your changes,
select option 1 to continue with the installation.
--------------------------------------------------------------------------------
1. Finish component selection [default]

2. Intel(R) VTune(TM) Amplifier XE 2013 Update 13 [All]
3. Intel(R) Inspector XE 2013 Update 8 [All]
4. Intel(R) Advisor XE 2013 Update 5 [All]
5. Intel(R) Fortran Compiler XE 14.0 Update 1 [All]
6. Intel(R) C++ Compiler XE 14.0 Update 1 [All]
7. Intel(R) Debugger 13.0 [All]
8. Intel(R) Math Kernel Library 11.1 Update 1 [Custom]
9. Intel(R) Integrated Performance Primitives 8.0 Update 1 [Custom]
10. Intel(R) Threading Building Blocks 4.2 Update 1 [All]
11. GNU* GDB 7.5 [Custom]

Install Space Required:     7.1GB

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 8

Step 5 of 7 | Options > Component selection
--------------------------------------------------------------------------------
You may choose not to install some components of this product. Optional
components are shown with an option number of the left. Entering that number
will select/unselect that component for installation. When you have completed
your changes, select option 1 to return to previous menu.
--------------------------------------------------------------------------------
1. Finish component selection [default]

2. [x] Intel(R) Math Kernel Library 11.1 Update 1
3.     [x] Intel MKL core libraries
4.     [x] Intel(R) Xeon Phi(TM) coprocessor support
5.     [x] Fortran 95 interfaces for BLAS and LAPACK
6.     [x] GNU* Compiler Collection support
7.     [ ] PGI* compiler support
8.     [ ] SP2DP interface for Intel(R) 64
9.     [ ] Cluster support

Install Space Required:     2.0GB

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 2

Step 5 of 7 | Options > Component selection
--------------------------------------------------------------------------------
You may choose not to install some components of this product. Optional
components are shown with an option number of the left. Entering that number
will select/unselect that component for installation. When you have completed
your changes, select option 1 to return to previous menu.
--------------------------------------------------------------------------------
1. Finish component selection [default]

2. [ ] Intel(R) Math Kernel Library 11.1 Update 1
3.     [ ] Intel MKL core libraries
4.     [ ] Intel(R) Xeon Phi(TM) coprocessor support
5.     [ ] Fortran 95 interfaces for BLAS and LAPACK
6.     [ ] GNU* Compiler Collection support
7.     [ ] PGI* compiler support
8.     [ ] SP2DP interface for Intel(R) 64
9.     [ ] Cluster support

Install Space Required:       0MB
For successful functioning of the selected components, selection of additional
components will be changed.

Intel(R) Xeon Phi(TM) coprocessor support
Fortran 95 interfaces for BLAS and LAPACK
GNU* Compiler Collection support


h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 2

Step 5 of 7 | Options > Component selection
--------------------------------------------------------------------------------
You may choose not to install some components of this product. Optional
components are shown with an option number of the left. Entering that number
will select/unselect that component for installation. When you have completed
your changes, select option 1 to return to previous menu.
--------------------------------------------------------------------------------
1. Finish component selection [default]

2. [x] Intel(R) Math Kernel Library 11.1 Update 1
3.     [x] Intel MKL core libraries
4.     [x] Intel(R) Xeon Phi(TM) coprocessor support
5.     [x] Fortran 95 interfaces for BLAS and LAPACK
6.     [x] GNU* Compiler Collection support
7.     [x] PGI* compiler support
8.     [x] SP2DP interface for Intel(R) 64
9.     [x] Cluster support

Install Space Required:     2.1GB

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 1

Step 5 of 7 | Options > Component selection
--------------------------------------------------------------------------------
Select the component you wish to install. When you have completed your changes,
select option 1 to continue with the installation.
--------------------------------------------------------------------------------
1. Finish component selection [default]

2. Intel(R) VTune(TM) Amplifier XE 2013 Update 13 [All]
3. Intel(R) Inspector XE 2013 Update 8 [All]
4. Intel(R) Advisor XE 2013 Update 5 [All]
5. Intel(R) Fortran Compiler XE 14.0 Update 1 [All]
6. Intel(R) C++ Compiler XE 14.0 Update 1 [All]
7. Intel(R) Debugger 13.0 [All]
8. Intel(R) Math Kernel Library 11.1 Update 1 [All]
9. Intel(R) Integrated Performance Primitives 8.0 Update 1 [Custom]
10. Intel(R) Threading Building Blocks 4.2 Update 1 [All]
11. GNU* GDB 7.5 [Custom]

Install Space Required:     7.2GB

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 1

Step 5 of 7 | Options
--------------------------------------------------------------------------------
You are now ready to begin installation. You can use all default installation
settings by simply choosing the "Start installation Now" option or you can
customize these settings by selecting any of the change options given below
first. You can view a summary of the settings by selecting "Show pre-install
summary".
--------------------------------------------------------------------------------
1. Start installation Now [default]

2. Change install directory      [ /home/pras/intel/parallel_studio_xe_2013 ]
3. Change components to install  [ Custom ]
4. Show pre-install summary

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 1

Installation of Open Source Components
--------------------------------------------------------------------------------
Open source components provided under GNU General Public License v3 or Eclipse
Public License v.1.0 will be installed.

Includes:
    GNU* GDB 7.5 (Provided under GNU General Public License v3)
    GDB Eclipse* Integration (Provided under Eclipse Public License v.1.0)

For further details, please refer to the product Release Notes.
--------------------------------------------------------------------------------
1. Continue the installation [default]

b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 1

Step 5 of 7 | Options > Missing Optional Prerequisite(s)
--------------------------------------------------------------------------------
There are one or more optional unresolved issues. It is highly recommended to
resolve them all before you continue the installation. You can fix them without
exiting from the installation and re-check. Or you can quit from the
installation, fix them and run the installation again.
--------------------------------------------------------------------------------
Missing optional prerequisites
-- No compatible Java* Runtime Environment (JRE) found
-- 32-bit libraries not found
--------------------------------------------------------------------------------
1. Skip missing optional prerequisites [default]
2. Show the detailed info about issue(s)
3. Re-check the prerequisites

h. Help
b. Back to the previous menu
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [1]: 1

Step 6 of 7 | Installation
--------------------------------------------------------------------------------
Each component will be installed individually. If you cancel the installation,
some components might remain on your system. This installation may take several
minutes, depending on your system and the options you selected.
--------------------------------------------------------------------------------
Installing Command line interface component... done
--------------------------------------------------------------------------------
Installing Sampling Driver kit component... done
--------------------------------------------------------------------------------
Installing Power Driver kit component... done
--------------------------------------------------------------------------------
Installing Graphical user interface component... done
--------------------------------------------------------------------------------
Installing Command line interface component... done
--------------------------------------------------------------------------------
Installing Graphical user interface component... done
--------------------------------------------------------------------------------
Installing Command line interface component... done
--------------------------------------------------------------------------------
Installing Graphical user interface component... done
--------------------------------------------------------------------------------
Installing Intel Fortran Compiler XE for IA-32 component... done
--------------------------------------------------------------------------------
Installing Intel Fortran Compiler XE for Intel(R) 64 component... done
--------------------------------------------------------------------------------
Installing Intel C++ Compiler XE for IA-32 component... done
--------------------------------------------------------------------------------
Installing Intel C++ Compiler XE for Intel(R) 64 component... done
--------------------------------------------------------------------------------
Installing Intel Debugger for IA-32 component... done
--------------------------------------------------------------------------------
Installing Intel Debugger for Intel(R) 64 component... done
--------------------------------------------------------------------------------
Installing Intel MKL core libraries for Intel(R) 64 component... done
--------------------------------------------------------------------------------
Installing Intel(R) Xeon Phi(TM) coprocessor support component... done
--------------------------------------------------------------------------------
Installing Fortran 95 interfaces for BLAS and LAPACK for Intel(R) 64
component... done
--------------------------------------------------------------------------------
Installing GNU* Compiler Collection support for Intel(R) 64 component... done
--------------------------------------------------------------------------------
Installing Intel MKL core libraries for IA-32 component... done
--------------------------------------------------------------------------------
Installing Fortran 95 interfaces for BLAS and LAPACK for IA-32 component... done
--------------------------------------------------------------------------------
Installing GNU* Compiler Collection support for IA-32 component... done
--------------------------------------------------------------------------------
Installing Intel IPP single-threaded libraries for IA-32 component... done
--------------------------------------------------------------------------------
Installing Intel IPP single-threaded libraries for Intel(R) 64 component... done
--------------------------------------------------------------------------------
Installing Intel TBB component... done
--------------------------------------------------------------------------------
Installing GNU* GDB 7.5 on Intel(R) 64 (Provided under GNU General Public
License v3) component... done
--------------------------------------------------------------------------------
Installing GDB Eclipse* Integration on Intel(R) 64 (Provided under Eclipse
Public License v.1.0) component... done
--------------------------------------------------------------------------------
Finalizing product configuration...
--------------------------------------------------------------------------------
Preparing driver configuration scripts... done
--------------------------------------------------------------------------------
Press "Enter" key to continue
[Enter]

Step 7 of 7 | Complete
--------------------------------------------------------------------------------
Thank you for installing and for using the Intel(R) Parallel Studio XE 2013 SP1
Update 1 for Linux*.

Support services start from the time you install or activate your product. If
you have not already done so, please create your support account now to take
full advantage of your product purchase.

Your support account gives you access to free product updates and upgrades as
well as interactive technical support at Intel(R) Premier Support.

To create your support account, please visit the Intel(R) Software Development
Products Registration Center web site
https://registrationcenter.intel.com/RegCenter/registerexpress.aspx?media=GPZ
--------------------------------------------------------------------------------
q. Quit
--------------------------------------------------------------------------------
Please type a selection or press "Enter" to accept default choice [q]: q

$ vi ~/.bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions
export PATH=/home/<user>/intel/bin:$PATH
export LD_LIBRARY_PATH=/home/<user>/intel/lib/intel64:/home/<user>/intel/mkl/lib/intel64:$LD_LIBRARY_PATH

export PATH=/home/<user>/intel/bin:$PATH
export LD_LIBRARY_PATH=/home/<user>/intel/lib/intel64:/home/<user>/intel/mkl/lib/intel64:$LD_LIBRARY_PATH
Installing OpenMPI
tar zxvf sources/openmpi-1.6.5.tar.tar.gz
cd openmpi-1.6.5/
./configure --prefix=/home/<user>/openmpi-install CC=icc FC=ifort F77=ifort CXX=icpc 2>&1 | tee c.txt
make all install 2>&1 | tee m.txt

$ vi ~/.bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions
export PATH=/home/<user>/openmpi-install/bin:/home/<user>/intel/bin:$PATH
export LD_LIBRARY_PATH=/home/<user>/openmpi-install/lib:/home/<user>/intel/lib/intel64:/home/<user>/intel/mkl/lib/intel64:$LD_LIBRARY_PATH

export PATH=/home/<user>/openmpi-install/bin:$PATH
export LD_LIBRARY_PATH=/home/<user>/openmpi-install/lib:$LD_LIBRARY_PATH
Compiling Intel MKL FFTW Interface
cd ~/intel/mkl/interfaces/fftw3x_cdft/
make libintel64 compiler=intel mpi=openmpi INSTALL_DIR=/home/<user>/fftw3x_cdft-install 2>&1 | tee m.txt
Installing Quantum Espresso 5.0.3
cd ~/sources/
tar zxvf espresso-5.0.2.tar.gz
mv -v espresso-5.0.2 ~/espresso-5.0.2-mkl
cd ~
cp -v ~/espresso-5.0.2/archive/* ~/espresso-5.0.2-mkl/archive/
cp -v ~/espresso-5.0.2/pseudo/* ~/espresso-5.0.2-mkl/pseudo/
cp -v ~/sources/espresso-5.0.2-5.0.3.diff ~/espresso-5.0.2-mkl/
cd ~/espresso-5.0.2-mkl/
tar zxvf ~/sources/PHonon-5.0.2.tar.gz
patch -p1 < espresso-5.0.2-5.0.3.diff
./configure --enable-parallel --with-scalapack CXX=icpc SCALAPACK_LIBS="-lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64" BLAS_LIBS="-L/home/<user>/intel/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" LAPACK_LIBS="-L/home/<user>/intel/mkl/lib/intel64 -lmkl_lapack95_lp64" MPI_LIBS="-L/home/<user>/intel/mkl/lib/intel64 -lmkl_blacs_openmpi_lp64" FFT_LIBS="-L/home/<user>/fftw3x_cdft-install -lfftw3x_cdft_lp64" FCFLAGS="-O2 -xavx" CFLAGS="-O2 -xavx" FFLAGS="-O2 -xavx" 2>&1 | tee c.txt
make all 2>&1 | tee m.txt
cd PW/tests
./check.pw.j

If you do not have previous Quantum Espresso installation, don't worry, the installer and test program will automatically download required files for you. When you compare between Quantum Espresso installation with internal libraries and Quantum Espresso with Intel MKL libraries, you can expect 25% speed up. Good luck!