{"action":"closed","issue":{"url":"https://api.github.com/repos/StanfordLegion/legion/issues/125","repository_url":"https://api.github.com/repos/StanfordLegion/legion","labels_url":"https://api.github.com/repos/StanfordLegion/legion/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/StanfordLegion/legion/issues/125/comments","events_url":"https://api.github.com/repos/StanfordLegion/legion/issues/125/events","html_url":"https://github.com/StanfordLegion/legion/issues/125","id":131926178,"number":125,"title":"Floating point exception in  DefaultMapper::decompose_index_space line 1080 on master ","user":{"login":"gshipman","id":665019,"avatar_url":"https://avatars.githubusercontent.com/u/665019?v=3","gravatar_id":"","url":"https://api.github.com/users/gshipman","html_url":"https://github.com/gshipman","followers_url":"https://api.github.com/users/gshipman/followers","following_url":"https://api.github.com/users/gshipman/following{/other_user}","gists_url":"https://api.github.com/users/gshipman/gists{/gist_id}","starred_url":"https://api.github.com/users/gshipman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gshipman/subscriptions","organizations_url":"https://api.github.com/users/gshipman/orgs","repos_url":"https://api.github.com/users/gshipman/repos","events_url":"https://api.github.com/users/gshipman/events{/privacy}","received_events_url":"https://api.github.com/users/gshipman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"lightsighter","id":9311230,"avatar_url":"https://avatars.githubusercontent.com/u/9311230?v=3","gravatar_id":"","url":"https://api.github.com/users/lightsighter","html_url":"https://github.com/lightsighter","followers_url":"https://api.github.com/users/lightsighter/followers","following_url":"https://api.github.com/users/lightsighter/following{/other_user}","gists_url":"https://api.github.com/users/lightsighter/gists{/gist_id}","starred_url":"https://api.github.com/users/lightsighter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightsighter/subscriptions","organizations_url":"https://api.github.com/users/lightsighter/orgs","repos_url":"https://api.github.com/users/lightsighter/repos","events_url":"https://api.github.com/users/lightsighter/events{/privacy}","received_events_url":"https://api.github.com/users/lightsighter/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2016-02-07T02:41:50Z","updated_at":"2016-02-11T00:12:28Z","closed_at":"2016-02-11T00:12:28Z","body":"I'll preface with \"I'm not sure if this is a bug or my misuse of Legion\" \r\n\r\nI'm hitting a divide by zero error in the default mapper in decompose_index_space. This is in a version of pennant which I've added hdf_attach operations to. \r\n\r\nHere is where the exception is: \r\n```\r\nProcess 94303 stopped\r\n* thread #5: tid = 0x243e3d, 0x0000000106e64207 pennant`LegionRuntime::HighLevel::DefaultMapper::decompose_index_space(domain=0x00007fd50e0000c4, targets=size=0, splitting_factor=2, slices=size=0) + 551 at default_mapper.cc:1083, stop reason = EXC_ARITHMETIC (code=EXC_I386_DIV, subcode=0x0)\r\n    frame #0: 0x0000000106e64207 pennant`LegionRuntime::HighLevel::DefaultMapper::decompose_index_space(domain=0x00007fd50e0000c4, targets=size=0, splitting_factor=2, slices=size=0) + 551 at default_mapper.cc:1083\r\n   1080\t          num_chunks = num_elmts;\r\n   1081\t        // Number of elements per chunk rounded up\r\n   1082\t        // which works because we know that rectangles are contiguous\r\n-> 1083\t        unsigned lower_bound = num_elmts/num_chunks;\r\n   1084\t        unsigned upper_bound = lower_bound+1;\r\n   1085\t        unsigned number_small = num_chunks - (num_elmts % num_chunks);\r\n   1086\t        unsigned index = 0;\r\n```\r\nA bit more debug info: \r\n```\r\n(lldb) p num_elmts\r\n(unsigned int) $1 = 4\r\n(lldb) p num_chunks\r\n(unsigned int) $2 = 0\r\n(lldb) p splitting_factor \r\n(unsigned int) $7 = 2\r\n(lldb) p targets\r\n(const std::__1::vector<Realm::Processor, std::__1::allocator<Realm::Processor> >) $8 = size=0 {}\r\n```\r\nIt seems odd that the the targets processor vector is empty. \r\n\r\nNote that this error only occurs when I'm attempting an index space launch of \"write_launcher\"  in pennant:src/legion_io.cc:264 \r\nI'm using a 1D domain for the index launch with 4 domain points in it. The unstructured index space on which I am launching is partitioned with 4 colors by looping over the points in the index space and adding them to a Coloring using points.insert(ptr..)  see pennant:src/Mesh.cc:268. \r\n\r\nYou can find my pennant code in the hierarchy-io branch here: \r\nhttps://github.com/gshipman/pennant-legion.git\r\n\r\n\r\n"}}