Changeset 7294 in project


Ignore:
Timestamp:
01/07/08 07:16:45 (12 years ago)
Author:
Ivan Raikov
Message:

Added eggdoc documentation.

Location:
mpi/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • mpi/trunk/mpi.meta

    r7287 r7294  
    44
    55 (files "mpi.scm" "collcomm.scm" "comm.scm" "group.scm" "init.scm" "msgs.scm"
    6         "mpi-eggdoc.scm" "mpi.setup" "tests/run.scm" "tests/mandel.scm")
     6        "mpi-eggdoc.scm" "mpi.setup" "tests/run.scm" )
    77
    88 ; Your egg's license:
     
    2323 (author "Ivan Raikov")
    2424
    25  (synopsis "MPI bindings"))
     25 (synopsis "Message-passing Interface (MPI)"))
  • mpi/trunk/mpi.setup

    r7267 r7294  
    55  (make-pathname #f fn ##sys#load-dynamic-extension))   
    66
     7(define (mpi-try-compile header ldflags cppflags)
     8  (and (try-compile
     9        (string-append header "\n"
     10                        "int main(int argc, char **argv) { MPI_Init(&argc, &argv); return 0; }\n")
     11        ldflags: ldflags
     12        cflags: cppflags
     13        )
     14       (cons ldflags cppflags)))
     15
     16(define-macro (mpi-test . rest)
     17  `(or (any identity (map (lambda (p) (mpi-try-compile (first p) (second p) (third p))) ',rest))
     18       (error "unable to figure out location of MPI library")))
     19
     20(define ld+cpp-options
     21  (mpi-test ("#include <mpi.h>" "-lmpi" "")
     22            ("#include <mpi.h>" "-lmpi" "-I/usr/include/mpi")
     23            ("#include <mpi.h>" "-lmpi" "-I/usr/lib/openmpi/include")))
     24
    725(compile -O -d2 -s -o ,(dynld-name "mpi")
    826         ,@(if has-exports? '(-check-imports -emit-exports mpi.exports) '())
    9          mpi.scm  -lchicken -ldl -lm -lmpi)
     27         mpi.scm  -lchicken -ldl  -L "\"" ,(car ld+cpp-options) "\""
     28         -C "\"" ,(cdr ld+cpp-options) "\"")
    1029
    11 ;(run (csi -qbs mpi-eggdoc.scm > mpi.html))
     30(run (csi -qbs mpi-eggdoc.scm > mpi.html))
    1231
    1332(install-extension
     
    1736
    1837  ; Files to install for your extension:
    19   `(,(dynld-name "mpi") ;"mpi.html"
     38  `(,(dynld-name "mpi") "mpi.html"
    2039    ,@(if has-exports? '("mpi.exports") (list)) )
    2140
    2241  ; Assoc list with properties for your extension:
    2342  `((version 1.0)
    24     ;(documentation "mpi.html")
     43    (documentation "mpi.html")
    2544    ,@(if has-exports? `((exports "mpi.exports")) (list)) ))
  • mpi/trunk/tests/run.scm

    r7285 r7294  
    2424(require-extension srfi-4)
    2525(require-extension mpi)
     26
    2627
    2728(define (make-srfi4-vector-map vlen vset! vref)
     
    5758(define myrank      (MPI:comm-rank comm-world))
    5859
    59 ;; comm_size, comm_rank
    6060(define (mpi-test)
    61 
    62   (print myrank ": comm_size = " size)
    6361
    6462  ;; Barrier
    6563  (MPI:barrier comm-world)
    6664
    67   (print "***  Simple send/receive")
    6865  (if (zero? myrank)
    6966      (let ((data  "aa"))
Note: See TracChangeset for help on using the changeset viewer.