{"action":"closed","issue":{"url":"https://api.github.com/repos/tomopy/tomopy/issues/127","labels_url":"https://api.github.com/repos/tomopy/tomopy/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/tomopy/tomopy/issues/127/comments","events_url":"https://api.github.com/repos/tomopy/tomopy/issues/127/events","html_url":"https://github.com/tomopy/tomopy/issues/127","id":111650686,"number":127,"title":"Gridrec segfault when running with specific number of cores","user":{"login":"dmpelt","id":3531031,"avatar_url":"https://avatars.githubusercontent.com/u/3531031?v=3","gravatar_id":"","url":"https://api.github.com/users/dmpelt","html_url":"https://github.com/dmpelt","followers_url":"https://api.github.com/users/dmpelt/followers","following_url":"https://api.github.com/users/dmpelt/following{/other_user}","gists_url":"https://api.github.com/users/dmpelt/gists{/gist_id}","starred_url":"https://api.github.com/users/dmpelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmpelt/subscriptions","organizations_url":"https://api.github.com/users/dmpelt/orgs","repos_url":"https://api.github.com/users/dmpelt/repos","events_url":"https://api.github.com/users/dmpelt/events{/privacy}","received_events_url":"https://api.github.com/users/dmpelt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-15T16:05:11Z","updated_at":"2015-12-15T01:15:44Z","closed_at":"2015-12-15T01:15:44Z","body":"Using both the latest conda build of tomopy (0.1.11) and the latest git master, I get a segfault when running `gridrec` with a specific number of cores. The result is the problem of #120, where you have to kill the parent python process in order to regain control of the terminal. The following script shows the problem on my machines:\r\n\r\n    import tomopy\r\n    import numpy as np\r\n    ang = tomopy.angles(256)\r\n    prj = np.zeros((256,100,256),dtype=np.float32)\r\n    tomopy.recon(prj,ang,algorithm='gridrec',ncore=1) # works\r\n    tomopy.recon(prj,ang,algorithm='gridrec',ncore=2) # works\r\n    tomopy.recon(prj,ang,algorithm='gridrec',ncore=5) # works\r\n    tomopy.recon(prj,ang,algorithm='gridrec',ncore=3) # works\r\n    tomopy.recon(prj,ang,algorithm='gridrec',ncore=8) # hangs\r\n\r\nThe following `gdb` log shows the location of the segfault:\r\n\r\n    #0  0x00007f7198ed1435 in gridrec (data=0x7f71d71de000, dx=256, dy=100, dz=256, center=0x7f7199213aa4, theta=0x0, recon=0x7f71910cf000, ngridx=256, ngridy=256, fname=0x1b62eb0 \"shepp\", istart=91, iend=100)\r\n    at src/gridrec.c:311\r\n\r\nMaybe something goes wrong earlier, since `theta` is already `0x0` in the function call. \r\n\r\nSome other combinations of numbers of angles, slices, detectors, and cores segfault as well, but many others work fine. I did not find a clear pattern yet..."}}