jeudi 10 juin 2010

Latex中双列双行显示图片的方法

latex单栏文档需要显示四张图片(图片大小相当),形如

1 2
3 4

我找到方法了
\usepackage[subfigure]{graphfig}

\begin{Figure}{caption is four pictures.}[label]
\graphfile*[34]{img1.PNG}[img1]
\graphfile*[34]{img2.png}[img2]\\
\graphfile*[34]{img3.PNG}[img3]
\graphfile*[34]{img4.png}[img4]
\end{Figure}

说明:必须是Figure,不是figure;

\graphfile[图宽/行宽×100]{图形名}[子图标题]

\graphfile*[图高/行宽×100]{图形名}[子图标题]

可以用命令 \ref{label} 或 \ref{label:a} 引用组图或者子图。该宏包还有一个选项:AllowH,表示图形应出现在图形命令处,不能浮动。

使用该宏包还有一个好处,就是可以自动将图形水平居中,无须添加 \centering 命令或 center 环境。另外,不用注明图形确切尺寸,只要给出与行宽的百分比即可。

mercredi 9 juin 2010

.emacs 20100610

(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(blink-cursor-mode nil)
)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

;;-----------------------------------------------------------------------------
;; to enable highlighting when searching
(setq search-highlight t)
;;to highlight matches when using serch-and-replace
(setq query-replace-highlight t)
;;用win+space为set-mark键,留出ctrl+space热键作为输入法
(global-set-key (kbd "C-SPC") 'nil)
(global-set-key (kbd "s-SPC") 'set-mark-command)
;;设置字体大小
(set-default-font "DejaVu Sans Mono-8")
;;在窗口左侧显示行号
(global-linum-mode t)
;;在状态栏(mode line)上显示行号
(setq column-number-mode t)
(setq line-number-mode t)
;;鼠标自动避开指针,如当你输入的时候,指针到了鼠标的位置,鼠标有点挡住视线了
(mouse-avoidance-mode 'animate)
;;指针不要闪
(blink-cursor-mode -1)
(transient-mark-mode 1)
;;当指针到一个括号时,自动显示所匹配的另一个括号
(show-paren-mode 1)
;;去掉烦人的警告铃声
(setq visible-bell nil)
;;去掉Emacs和gnus启动时的引导界面
(setq inhibit-startup-message t)
(setq gnus-inhibit-startup-message t)
;; 显示时间
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(display-time)
;;当前行高亮
(require 'hl-line)
(global-hl-line-mode t)
;;滚动条在窗口右侧
'(scroll-bar-mode (quote right))
;;在窗口的标题栏上显示文件名称
(setq frame-title-format "%n%F/%b")
;;允许emacs和外部其他程序的粘
(setq x-select-enable-clipboard t)
;;支持中键粘贴
(setq mouse-yank-at-point t)
;;所有的问题用y/n方式,不用yes/no方式
(fset 'yes-or-no-p 'y-or-n-p)
;;go-line快捷键
(global-set-key (kbd "M-g") 'goto-line)
;; 在行首 C-k 时,同时删除该行。
(setq-default kill-whole-line t)
;;保存前,删除当前buffer中行尾空格和TAB等whitespace
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;;(setq ansi-color-for-comint-mode t)使用shell,shell中没有乱码
(ansi-color-for-comint-mode-on)
;;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
;; Add the directories to your load path
(add-to-list 'load-path "~/.emacs.d/")
;;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
;;------------------------------------------------------------------------------
;; 启动时的屏幕大小
;;第一种方法,需要根据不同的电脑屏幕大小进行修正
;;第二种方法,思路很好,但是垂直方向(vert)超过了显示范围,需要修正
;;------------------------------------------------------------------------------
;;第一种方法
(setq default-frame-alist
(append '((top . 0)(left . 0)(width . 175)(height . 45))
default-frame-alist))
;;第二种方法
;(defun my-maximized-horz ()
; (interactive)
; (x-send-client-message
; nil 0 nil "_NET_WM_STATE" 32
; '(1 "_NET_WM_STATE_MAXIMIZED_HORZ" 0)))
;(defun my-maximized-vert ()
; (interactive)
; (x-send-client-message
; nil 0 nil "_NET_WM_STATE" 32
; '(1 "_NET_WM_STATE_MAXIMIZED_VERT" 0)))
;(defun my-maximized ()
; (interactive)
; (x-send-client-message
; nil 0 nil "_NET_WM_STATE" 32
; '(1 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
; (interactive)
; (x-send-client-message
; nil 0 nil "_NET_WM_STATE" 32
; '(1 "_NET_WM_STATE_MAXIMIZED_VERT" 0)))
;(my-maximized)
;;-----------------------------------------------------------------------------
;; cursor-chg.el
;;-----------------------------------------------------------------------------
(require 'cursor-chg) ; Load this library
(change-cursor-mode 1) ; On for overwrite/read-only/input mode
(toggle-cursor-type-when-idle 1) ; On when idle
;;-----------------------------------------------------------------------------
;;调用smart-compile
;;-----------------------------------------------------------------------------
(require 'smart-compile)
(global-set-key [f7] 'smart-compile)
;;-----------------------------------------------------------------------------
;; add emacs-wiki
;;-----------------------------------------------------------------------------
;; Add the directories to your load path
;(add-to-list 'load-path "~/.emacs.d/emacs-wiki-2.72")
;;调用emacs-wiki
;(require 'emacs-wiki)
;(require 'emacs-wiki-menu)
;(load "emacs-wiki")
;;----------------------------------------------------------------------------
;; 调用tabbar,在head中显示打开文件列表
;;-----------------------------------------------------------------------------
(require 'tabbar)
(tabbar-mode t)
;;全部分在同一组
(setq tabbar-buffer-groups-function
(lambda ()
(list "All")))
;;----------------------------------------------------------------
;; add a buffer modification state indicator in the tab label,
;; and place a space around the label to make it looks less crowd
;;----------------------------------------------------------------
(defadvice tabbar-buffer-tab-label (after fixup_tab_label_space_and_flag activate)
(setq ad-return-value
(if (and (buffer-modified-p (tabbar-tab-value tab))
(buffer-file-name (tabbar-tab-value tab)))
(concat " + " (concat ad-return-value " "))
(concat " " (concat ad-return-value " ")))))
;; called each time the modification state of the buffer changed
(defun ztl-modification-state-change ()
(tabbar-set-template tabbar-current-tabset nil)
(tabbar-display-update))
;; first-change-hook is called BEFORE the change is made
(defun ztl-on-buffer-modification ()
(set-buffer-modified-p t)
(ztl-modification-state-change))
(add-hook 'after-save-hook 'ztl-modification-state-change)
;; this doesn't work for revert, I don't know
;;(add-hook 'after-revert-hook 'ztl-modification-state-change)
(add-hook 'first-change-hook 'ztl-on-buffer-modification)
;;----------------------------------------------------------------------------
;; 使用一个简单的 Elisp 函数
;;:如果选定了区域,那么按 M-w 就复制这个区域;如果没有选定区域,那么 M-w 就复制一行
;;-----------------------------------------------------------------------------
(defun huangq-kill-ring-save (&optional n)
"If region is active, copy region. Otherwise, copy line."
(interactive "p")
(if mark-active
(kill-ring-save (region-beginning) (region-end))
(if (> n 0)
(kill-ring-save (line-beginning-position) (line-end-position n))
(kill-ring-save (line-beginning-position n) (line-end-position)))))

(global-set-key (kbd "M-w") 'huangq-kill-ring-save)

;;-----------------------------------------------------------------------------
;;备份设置
;;-----------------------------------------------------------------------------
;;emacs还有一个自动保存功能,默认在~/.emacs.d/auto-save-list里,
;;这个非常有用,具体可以参见Sams teach yourself emacs in 24hours(我简称为sams24)
;;启用版本控制,即可以备份多次
(setq version-control t)
;;备份最原始的版本两次,记第一次编辑前的文档,和第二次编辑前的文档
(setq kept-old-versions 2)
;;备份最新的版本五次,理解同上
(setq kept-new-versions 5)
;;删掉不属于以上7中版本的版本
(setq delete-old-versions t)
;;设置备份文件的路径
(setq backup-directory-alist '(("." . "~/.emacs.tmp")))
;;备份设置方法,直接拷贝
(setq backup-by-copying t)
;;-----------------------------------------------------------------------------
;; 快速在另外一个buffer中打开shell并cd 到当前 buffer 所在的目录
;;-----------------------------------------------------------------------------
(defun kid-switch-to-shell ()
(interactive)
(when (null (cdr (window-list)))
(split-window-horizontally))
(let ((file buffer-file-name))
(other-window 1)
(shell)
(when file
(end-of-buffer)
(when (looking-back shell-prompt-pattern)
(insert "cd " (file-name-directory file))
(call-interactively 'comint-send-input)))))
(global-set-key (kbd "") 'kid-switch-to-shell)
;;-----------------------------------------------------------------------------
;; occur
;;-----------------------------------------------------------------------------
(defun occur-fortran ()
(interactive )
(setq mawei "\\(?:\\\\|\\\\|\\\\|\\\\|\\\\|\\\\)")
(occur mawei)
;(occur (regexp-opt '("program""subroutine""function""call")))
)
(global-set-key (kbd "") 'occur-fortran)
;;-----------------------------------------------------------------------------
;; 每当我在 M-x shell启动shell,然后执行 exit 退出 shell 之后,buffer 并不自动关闭,很不爽,
;; 下面的指令,可以让其自动关闭。
;;-----------------------------------------------------------------------------
(add-hook 'shell-mode-hook 'wcy-shell-mode-hook-func)
(defun wcy-shell-mode-hook-func ()
(set-process-sentinel (get-buffer-process (current-buffer))
#'wcy-shell-mode-kill-buffer-on-exit)
)
(defun wcy-shell-mode-kill-buffer-on-exit (process state)
(message "%s" state)
(if (or
(string-match "exited abnormally with code.*" state)
(string-match "finished" state))
;(kill-buffer (current-buffer))))
(kill-buffer-and-window )))
;;-----------------------------------------------------------------------------
;; 当前buffer的文件名,前加“./”,后去掉后面4位数字,输入到minibuffer
;;-----------------------------------------------------------------------------
;(define-key minibuffer-local-map [f8]
;(lambda ()
;(interactive)
;(insert (concat "./") )
;(insert (substring (buffer-name (current-buffer-not-mini)) 0 -4 ))
;(insert (concat ".exe") )
;)
;)
;
;(defun current-buffer-not-mini ()
;"Return current-buffer if current buffer is not the *mini-buffer*
;else return buffer before minibuf is activated."
;(not (window-minibuffer-p)) (current-buffer)
;(if (eq (get-lru-window) (next-window))
;(window-buffer (previous-window)) (window-buffer (next-window))))

;;------------------------------------------------------------------------------
;; auto-complete
;; -----------------------------------------------------------------------------
;; Add the directories to your load path
(add-to-list 'load-path "~/.emacs.d/")
(require 'auto-complete)
;;(global-auto-complete-mode t)
;; if only use the line above, auto-complete-mode does not work in a lot of modes
;; for example LaTeX-mode
(add-hook 'f90-mode-hook 'auto-complete-mode)
(add-hook 'emacs-lisp-mode-hook 'auto-complete-mode)
(add-hook 'LaTeX-mode-hook 'auto-complete-mode)
(add-hook 'latex-mode-hook 'auto-complete-mode)
;; Use C-n/C-p to select candidates
;;(define-key ac-complete-mode-map "\M-n" 'ac-next)
;;(define-key ac-complete-mode-map "\M-p" 'ac-previous)
;; you can stop completion by pressing M-/.
;;(define-key ac-complete-mode-map "\M-TAB" 'ac-stop)
;; Completion by TAB
;;
;; Add following code to your .emacs.
;;
(define-key ac-complete-mode-map "\t" 'ac-complete)
(define-key ac-complete-mode-map "\r" nil)

;; Do What I Mean mode
;; -------------------
;;
;; If DWIM (Do What I Mean) mode is enabled,
;; the following features is available:
;;
;; a. TAB (ac-expand) behave as completion (ac-complete)
;; when only one candidate is left
;; b. TAB (ac-expand) behave as completion (ac-complete)
;; after you select candidate
;; c. Disapear automatically when you
;; complete a candidate.
;;
;; DWIM mode is enabled by default.
;; You can enable this feature by
;; setting `ac-dwim' to t.
;;
(setq ac-dwim t)
;;------------------------------------------------------------------------------
;; quit a frame the same way no matter what kind of frame you are on"
;;------------------------------------------------------------------------------
;;This method, when bound to C-x C-c, allows you to close an emacs frame the
;;same way, whether it's the sole window you have open, or whether it's
;;a "child" frame of a "parent" frame. If you're like me, and use emacs in
;;a windowing environment, you probably have lots of frames open at any given
;;time. Well, it's a pain to remember to do Ctrl-x 5 0 to dispose of a child
;;frame, and to remember to do C-x C-x to close the main frame (and if you're
;;not careful, doing so will take all the child frames away with it). This
;;is my solution to that: an intelligent close-frame operation that works in
;;all cases (even in an emacs -nw session).
;;(global-set-key "\C-x\C-c" 'ic) ;forward reference
(defun ic ()
"quit a frame the same way no matter what kind of frame you are on"
(interactive)
(if (eq (car (visible-frame-list)) (selected-frame))
;;for parent/master frame...
(if (> (length (visible-frame-list)) 1)
;;close a parent with children present
(delete-frame (selected-frame))
;;close a parent with no children present
(save-buffers-kill-emacs))
;;close a child frame
(delete-frame (selected-frame))))
;;------------------------------------------------------------------------------
;; hithlight-80+:
;;------------------------------------------------------------------------------
;;(add-to-list 'load-path "~/.emacs.d/")
;;(global-highlight-80+-mode t)
(require 'highlight-80+)
(add-hook 'f90-mode-hook 'highlight-80+-mode)
;;------------------------------------------------------------------------------
;; 自动补全括号
;; 输入左边的括号,就会自动补全右边的部分.包括(), "", [] , {} , 等等。
;;------------------------------------------------------------------------------
(defun auto-pair ()
(interactive)
(make-local-variable 'skeleton-pair-alist)
(setq skeleton-pair-alist '(
(\"_"\"")
(\'_"'")
(\(")")
(\[_"]")
(\{_"}")
;(?\{?_"}")
))
(setq skeleton-pair t)
(local-set-key (kbd "\"") 'skeleton-pair-insert-maybe)
(local-set-key (kbd "(") 'skeleton-pair-insert-maybe)
(local-set-key (kbd "{") 'skeleton-pair-insert-maybe)
(local-set-key (kbd "'") 'skeleton-pair-insert-maybe)
(local-set-key (kbd "[") 'skeleton-pair-insert-maybe))
(add-hook 'f90-mode-hook 'auto-pair)
(add-hook 'latex-mode-hook 'auto-pair)
(add-hook 'LaTeX-mode-hook 'auto-pair)
;;------------------------------------------------------------------------------
;; redo/undo
;;------------------------------------------------------------------------------
(require 'redo)
(global-set-key (kbd "C-/") 'undo)
(global-set-key (kbd "M-/") 'redo)

;;------------------------------------------------------------------------------
;; flyspell.el
;;
;; flyspell is an Emacs package that highlights misspelld words as you type;
;; Remark:
;; `flyspell-mode' uses `ispell-mode'. Thus all Ispell options are
;; valid. For instance, a personal dictionary can be used by
;; invoking `ispell-change-dictionary'.
;;
;; ispell-program-name = "aspell"
;; ispell-aspell-dict-dir = "/usr/lib/aspell"
;;------------------------------------------------------------------------------
;; enable flyspell-mode (minor mode) in latex-mode (major mode)
(add-hook 'latex-mode-hook 'flyspell-mode) ;; for latex
(add-hook 'LaTeX-mode-hook 'flyspell-mode) ;;for AUCtex
;; enable flyspell-prog-mode (minor mode) in f90-mode (major mode)
;; (add-hook 'f90-mode-hook 'flyspell-prog-mode)
(setq ispell-local-dictionary "american")
;;(setq ispell-local-dictionary "french")


;;------------------------------------------------------------------------------
;; for LaTeX-mode-hook, both latex and AUCtex
;;------------------------------------------------------------------------------

;; If you want to make AUCTeX aware of style files and multi-file
;; documents right away, insert the following in your `.emacs' file.
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)

;; To turn RefTeX Mode on and off in a particular buffer, use `M-x
;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the
;; following lines to your `.emacs' file:
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
(add-hook 'LaTeX-mode-hook 'outline-minor-mode) ; with Emacs latex mode

AUCTex outline-minor-mode

show-entry
hide-entry
显示或者隐藏鼠标所在的section, subsection, subsubsection本身

show-subtree
hide-subtree
显示或者隐藏鼠标所在的section, subsection, subsubsection以及其所包含的单元。

show-all
hide-body
显示或者隐藏整个文件

hide-other
隐藏其他部分,只显示鼠标所在的section, subsection, subsubsection

hide-leaves (=hide-entre)
显示或者隐藏鼠标所在的section, subsection, subsubsection本身

hide-subleves
只显示section, subsection, subsubsection名称,不显示细节

show-children
Show all direct subheadings of this heading.



install Emacs

use Synaptic Package Manager install:
Emacs 23
AUCtex

mardi 8 juin 2010

latex编译命令

for example thesis.tex

latex thesis.tex -> thesis.dvi
latex thesis.tex -> thesis.dvi
bibtex thesis
latex thesis.tex -> thesis.dvi
dvi2ps thesis.dvi ->thesis.ps
ps2pdf thesis.ps -> thesis.pdf

mercredi 2 juin 2010

Procedure to mount ISO images under Linux

Procedure to mount ISO images under Linux

1) You must login as a root user, if not root user then switch to root user using following command:
$ su -

2) Create the directory i.e. mount point:
# mkdir -p /mnt/disk

3) Use mount command as follows to mount iso file called disk1.iso:
# mount -o loop disk1.iso /mnt/disk

4) Change directory to list files stored inside an ISO image:
# cd /mnt/disk
# ls -l

mardi 1 juin 2010

Using Intel Compilers for Linux with Ubuntu


Published On : June 1, 2010 1:20 AM PDT

rev history:
29 April 2010: This guide also applies to Ubuntu 10.04.

rev history:
2009 November 3: added notes for Ubuntu 9.10

Note: Newer versions of this linux distribution may NOT be officially supported by Intel Compiler Professional Editions 11.1. Please see your ReleaseNotes document with your compiler to find the support Linux distributions and versions. These instructions are merely to help install the compiler, keep in mind that versions of this distribution NOT in the ReleaseNotes document are NOT tested nor supported. You are on your own here.

Introduction :


Using Intel(R) Compilers version 11.1 under Ubuntu (10.04, 9.10, 9.04, 8.04 and 8.10) Desktop and Debian Desktop

For older Ubuntu and Debian versions, see THIS ARTICLE. Make sure to use the latest Intel Compilers version 11.1. Older compilers will not be compatible with the latest Ubuntu distributions. For compatibility and supported versions always read the ReleaseNotes document for your compiler.

These notes apply to Ubuntu Desktop. Ubuntu Server was not tested but should be similar.

2 November 2009: Ubuntu 10.04 and 9.10

For users of Ubuntu 10 and 9.10, follow the instructions here. If you have 9.04 or older, skip ahead to the section titled "Ubuntu 9.04 and Older"

BEFORE YOU INSTALL Intel(R) Fortran for Linux or Intel(R) C++ for Linux on your fresh Ubuntu Desktop installation, you will first need to install several packages to prepare the system to serve as a development platform. First, open a Terminal window and become root:
sudo bash
(type your user password)

At this point, you should have a root shell. Test this with command 'whoami' which should return "root"

Check that gcc is installed. By default. Check this with:

gcc --version

It should return "gcc (Ubuntu 4.4.1-4ubuntu8) 4.4.1 (or some newer version - as long as it returns a version you have gcc installed)

If, for some reason, you do not have gcc installed, use Synaptic Package Manager (under 'System' -> 'Administration' menus) OR use apt-get to install gcc:


apt-get install gcc


Next, install the 'build-essential' package and package g++. This is not installed by default. Again, use Synaptic Package Manager or apt-get :

apt-get install build-essential

this should also install g++, but in test this with:
g++ --version

if g++ is not found, install it:

apt-get install g++

A few other packages are required:
apt-get install rpm
apt-get install ia32-libs (this is only required on 64bit Ubuntu/Debian systems)

To use the Intel IDB graphical debugger, you will also need the Java JRE 5 or 6 installed. One way to get this is through Synaptic package manager. Open Synaptic and for sources enable Ubuntu's partner repository. Once that is done, use Synaptic to fetch the package sun-java6-jre.

We also recommend fetching the Sun JRE directly from Sun: get the latest JRE from:

http://java.com/en/download/manual.jsp

OR you can use the OpenJDK from the distribution:

apt-get install openjdk-6-jre-headless

Next, Ubuntu 9.10 Desktop does not provide libstdc++5, which is required for the Intel Compilers. You will have to get the package for libstdc++5 from an older Debian or Ubuntu distribution ( 9.04 for example ). A repository is here:

http://packages.debian.org/stable/base/libstdc++5

On this page, you will see the title "The GNU Standard C++ Library V3". Scrolling down, find the table for "Download libstdc++5".

9.10: For 32bit Ubuntu i386 libstdc++5 Installation:
For 32bit Ubuntu systems you will need to install the 32bit version of libstdc++5, that is, the "i386" package.
Select the download for the libstdc++5 package for "i386". Pick a mirror site to begin the download. If you are using Firefox, you will be prompted if you want to "Open with GDebi Package Installer" - select OK to continue. Otherwise, save the deb package and use your favorite package manager to install. Install the i386 libstdc++ deb package. SKIP the Intel 64 Libstdc++5 (AMD64) directions below and find the section on installing the compiler after prerequisites are installed.


9.10: For Intel 64 / AMD64 (64bit Linux installation) Libstdc++5:
follow these instructions IF AND ONLY IF you have a 64bit Ubuntu installation.

Intel 64 installation: Select the download for the libstdc++5 package for "amd64". If you are using Firefox, you will be prompted if you want to "Open with GDebi Package Installer" - select OK to continue. Otherwise, save the deb package and use your favorite package manager to install. Install the amd64 libstdc++ deb package.

by default, the 64bit libstdc++.so.5 library will install in /usr/lib which is linked to /usr/lib64.

Now, you also will need the 32bit libstdc++.so.5 installed in /usr/lib32. Unfortunately, the "i386" version of the libstdc++5 package wants to install in /usr/lib which is your 64bit library directory and where you just installed the "amd64" libraries - so you DON'T want to download and install the "i386" package into the default location.
We'll need to download the "i386" package to a temporary directory, use dpkg to extract the contents to the temp directory, then manually copy the library to /usr/lib32 and create the symbolic link:

First, download libstc++5 package for "i386" - save to disk and do NOT launch a package manger to install it. Save it in your 'Downloads' folder or /tmp (or any other scratch directory).
Using your root terminal window, cd to the directory where you have downloaded the .deb package, it should have a name similar to 'libstdc++5_3.3.6-18_i386.deb'. The exact version is not important, but make sure it is a "i386" deb package.
Extract to the local directory:

dpkg --extract libstdc++5_3.3.6-18_i386.deb ./

Notice that a 'usr/' folder was created and the package contents extracted here. Now we'll copy the library to /usr/lib32

cd usr/lib
cp libstdc++.so.5.0.7 /usr/lib32
cd /usr/lib32
ln -s libstdc++.so.5.0.7 libstdc++.so.5


9.10: Installing the Compiler Now That Prerequisities are Installed (32 and 64bit):

Once you've completed the above, extract your compiler .tgz kit, cd to the compiler installation directory, and run ./install.sh

During the installation, you WILL get a warning message "Detected operating system Debian* (generic) is not supported", followed by
----------------------------------------------------------------- ---------------
Missing optional pre-requisite
-- operating system type is not supported.
-- system glibc or kernel version not supported or not detectable
-- binutils version not supported or not detectable
----------------------------------------------------------------- ---------------
"Would you like to perform an unsupported install of this product [yes/no] (no)?"

enter "yes"

This will complete the installation. Keep in mind, you will get this warning from the compiler installer until such time as this particular OS and version are supported. Once installed, you can read the ReadMe notes in ...installdir.../Documentation directory which has a list of the supported Linux distributions and versions.


Debugger Notes:

Known Intel® IDB Debugger issues under Ubuntu:
1) Ubuntu 9.x versions, IA32 and Intel64 platforms:

- When loading an executable, a startup dialog may appear that should not. If this dialog, "Unable to locate source file “…/start.S – Do you like to search for it manually?” appears, click ‘No’ and continue normal debugging.

- Avoid using debug commands such as ‘next’, ‘step’ on the Console Window of the Debugger GUI since this may lead to unexpected behavior of the debugger; use the corresponding options ‘Continue’, Step Into’ etc. from the Run menu instead.

2) Ubuntu 9.10, IA32 and Intel64 platforms:

- You need to set the environment variable GDK_NATIVE_WINDOWS=1 to avoid a known bug in Eclipse delivered with Ubuntu 9.10. Add export GDK_NATIVE_WINDOWS=1
to your ~/.bashrc file or execute this command on command line:
export GDK_NATIVE_WINDOWS=1



Ubuntu 9.04 and Older:

In order to use Intel(R) Compilers ( Fortran or C++ ) under Ubuntu 9.04, 8.04 or 8.10 you will need the latest 11.0 or 10.1 version of the Intel compiler(s). Older 10.0 and 9.1 versions of the compilers may not work properly under Ubuntu 9.04, 8.04 or 8.10. Keep in mind that new versions of Ubuntu/Debian may not be OFFICIALLY supported by the Intel Compilers. Please see your ReleaseNotes document with your compiler version for a list of officially supported distributions and versions.

If you have active support for your compiler, you can download the latest Intel compiler version from
https://registrationcenter.intel.com

BEFORE YOU INSTALL Intel(R) Fortran for Linux or Intel(R) C++ for Linux on your fresh Ubuntu Desktop installation, you will first need to install several packages to prepare the system to serve as a development platform:

Check that gcc is installed. By default. Check this with:

gcc --version

By default, Ubuntu 8.04 Desktop installs gcc 4.2.3-2ubuntu7. 8.10 should have gcc 4.3.2, 9.04 gcc 4.3.3

If, for some reason, you do not have gcc installed, use Synaptic Package Manager (under 'System' -> 'Administration' menus) OR use apt-get to install gcc:


apt-get install gcc


Next, install g++. This is not installed by default. Again, use Synaptic Package Manager or apt-get to install package "g++"

apt-get install build-essential
apt-get install g++


Next, you need to install the 32bit compatibility library libstdc++.so.5. To do this, use apt-get or Synaptic Package Manager to retrieve and install package "libstdc++5"

apt-get install libstdc++5

This package may require installing another package as a prerequisite,
"gcc-3.3-base"

If so, go ahead and install this older gcc package.

For x86-64 architecture, you will also need a number of other packages, including package 'ia32-libs' to install the 32bit versions of libstdc++.so.5 in /usr/lib32 as well as 32bit header files in libc6-dev-i386. These notes apply to Ubuntu 9.04 but should also apply to 8.10 and 8.04

apt-get install ia32-libs
apt-get install lib32stdc++6
apt-get install libc6-dev-i386
apt-get install gcc-multilib
apt-get install g++-multilib


Finally, there is an optional package to consider: The 11.0 version of the Intel Compiler for Linux has a graphical
debugger, a new graphical interface for the IDB debugger. If you want to use this debugger, please make sure to install the Java JRE version 1.5 or greater. This can be done at anytime after the installation of the compiler. However, you will get a warning message about 'missing prerequisite' for the JRE - simply ignore that message and proceed with the installation. OR to avoid that message and enable the graphical IDE, get the latest JRE from:

http://java.com/en/download/manual.jsp

Once installation of prerequisites is complete, you are ready to start the Intel compiler(s) installation. During the installation, you may get a message "Detected operating system Debian* (generic) is not supported", followed by
----------------------------------------------------------------- ---------------
Missing optional pre-requisite
-- operating system type is not supported.
-- system glibc or kernel version not supported or not detectable
-- binutils version not supported or not detectable
----------------------------------------------------------------- ---------------
"Would you like to perform an unsupported install of this product [yes/no] (no)?"

enter "yes"

This will complete the installation. Keep in mind, you will get this warning from the compiler installer until such time as this particular OS and version are supported. Once installed, you can read the ReadMe notes in ...installdir.../Documentation directory which has a list of the supported Linux distributions and versions.


Using the Compiler:

The next step after installing the compiler is to set up the user environment to use the compiler and libraries. First, locate your documentation: it is installed in /Documentation/en_US (currently, US English is the language supported in the documentation). Under this directory, read the /Documentation/en_US/getting_started_f.pdf or getting_started_c.pdf document. Read how to use iccvars.sh or ifortvars.sh (or the .csh equivalents) to set your environment to use the compiler(s). You may wish to put the 'source ifortvars.....' command into your home startup scripts.

Next, use a browser to open /Documentation/en_US/documentation_f.htm or documentation_c.htm which is an index to the rest of the online documents. Browse the documents to familiarize yourself with their locations and contents.

Finishing up: Usage

Once the compilers are installed, it is necessary to source the ifortvars.sh or ifortvars.csh file to properly set the user environment to use the Intel compilers. This (these) commands can be placed in a user's ~/.bashrc or other system login file (fortran 11.1.046 example shown below, bash user):

64bit compiler selection:
source /opt/intel/Compiler/11.1/046/bin/ifortvars.sh intel64

32bit compiler selection:
source /opt/intel/Compiler/11.1/046/bin/ifortvars.sh ia32

C/C++ users: substitute "iccvars" for "ifortvars" above.

Other versions: substitute your actual minor version for "046" above.
Also, if you are a CSH or TCSH user, use ifortvars.csh or iccvars.csh as appropriate.

Need more help? Join our User Forums:
Fortran: http://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/
C/C++: http://software.intel.com/en-us/forums/intel-c-compiler/