[BACK]Return to note.txt CVS log [TXT][DIR] Up to [local] / OpenXM / src / R / r-packages

Annotation of OpenXM/src/R/r-packages/note.txt, Revision 1.4

1.4     ! takayama    1: $OpenXM: OpenXM/src/R/r-packages/note.txt,v 1.3 2015/03/24 07:49:06 takayama Exp $
1.1       takayama    2:
                      3: See also OpenXM/src/hgm/note.txt
                      4:
                      5: * C source codes.
                      6:  C sources and headers should be developed and edited in the directory
                      7:  OpenXM/src/hgm in order to provide a standalone mode without R
                      8:  in the OpenXM project.
                      9:  They are copied by rsync to hgm/src from OpenXM/src/hgm/
                     10:  See the Makefile.
                     11:
                     12: * How to develope and tests.
                     13: (1) Develope the system in OpenXM/src/hgm as a standalone system.
                     14:     See OpenXM/src/hgm/so3 as an example.
                     15: (2) Add rsync-[projectname] to OpenXM/src/R/r-packages/Makefile
                     16:     See the example of the project so3.
                     17: (3) Example in the case of hgm.
                     18:     R CMD check hgm
                     19:         It generates pdf documents and shared libraries.
                     20:         hgm.Rcheck/hgm-Ex.Rout contains the result of the execution of examples
                     21:         embedded in the documents in man.
                     22:         hgm.Rcheck/hgm-manual.pdf is the PDF manual.
                     23:
                     24:     See also http://fe.math.kobe-u.ac.jp/Movies/oxvh,
                     25:        2012-09-05-r-package[.mov]
                     26:        2013-02-06-Ropenxm[.mov]
                     27:
                     28:     R CMD INSTALL hgm
                     29:         R
                     30:         library(hgm)
                     31:         You can check hgm.so3nc by hand.
                     32:     R CMD REMOVE hgm
                     33:         It is used to remove the test library.
                     34:
                     35:     R --help
1.2       takayama   36: (4) Binary build on Windows.
                     37:     R CMD INSTALL --build hgm
                     38:     ( Check R CMD INSTALL --help for details. )
                     39:    or
                     40:     R CMD build --binary hgm  (perhaps, obsolete style)
1.1       takayama   41:
                     42: * Notes.
                     43:     library.dynam()   shows a list of shared libraries loaded.
                     44:     dyn.load("hgm.so") can be used to load shared library by hand.
                     45:     getwd() gets the current working directory.
                     46:
1.3       takayama   47:
                     48: * Undocumented functions which are removed temporary fro NAMESPACE. 2015.03.24
                     49: export(hgm.so3nc)
                     50: export(hgm.normalizingConstantOfFisherDistributionOnSO3)
                     51: export(hgm.normalizingConstantOfOrthant)
                     52: export(hgm.normalizingConstantOfBinghamDistribution)
                     53: export(hgm.z.mleDemo)
                     54: export(hgm.ssFB)
                     55:
1.1       takayama   56:
1.4     ! takayama   57: * Check the memory leak by valgrind and by AddressSanitizer. 2015.04.01
        !            58: ** Valgrind
        !            59: apt-get install valgrind
        !            60:
        !            61: cat >>~/.valgrindrc
        !            62: --leak-check=full
        !            63: --track-origins=yes
        !            64: ctrl-D
        !            65:
        !            66: R CMD check hgm --use-valgrind
        !            67: more hgm.Rcheck/hgm-Ex.Rout
        !            68: Example of an error (Note that there is no error message in *.log)
        !            69: ==14813== Conditional jump or move depends on uninitialised value(s)
        !            70: ==14813==    at 0xCA20170: mh_t (jack-n.c:1361)
        !            71:   for (i=0; i<=M_m; i++) {
        !            72:     -- snip
        !            73:     serror = myabs((partial_sum[i]-partial_sum[i-1])/partial_sum[i-1]);
        !            74:   }
        !            75:   partial_sum[-1] is accessed!
        !            76:
        !            77: As to details, search "valgrind" in R-exts.pdf
        !            78:
        !            79: * R CMD check hgm --use-gct

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>