Showing posts with label Tips. Show all posts
Showing posts with label Tips. Show all posts

Monday, September 20, 2010

Fixed "Apache2 Startup warning: NameVirtualHost *:80 has no VirtualHosts"

Based on the information from the following two links, I could remove this annoying error message in my linux box by commenting out the first line (i.e., "NameVirtualHost: *:80" ) in "/etc/apache2/ports.conf":

Tuesday, November 03, 2009

Install NumPy & SciPy with ATLAS from source on SUSE Linux 10.1

Yesterday I finally installed NumPy/SciPy with ATLAS from source on SUSE Linux 10.1 (X86_64) to "$HOME/local" directory. Here is the summary of procedures (based on the instructions from SciPy home page with some modifications).

Install required packages

Python "nose" packages

swig-1.3.40

Build ATLAS with lapack (3.1.1)
Basically I followed the example instructions from ATLAS home page. Below are the key resulting options for lapack and ATLAS:

LAPCAK
The LAPACK root directory is "/users/kks/toos/lapack-3.2.1-patched" where I modified "make.inc" as follows:

Then typing "make lib" results in the LAPACK library "lapack_LINUX.a" there.

ATLAS
The ATLAS root directory is "/users/kks/tools/ATLAS" and its build directory is "/users/kks/tools/mybuild/atlas". In the "atlas" directoy, I built ATLAS as follows:

Then I followed these steps in the "lib" directory under the build directory to build a full LAPACK library (static one, i.e., "liblapack.a"):

Still, the shared version (i.e., "liblapack.so") is missing. So I convereted the static library to a shared one as follows (based on this suggestion):

Now we have both static and shared versions of full LAPACK libraries based on ATLAS!

Build UMFPACK (5.4.0)
As said, I followed basically the same procedures outlined here with the following "UFconfig.mk" settings (note that "CFLAGS" appear twice):

Build FFTW (3.2.2)

I didn't try these, but one may add the following additional options for "configure":

Build Numpy and Scipy (development version)
Unlike the said instructions, I didn't create "site.cfg" files, but simply did the following to install both the packages:

That's it!

Monday, November 26, 2007

Automatic Mount/Unmount Novell NetWare Shares in Linux

Purpose
  • Automatically mount Novell NetWare shares without prompting passwords when logging in.
  • Automatically unmount Novell NetWare shares without prompting passwords when logging out.

Configurations

  • "$HOME/.nwclient"
    • Create the file with permissions of "0600".
    • Add "Server/User Password" pair per each line as follows:
      NW_Server1/NW_UN1 PW1
      NW_Server2/NW_UN2 Password2

      where "NW_UN1/2" could be either just a NetWare username or
      a NetWare username appended by its context (e.g.,
      "joe.ee_dept.eng_school.great_univ").

  • "$HOME/.bash_profile"
    • Add "ncpmount" command as follows:
    • if [ ! -d /mount/point1/dir1_in_mounted_share ]; then
      # Check the above to prevent duplicate mount.
      ncpmount -S NW_Server1 -U NW_UN1 -u Linux_UN -V path/to/subdirectory1 -A NW_Server1_DNS_Name /mount/point1
      fi
      # We need "-m" below to allow multiple mounts from the same server.
      if [ ! -d /mount/point2/dir2_in_mounted_share ]; then
      ncpmount -S NW_Server2 -U NW_UN2 -u Linux_UN -V path/to/subdirectory2 -m -A NW_Server2_DNS_Name /mount/point2
      fi
      if [ ! -d /mount/point3/dir3_in_mounted_share ]; then
      ncpmount -S NW_Server2 -U NW_UN2 -u Linux_UN -V path/to/subdirectory3 -m -A NW_Server2_DNS_Name /mount/point3
      fi


  • "$HOME/.bash_logout"
    • Add "ncpumount" command as follows:
    •  if [ `w | grep pts | grep Linux_UN | wc -l` -eq 1 ]; then
      # The following will be executed only when this shell is the last login shell.

      if [ -d /mount/point1/dir1_in_mounted_share ]; then
      ncpumount /mount/point1
      fi
      if [ -d /mount/point2/dir2_in_mounted_share ]; then
      ncpumount /mount/point2
      fi
      if [ -d /mount/point3/dir3_in_mounted_share ]; then
      ncpumount /mount/point3
      fi
      fi

Tuesday, April 17, 2007

Linux Programming Environment Settings in Windows XP (with VMware)

  • GNU Emacs color settings & syntax highlighting for 256-color terminals (with PuTTy and screen):
    • See EmacsWiki: PuTTy for PuTTy settings.
      • Just change "xterm-256color" to "putty-256color" in "terminal-type-string".
    • Install "xterm-256color.el" under "lisp/term" directory.
      • Create "putty-256color.el" having the following line in the same directory:
        • (load "term/xterm-256color" nil t)
    • Install (from source) 256-color-enabled "screen".
    • Add "term putty-256color" in "$HOME/.screenrc".
  • Static IP address with NAT for Ubuntu server in VMware:
    • Update "interface" file under "/etc/networking" as follows:
      • From:

        iface eth0 inet dhcp


      • To:

        iface eth0 inet static
        address xxx.yyy.zzz.abc
        gateway xxx.yyy.zzz.2
        netmask 255.255.255.0
        network xxx.yyy.zzz.0
        broadcast xxx.yyy.zzz.255

Monday, July 31, 2006

Windows XP Tips

To turn off the beep:
  1. Open the Device Manager.
  2. Select View -> Show Hidden Devices, and disable "Beep" under "Non-Plug and Play Drivers".

Friday, December 31, 2004

On debugging STL with VS.NET 2003 debugger

From: "Oleg Starodumov"
Subject: Re: debugging with STL
Newsgroups: microsoft.public.vc.debugger

> how do I use VS C++ .NET 2003 debugger to view the data in a STL
> container, such as vector and list?
> If I just type the name of a vector into the Watch window, all I see is some
> beginning and ending memory address.
>

There is no direct support for STL containers in Watch window.
Instead you have to work with the members of the corresponding
container types.

For a vector, you can start with these examples:

"v._Myfirst" -> the first element
"v._Myfirst, 10" -> 10 elements
"v._Myfirst[1]" -> the element at index 1
"v.size()" -> number of elements

For a list:

"l._Mysize" -> number of elements
"l._Myhead->_Next->_Myval" -> the first element
"l._Myhead->_Next->_Next->_Myval" -> the second element
"l._Myhead->_Next->_Next->_Next->_Myval" -> the third element, etc.

Regards,
Oleg