{"action":"created","issue":{"url":"https://api.github.com/repos/raffenet/mpich-migrate-test/issues/1480","repository_url":"https://api.github.com/repos/raffenet/mpich-migrate-test","labels_url":"https://api.github.com/repos/raffenet/mpich-migrate-test/issues/1480/labels{/name}","comments_url":"https://api.github.com/repos/raffenet/mpich-migrate-test/issues/1480/comments","events_url":"https://api.github.com/repos/raffenet/mpich-migrate-test/issues/1480/events","html_url":"https://github.com/raffenet/mpich-migrate-test/issues/1480","id":168473531,"number":1480,"title":"Problems in specifying host name in dynamic process spawn via MPI_Comm_spawn...","user":{"login":"raffenet","id":1410792,"avatar_url":"https://avatars.githubusercontent.com/u/1410792?v=3","gravatar_id":"","url":"https://api.github.com/users/raffenet","html_url":"https://github.com/raffenet","followers_url":"https://api.github.com/users/raffenet/followers","following_url":"https://api.github.com/users/raffenet/following{/other_user}","gists_url":"https://api.github.com/users/raffenet/gists{/gist_id}","starred_url":"https://api.github.com/users/raffenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raffenet/subscriptions","organizations_url":"https://api.github.com/users/raffenet/orgs","repos_url":"https://api.github.com/users/raffenet/repos","events_url":"https://api.github.com/users/raffenet/events{/privacy}","received_events_url":"https://api.github.com/users/raffenet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"raffenet","id":1410792,"avatar_url":"https://avatars.githubusercontent.com/u/1410792?v=3","gravatar_id":"","url":"https://api.github.com/users/raffenet","html_url":"https://github.com/raffenet","followers_url":"https://api.github.com/users/raffenet/followers","following_url":"https://api.github.com/users/raffenet/following{/other_user}","gists_url":"https://api.github.com/users/raffenet/gists{/gist_id}","starred_url":"https://api.github.com/users/raffenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raffenet/subscriptions","organizations_url":"https://api.github.com/users/raffenet/orgs","repos_url":"https://api.github.com/users/raffenet/repos","events_url":"https://api.github.com/users/raffenet/events{/privacy}","received_events_url":"https://api.github.com/users/raffenet/received_events","type":"User","site_admin":false},"assignees":[{"login":"raffenet","id":1410792,"avatar_url":"https://avatars.githubusercontent.com/u/1410792?v=3","gravatar_id":"","url":"https://api.github.com/users/raffenet","html_url":"https://github.com/raffenet","followers_url":"https://api.github.com/users/raffenet/followers","following_url":"https://api.github.com/users/raffenet/following{/other_user}","gists_url":"https://api.github.com/users/raffenet/gists{/gist_id}","starred_url":"https://api.github.com/users/raffenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raffenet/subscriptions","organizations_url":"https://api.github.com/users/raffenet/orgs","repos_url":"https://api.github.com/users/raffenet/repos","events_url":"https://api.github.com/users/raffenet/events{/privacy}","received_events_url":"https://api.github.com/users/raffenet/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/raffenet/mpich-migrate-test/milestones/12","html_url":"https://github.com/raffenet/mpich-migrate-test/milestones/mpich2-1.4","labels_url":"https://api.github.com/repos/raffenet/mpich-migrate-test/milestones/12/labels","id":1911842,"number":12,"title":"mpich2-1.4","description":"","creator":{"login":"raffenet","id":1410792,"avatar_url":"https://avatars.githubusercontent.com/u/1410792?v=3","gravatar_id":"","url":"https://api.github.com/users/raffenet","html_url":"https://github.com/raffenet","followers_url":"https://api.github.com/users/raffenet/followers","following_url":"https://api.github.com/users/raffenet/following{/other_user}","gists_url":"https://api.github.com/users/raffenet/gists{/gist_id}","starred_url":"https://api.github.com/users/raffenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raffenet/subscriptions","organizations_url":"https://api.github.com/users/raffenet/orgs","repos_url":"https://api.github.com/users/raffenet/repos","events_url":"https://api.github.com/users/raffenet/events{/privacy}","received_events_url":"https://api.github.com/users/raffenet/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":24,"state":"closed","created_at":"2016-07-29T14:57:29Z","updated_at":"2016-07-30T15:48:19Z","due_on":"2011-03-31T05:00:00Z","closed_at":"2016-07-29T14:57:29Z"},"comments":3,"created_at":"2016-07-30T15:48:19Z","updated_at":"2016-07-30T15:48:21Z","closed_at":null,"body":"**Originally by _shucai@gmail.com_ on 2011-04-27 14:12:00 -0500**\n\n___\nI want to use the MPI_Comm_spawn to create a process and try to specify the node where the slave process is created in the info structure. But the program crashed. The code is attached here:\n\nmaster.c\n```\n#include <stdio.h>\n#include <stdlib.h>\n#include <mpi.h>\n\n#define SLAVE_NODE_NUM 1\nint np = SLAVE_NODE_NUM;\nint slaveComm;\nint errCodes[SLAVE_NODE_NUM];\n\nint main(int argc, char **argv)\n{\n    int rank, size, i;\n    int a, nkeys, err;\n    MPI_Info info;\n\n    MPI_Init(&argc, &argv);\n    MPI_Request request;\n    MPI_Status  status;\n\n    //create info structure\n    MPI_Info_create(&info);\n    MPI_Info_set(info, \"host\", \"bb27\");\n    i = 1;\n    err = MPI_Comm_spawn(\"./slave_process\", MPI_ARGV_NULL, np, info, 0, MPI_COMM_WORLD,\n            &slaveComm, errCodes);\n    if (err != MPI_SUCCESS)\n    {\n        printf(\"MPI return error, %d\\n\", err);\n    }\n\n    char hostName[200];\n    int  len;\n    MPI_Get_processor_name(hostName, &len);\n    hostName[len] = '\\0';\n    printf(\"masterName = %s\\n\", hostName);\n\n    for (i = 0; i < np; i++)\n    {\n        a = i + 10;\n        MPI_Isend(&a, 1, MPI_INT, i, 0, slaveComm, &request);\n        MPI_Wait(&request, &status);\n    }\n\n    printf(\"i in master is %d\\n\", i);\n\n    MPI_Info_free(&info);\n    MPI_Finalize();\n    return 0;\n}\n```\n\nslave.c\n```\n#include <stdio.h>\n#include <stdlib.h>\n#include <mpi.h>\n\nint main(int argc, char *argv[])\n{\n    int rank, i=0;\n\n    MPI_Comm parentComm;\n    MPI_Request request;\n    MPI_Status  status;\n\n    MPI_Init(&argc, &argv);\n    MPI_Comm_get_parent(&parentComm);\n\n    MPI_Comm_rank(MPI_COMM_WORLD, &rank);\n    char hostName[200];\n    int len;\n    MPI_Get_processor_name(hostName, &len);\n    hostName[len] = '\\0';\n    printf(\"slaveName of %d = %s\\n\", rank, hostName);\n\n    MPI_Irecv(&i, 1, MPI_INT, 0, 0, parentComm, &request);\n    MPI_Wait(&request, &status);\n\n    printf(\"i in slave = %d\\n\", i);\n\n    MPI_Comm_free(&parentComm);\n    MPI_Finalize();\n\n    return 0;\n}\n```\n\nThe code is compiled as:\nmpicc slave.c -o slave_process; mpicc master.c\n\nand executed as:\nmpiexec -np 1 ./a.out\n\n(mpich2-1.4rc2 is used for the program execution)\n\nThe output is:\n```\n*** glibc detected *** mpiexec: free(): invalid pointer: 0x000000000095e314 ***\n===#### Backtrace:=====\n/lib/libc.so.6[0x7f3cf8e630ea]\n/lib/libc.so.6(cfree+0x8c)[0x7f3cf8e66c7c]\nmpiexec[0x41bb4f]\nmpiexec[0x414be9]\nmpiexec[0x40cbfe]\nmpiexec[0x40e3c2]\nmpiexec(HYDT_dmxu_poll_wait_for_event+0x1f2)[0x42e282]\nmpiexec[0x40a9ff]\nmpiexec[0x404c4a]\n/lib/libc.so.6(__libc_start_main+0xf4)[0x7f3cf8e0d1c4]\nmpiexec[0x403e99]\n===#### Memory map:====\n00400000-00450000 r-xp 00000000 00:16 71165                              /home/scxiao/software/mpich2-1.4-install/bin/mpiexec.hydra\n00650000-00651000 r--p 00050000 00:16 71165                              /home/scxiao/software/mpich2-1.4-install/bin/mpiexec.hydra\n00651000-00652000 rw-p 00051000 00:16 71165                              /home/scxiao/software/mpich2-1.4-install/bin/mpiexec.hydra\n00652000-00659000 rw-p 00652000 00:00 0 \n00958000-00979000 rw-p 00958000 00:00 0                                  [heap]\n7f3cf4000000-7f3cf4021000 rw-p 7f3cf4000000 00:00 0 \n7f3cf4021000-7f3cf8000000 ---p 7f3cf4021000 00:00 0 \n7f3cf85b9000-7f3cf85c6000 r-xp 00000000 08:01 537718                     /lib/libgcc_s.so.1\n7f3cf85c6000-7f3cf87c6000 ---p 0000d000 08:01 537718                     /lib/libgcc_s.so.1\n7f3cf87c6000-7f3cf87c7000 rw-p 0000d000 08:01 537718                     /lib/libgcc_s.so.1\n7f3cf87c7000-7f3cf87d9000 r-xp 00000000 08:01 540889                     /lib/libresolv-2.7.so\n7f3cf87d9000-7f3cf89d9000 ---p 00012000 08:01 540889                     /lib/libresolv-2.7.so\n7f3cf89d9000-7f3cf89db000 rw-p 00012000 08:01 540889                     /lib/libresolv-2.7.so\n7f3cf89db000-7f3cf89dd000 rw-p 7f3cf89db000 00:00 0 \n7f3cf89dd000-7f3cf89e1000 r-xp 00000000 08:01 540882                     /lib/libnss_dns-2.7.so\n7f3cf89e1000-7f3cf8be1000 ---p 00004000 08:01 540882                     /lib/libnss_dns-2.7.so\n7f3cf8be1000-7f3cf8be3000 rw-p 00004000 08:01 540882                     /lib/libnss_dns-2.7.so\n7f3cf8be3000-7f3cf8bed000 r-xp 00000000 08:01 540883                     /lib/libnss_files-2.7.so\n7f3cf8bed000-7f3cf8ded000 ---p 0000a000 08:01 540883                     /lib/libnss_files-2.7.so\n7f3cf8ded000-7f3cf8def000 rw-p 0000a000 08:01 540883                     /lib/libnss_files-2.7.so\n7f3cf8def000-7f3cf8f47000 r-xp 00000000 08:01 540874                     /lib/libc-2.7.so\n7f3cf8f47000-7f3cf9147000 ---p 00158000 08:01 540874                     /lib/libc-2.7.so\n7f3cf9147000-7f3cf914a000 r--p 00158000 08:01 540874                     /lib/libc-2.7.so\n7f3cf914a000-7f3cf914c000 rw-p 0015b000 08:01 540874                     /lib/libc-2.7.so\n7f3cf914c000-7f3cf9151000 rw-p 7f3cf914c000 00:00 0 \n7f3cf9151000-7f3cf9167000 r-xp 00000000 08:01 540888                     /lib/libpthread-2.7.so\n7f3cf9167000-7f3cf9367000 ---p 00016000 08:01 540888                     /lib/libpthread-2.7.so\n7f3cf9367000-7f3cf9369000 rw-p 00016000 08:01 540888                     /lib/libpthread-2.7.so\n7f3cf9369000-7f3cf936d000 rw-p 7f3cf9369000 00:00 0 \n7f3cf936d000-7f3cf9375000 r-xp 00000000 08:01 540890                     /lib/librt-2.7.so\n7f3cf9375000-7f3cf9574000 ---p 00008000 08:01 540890                     /lib/librt-2.7.so\n7f3cf9574000-7f3cf9576000 rw-p 00007000 08:01 540890                     /lib/librt-2.7.so\n7f3cf9576000-7f3cf958c000 r-xp 00000000 08:01 540880                     /lib/libnsl-2.7.so\n7f3cf958c000-7f3cf978b000 ---p 00016000 08:01 540880                     /lib/libnsl-2.7.so\n7f3cf978b000-7f3cf978d000 rw-p 00015000 08:01 540880                     /lib/libnsl-2.7.so\n7f3cf978d000-7f3cf978f000 rw-p 7f3cf978d000 00:00 0 \n7f3cf978f000-7f3cf9794000 r-xp 00000000 00:16 71152                      /home/scxiao/software/mpich2-1.4-install/lib/libmpl.so.1.1.0\n7f3cf9794000-7f3cf9993000 ---p 00005000 00:16 71152                      /home/scxiao/software/mpich2-1.4-install/lib/libmpl.so.1.1.0\n7f3cf9993000-7f3cf9994000 r--p 00004000 00:16 71152                      /home/scxiao/software/mpich2-1.4-install/lib/libmpl.so.1.1.0\n7f3cf9994000-7f3cf9995000 rw-p 00005000 00:16 71152                      /home/scxiao/software/mpich2-1.4-install/lib/libmpl.so.1.1.0\n7f3cf9995000-7f3cf99b2000 r-xp 00000000 08:01 537508                     /lib/ld-2.7.so\n7f3cf9b9c000-7f3cf9ba0000 rw-p 7f3cf9b9c000 00:00 0 \n7f3cf9baf000-7f3cf9bb2000 rw-p 7f3cf9baf000 00:00 0 \n7f3cf9bb2000-7f3cf9bb4000 rw-p 0001d000 08:01 537508                     /lib/ld-2.7.so\n7fff01b9c000-7fff01bb4000 rw-p 7ffffffe7000 00:00 0                      [stack]\n7fff01bff000-7fff01c00000 r-xp 7fff01bff000 00:00 0                      [vdso]\nffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]\nAborted\nscxiao@bb26:~/workplace/anl/preload$ nssofar=1@bb27's password: \nnssofar=1@bb27's password: \nnssofar=1@bb27's password: \n```"},"comment":{"url":"https://api.github.com/repos/raffenet/mpich-migrate-test/issues/comments/236372550","html_url":"https://github.com/raffenet/mpich-migrate-test/issues/1480#issuecomment-236372550","issue_url":"https://api.github.com/repos/raffenet/mpich-migrate-test/issues/1480","id":236372550,"user":{"login":"raffenet","id":1410792,"avatar_url":"https://avatars.githubusercontent.com/u/1410792?v=3","gravatar_id":"","url":"https://api.github.com/users/raffenet","html_url":"https://github.com/raffenet","followers_url":"https://api.github.com/users/raffenet/followers","following_url":"https://api.github.com/users/raffenet/following{/other_user}","gists_url":"https://api.github.com/users/raffenet/gists{/gist_id}","starred_url":"https://api.github.com/users/raffenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raffenet/subscriptions","organizations_url":"https://api.github.com/users/raffenet/orgs","repos_url":"https://api.github.com/users/raffenet/repos","events_url":"https://api.github.com/users/raffenet/events{/privacy}","received_events_url":"https://api.github.com/users/raffenet/received_events","type":"User","site_admin":false},"created_at":"2016-07-30T15:48:21Z","updated_at":"2016-07-30T15:48:21Z","body":"**Originally by _balaji@mcs.anl.gov_ on 2011-04-29 13:50:44 -0500**\n\n___\nI'm able to reproduce this and am taking a look at it. Sorry, I missed it last time somehow with an almost identical program."}}
{"actor":{"display_login":"raffenet"}}