Sunday, January 16, 2011

Too frequent update of Symantec Endpoint Protection in Mac

I have installed Symantec Endpoint Protection (SEP) for Mac in an unmanaged mode. The problem is its LiveUpdate runs too frequently and I can't disable it or modify. Although it provides Symantec Scheduler UI, it doesn't look like working at the beginning.

It turns out SEP installs a default schedule owned by a root user, which a normal user can't see in his/her Symantec Scheduler UI. A solution is as follows:
1. Open a terminal
2. Type sudo symsched -d all
3. Setup a new schedule by using Symantec Scheduler UI or a command like,
symsched LiveUpdate "Update All Daily" 1 1 -daily 13:00 "All Products" -quiet


Sunday, January 09, 2011

Time measurement methods

I've just recently tried to decide what is the best way to measure times. The followings are a short summary I got after browsing a few sources in the Internet (See references).

1. gettimeofday
-. Resolution : 1 microsecond
-. Have a negative time issue due to clock reset or NTP

2. clock_gettime(CLOCK_MONOTONIC)
-. Resolution : 1 nanosecond
-. Use HPET, an external chipset on board.
-. An optimal choice, considering both reliability and portability

-. Resolution : 1 nanosecond
-. Use RDTSC, a cpu instruction
-. Very light-weight but lots of issues on reliability
-. For a short run and if it is clear on the reliability issues (see Ref 2.), it's good to use.


Wednesday, July 07, 2010

HDF5 MPIIO's Hyperslab_by_chunk.c error in Mac

In Mac, I got a runtime error after compiling hyperslab's chunk example, Hyperslab_by_chunk.c

As mentioned in here, the error is Mac-specific but the solution what I found is a little different.

instead of

I have tested with HDF5 version 1.8.5.

Monday, November 02, 2009

A few useful Windows HPC commands

0. Set Default scheduler
set CCP_SCHEDULER=headnode_name

1. clusrun
One can run the following command from his desktop to setup compute node environments

clusrun /user:domain\username dir
clusrun /user:domain\username xcopy \\headnode_name\dir .
clusrun /user:domain\username setx PATH "somepath"

2. job
job list /scheduler:headnode_name

3. node
node list /scheduler:headnode_name

5. cluscfg
cluscfg setcreds

Sunday, November 01, 2009

Imporve serialize() in R for windows

serialize() function of R is very slow in Windows. My observation is that calling realloc is the bottle neck. The workaround can be replacing realloc with Rm_realloc in $R_HOME/src/main/serialize.c. More specifically, I have updated as follows:

1. In function, resize_buffer(...), replace
mb->buf = realloc(mb->buf, newsize);
mb->buf = Rm_realloc(mb->buf, newsize);

2. In function, free_mem_buffer(...), replace

The following is a short result running on my Windows 7 desktop:
The original:
> system.time(serialize(matrix(0, 1000, 1000), NULL))
user system elapsed
5.74 4.39 10.15
> system.time(serialize(matrix(0, 2000, 2000), NULL))
user system elapsed
85.40 74.80 161.62

After updating:
> system.time(serialize(matrix(0, 1000, 1000), NULL))
user system elapsed
0.78 0.30 1.10
> system.time(serialize(matrix(0, 2000, 2000), NULL))
user system elapsed
6.21 4.13 10.54

Saturday, October 31, 2009

Compile Rmpi with Windows MPI (HPC pack)

Compile Rmpi ( in Windows

1. Install HPC Pack 2008 SDK with SP1 and modify line 314 in mpi.h (installed_dir\Include) as follows:
//typedef __int64 MPI_Offset;
typedef long long MPI_Offset;

2. Download Rmpi from

3. Untar the source and modify src/ by changing directory and library option (-lmsmpi) as follows:
PKG_CFLAGS = -I"C:\Program Files\Microsoft HPC Pack 2008 SDK\Include" -DMPI2 -DWin32
PKG_LIBS = -L"C:\Program Files\Microsoft HPC Pack 2008 SDK\Lib\i386" -lmsmpi

4. Compile and install

5. Build for re-distribution
R CMD build --binary Rmpi

Wednesday, October 28, 2009

Setting up a non-admin SVN repository shared with multiple users

A trick is using SSH with public key as described in

As a quick summary, I have set up a SVN repository as follows:
1. create a svn root directory, which will share with others, and create a repository:
$ mkdir /path/svnshare
$ svnadmin create /path/svnshare/project

2. Get public keys of user to share svn repository and insert to ~/.ssh/authorized_keys the following line:
command="/path/to/svnserve -t -r /path/svnshare --tunnel-user=[USERID]",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty [KEY_TYPE] [PUB_KEY] [COMMENT]
[.] should be replaced with users' information

3. Now users can access the shared svn repository remotely as follows:
svn co svn+ssh://[MYID]@[SERVER IP or DNS]/project

Note that use relative path names of repository after server ip or dns