1. Make sure you have Haskell module loaded.

[yuy121@cyberstar231: ~]# module list
Currently Loaded Modulefiles:
  1) realvnc/4.5r21561   6) matlab/R2012a      11) emacs/23.2
  2) java/1.6.0_45       7) mkl/10.3.10.319    12) git/1.7.3.1
  3) intel/11.1.073      8) netcdf/gcc/4.1.1   13) gcc/4.7.0
  4) pgi/10.9            9) python/2.7.3       14) haskell/4.0.0
  5) gstreamer/0.10.32  10) latex/051112

2. update cabal

[yuy121@cyberstar231: ~]# cabal update
Config file path source is default config file.
Config file /gpfs/home/yuy121/.cabal/config not found.
Writing default configuration to /gpfs/home/yuy121/.cabal/config
Downloading the latest package list from hackage.haskell.org
Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install

Note that all the cabal-related files are stored in ~/.cabal

3. cabal reinstall

[yuy121@cyberstar231: ~]# cabal install cabal-install
Resolving dependencies...
Downloading Cabal-1.16.0.3...
[ 1 of 65] Compiling Distribution.Compat.Exception ( /tmp/Cabal-1.16.0.3-10477/Cabal-1.16.0.3/Distribution/Compat/Exception.hs, /tmp/Cabal-1.16.0.3-10477/Cabal-1.16.0.3/dist/setup/Distribution/Compat/Exception.o )
[ 2 of 65] Compiling Distribution.Compat.TempFile ( /tmp/Cabal-1.16.0.3-10477/Cabal-1.16.0.3/Distribution/Compat/TempFile.hs, /tmp/Cabal-1.16.0.3-10477/Cabal-1.16.0.3/dist/setup/Distribution/Compat/TempFile.o )


...

[64 of 65] Compiling Distribution.Client.Install ( Distribution/Client/Install.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Install.o )
[65 of 65] Compiling Main             ( Main.hs, dist/build/cabal/cabal-tmp/Main.o )
Linking dist/build/cabal/cabal ...
Installing executable(s) in /gpfs/home/yuy121/.cabal/bin

4. Install biosff

[yuy121@cyberstar231: ~]# cabal install biosff
Resolving dependencies...
Downloading cmdargs-0.10.3...
Configuring cmdargs-0.10.3...
Building cmdargs-0.10.3...
Preprocessing library cmdargs-0.10.3...
[ 1 of 25] Compiling System.Console.CmdArgs.Implicit.Ann ( System/Console/CmdArgs/Implicit/Ann.hs, dist/build/System/Console/CmdArgs/Implicit/Ann.o )

...

[8 of 8] Compiling Main             ( src/Flower/Main.hs, dist/build/flower/flower-tmp/Main.o )
Linking dist/build/flower/flower ...
Installing library in /gpfs/home/yuy121/.cabal/lib/biosff-0.3.3/ghc-7.4.2
Installing executable(s) in /gpfs/home/yuy121/.cabal/bin
Registering biosff-0.3.3...

5. Check flower

[yuy121@cyberstar231: ~]# ~/.cabal/bin/flower 
flower: Please provide an input file - or use --help for more information.
Comments Off on Haskell on Cyberstar
C-x C-f /ssh:you@cyberstar.psu.edu:~/scratch/blah
Comments Off on Tramp: Accessing remote file by emacs over ssh

Number of Processors

[yuy121@cyberstar231: ~]# grep "^processor" /proc/cpuinfo 
processor	: 0
processor	: 1
processor	: 2
processor	: 3
processor	: 4
processor	: 5
processor	: 6
processor	: 7
processor	: 8
processor	: 9
processor	: 10
processor	: 11
processor	: 12
processor	: 13
processor	: 14
processor	: 15
processor	: 16
processor	: 17
processor	: 18
processor	: 19
processor	: 20
processor	: 21
processor	: 22
processor	: 23
processor	: 24
processor	: 25
processor	: 26
processor	: 27
processor	: 28
processor	: 29
processor	: 30
processor	: 31

Memory Information

[yuy121@cyberstar231: ~]# cat /proc/meminfo 
MemTotal:     528642176 kB
MemFree:      524562356 kB
Buffers:        461100 kB
Cached:        2118892 kB
SwapCached:          0 kB
Active:        1672396 kB
Inactive:      1595732 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:     528642176 kB
LowFree:      524562356 kB
SwapTotal:     2096472 kB
SwapFree:      2096472 kB
Dirty:             120 kB
Writeback:           0 kB
AnonPages:      688120 kB
Mapped:         118552 kB
Slab:           427984 kB
PageTables:       6836 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:  504306536 kB
Committed_AS:  1280648 kB
VmallocTotal: 34359738367 kB
VmallocUsed:    371456 kB
VmallocChunk: 34359366851 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     2048 kB
Comments Off on System Information on Cyberstar

The data is at

/gpfs/scratch/yuy121/Bio

The program is at

/gpfs/work/yuy121
Last login: Fri Feb  1 03:11:02 2013 from *.cse.psu.edu
[yuy121@cyberstar: ~]# cd /gpfs/work/yuy121/samtools/
[yuy121@cyberstar: /gpfs/work/yuy121/samtools]# ls
AUTHORS          bam_reheader.c  faidx.c         misc
bam2bcf.c        bam_rmdup.c     faidx.h         NEWS
bam2bcf.h        bam_rmdupse.c   INSTALL         padding.c
bam2bcf_indel.c  bam_sort.c      kaln.c          phase.c
bam2depth.c      bam_stat.c      kaln.h          razf.c
bam_aux.c        bamtk.c         khash.h         razf.h
bam.c            bam_tview.c     klist.h         razip.c
bam_cat.c        bcftools        knetfile.c      sam.c
bam_color.c      bedidx.c        knetfile.h      sam.h
bam_endian.h     bgzf.c          kprobaln.c      sam_header.c
bam.h            bgzf.h          kprobaln.h      sam_header.h
bam_import.c     bgzip.c         kseq.h          sample.c
bam_index.c      ChangeLog.old   ksort.h         sample.h
bam_lpileup.c    COPYING         kstring.c       samtools
bam_mate.c       cut_target.c    kstring.h       samtools.1
bam_md.c         errmod.c        libbam.a        sam_view.c
bam_pileup.c     errmod.h        Makefile        win32
bam_plcmd.c      examples        Makefile.mingw
[yuy121@cyberstar: /gpfs/work/yuy121/samtools]# ls /gpfs/scratch/yuy121/Bio/
NA19240_GAIIx_100_chr21.bam
[yuy121@cyberstar: /gpfs/work/yuy121/samtools]# ./samtools view -H /gpfs/scratch/yuy121/Bio/NA19240_GAIIx_100_chr21.bam 
[yuy121@cyberstar: /gpfs/work/yuy121/samtools]# ./samtools view /gpfs/scratch/yuy121/Bio/NA19240_GAIIx_100_chr21.bam 
Comments Off on Bio at Cyberstar

Let’s check CRS (Compressed Row Storage) in Python NumPy.

[yuy121@cyberstar: ~]# module list
Currently Loaded Modulefiles:
  1) realvnc/4.5r21561   2) java/1.6.0_20    3) intel/11.1.073    4) pgi/10.9

Load Python module.

[yuy121@cyberstar: ~]# module load python
[yuy121@cyberstar: ~]# module list
Currently Loaded Modulefiles:
  1) realvnc/4.5r21561   6) gmp/5.0.1          11) gcc/4.5.0
  2) java/1.6.0_20       7) mpfr/2.4.2         12) openmpi/gnu/1.4.2
  3) intel/11.1.073      8) ppl/0.10.2         13) python/2.6.5
  4) pgi/10.9            9) cloog-ppl/0.15.9
  5) mkl/10.2.4.032     10) mpc/0.8.1
[yuy121@cyberstar: ~]# python
Python 2.6.5 (r265:79063, Jul 14 2011, 09:22:34) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Check CSR format in NumPy.

\mathbf{A}=\begin{bmatrix}1 & 1 & 2\\ 3 & 4 & 0 \\ 5 & 0 & 7 \\ 0 & 0 & 0\end{bmatrix}
value 1 1 2 3 4 5 7
col_ind 0 1 2 0 1 0 2
row_ptr 0 3 5 7 7
Python 2.6.5 (r265:79063, Jul 14 2011, 09:22:34) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from numpy import array, matrix
>>> from scipy.sparse import csr_matrix
>>> A=[[1, 1, 2], [3, 4, 0], [5, 0, 7], [0, 0, 0]]
>>> c = csr_matrix(A)
>>> c
<4x3 sparse matrix of type '<type 'numpy.int64'>'
	with 7 stored elements in Compressed Sparse Row format>
>>> c.__dict__
{'format': 'csr',
 '_shape': (4, 3),
 'indptr': array([0, 3, 5, 7, 7], dtype=int32),
 'indices': array([0, 1, 2, 0, 1, 0, 2], dtype=int32),
 'maxprint': 50,
 'data': array([1, 1, 2, 3, 4, 5, 7])}
>>> c.data
array([1, 1, 2, 3, 4, 5, 7])
>>> c.indices
array([0, 1, 2, 0, 1, 0, 2], dtype=int32)
>>> c.indptr
array([0, 3, 5, 7, 7], dtype=int32)
Comments Off on Compressed Row Storage Format in Python