File: mtest.def

package info (click to toggle)
mpich 4.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 101,184 kB
  • sloc: ansic: 1,040,629; cpp: 82,270; javascript: 40,763; perl: 27,933; python: 16,041; sh: 14,676; xml: 14,418; f90: 12,916; makefile: 9,270; fortran: 8,046; java: 4,635; asm: 324; ruby: 103; awk: 27; lisp: 19; php: 8; sed: 4
file content (14 lines) | stat: -rw-r--r-- 656 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
macros:
    HAS_MTEST: 1

subcode: mtest_malloc(size)
    MTestArgList *head = MTestArgListCreate(argc, argv)
    int send_rank = 0, recv_rank = 1;
    $(for:a in send,recv)
        $if grank == $(a)_rank
            $my mtest_mem_type_e $(a)_memtype, int $(a)_device
            $(a)_memtype = MTestArgListGetMemType(head, "$(a)mem")
            $(a)_device = MTestArgListGetInt_with_default(head, "$(a)dev", 0)
            MTestMalloc($(size), $(a)_memtype, NULL, &buf, $(a)_device)
            MTestPrintfMsg(1, "Allocating buffer: memtype=%s, device=%d, size=%d\n", MTest_memtype_name($(a)_memtype), $(a)_device, $(size))
    MTestArgListDestroy(head)