{"action":"created","issue":{"url":"https://api.github.com/repos/rmjarvis/TreeCorr/issues/42","repository_url":"https://api.github.com/repos/rmjarvis/TreeCorr","labels_url":"https://api.github.com/repos/rmjarvis/TreeCorr/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/rmjarvis/TreeCorr/issues/42/comments","events_url":"https://api.github.com/repos/rmjarvis/TreeCorr/issues/42/events","html_url":"https://github.com/rmjarvis/TreeCorr/issues/42","id":142756748,"number":42,"title":"Error in unit tests","user":{"login":"tmcclintock","id":10226392,"avatar_url":"https://avatars.githubusercontent.com/u/10226392?v=3","gravatar_id":"","url":"https://api.github.com/users/tmcclintock","html_url":"https://github.com/tmcclintock","followers_url":"https://api.github.com/users/tmcclintock/followers","following_url":"https://api.github.com/users/tmcclintock/following{/other_user}","gists_url":"https://api.github.com/users/tmcclintock/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcclintock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcclintock/subscriptions","organizations_url":"https://api.github.com/users/tmcclintock/orgs","repos_url":"https://api.github.com/users/tmcclintock/repos","events_url":"https://api.github.com/users/tmcclintock/events{/privacy}","received_events_url":"https://api.github.com/users/tmcclintock/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-22T19:39:45Z","updated_at":"2016-03-22T19:46:50Z","closed_at":null,"body":"I just reinstalled and went to run the nosetests. On one of them I recieved an IOError. Here is the whole output related to that unit test:\r\nStarting process NN auto-correlations for cat data/nn_list_rand2.dat.\r\nUsing 4 threads.\r\nStarting 39 jobs.\r\n.......................................\r\nDone RR calculations.\r\nWriting NN correlations to output/nn_list1.out\r\nfile_type assumed to be ASCII from the file name.\r\nTraceback (most recent call last):\r\n  File \"/home/tom/anaconda2/bin/corr2\", line 4, in <module>\r\n    __import__('pkg_resources').run_script('TreeCorr==3.2.3', 'corr2')\r\n  File \"/home/tom/anaconda2/lib/python2.7/site-packages/setuptools-19.6.2-py2.7.egg/pkg_resources/__init__.py\", line 724, in run_script\r\n  File \"/home/tom/anaconda2/lib/python2.7/site-packages/setuptools-19.6.2-py2.7.egg/pkg_resources/__init__.py\", line 1649, in run_script\r\n  File \"/home/tom/anaconda2/lib/python2.7/site-packages/TreeCorr-3.2.3-py2.7-linux-x86_64.egg/EGG-INFO/scripts/corr2\", line 105, in <module>\r\n    main()\r\n  File \"/home/tom/anaconda2/lib/python2.7/site-packages/TreeCorr-3.2.3-py2.7-linux-x86_64.egg/EGG-INFO/scripts/corr2\", line 102, in main\r\n    treecorr.corr2(config, logger)\r\n  File \"/home/tom/anaconda2/lib/python2.7/site-packages/TreeCorr-3.2.3-py2.7-linux-x86_64.egg/treecorr/corr2.py\", line 227, in corr2\r\n    dd.write(config['nn_file_name'],rr,dr,rd)\r\n  File \"/home/tom/anaconda2/lib/python2.7/site-packages/TreeCorr-3.2.3-py2.7-linux-x86_64.egg/treecorr/nncorrelation.py\", line 523, in write\r\n    file_name, col_names, columns, prec=prec, file_type=file_type, logger=self.logger)\r\n  File \"/home/tom/anaconda2/lib/python2.7/site-packages/TreeCorr-3.2.3-py2.7-linux-x86_64.egg/treecorr/util.py\", line 55, in gen_write\r\n    gen_write_ascii(file_name, col_names, columns, prec=prec)\r\n  File \"/home/tom/anaconda2/lib/python2.7/site-packages/TreeCorr-3.2.3-py2.7-linux-x86_64.egg/treecorr/util.py\", line 86, in gen_write_ascii\r\n    numpy.savetxt(file_name, data, fmt=fmt, header=header)\r\n  File \"/home/tom/anaconda2/lib/python2.7/site-packages/numpy/lib/npyio.py\", line 1096, in savetxt\r\n    fh = open(fname, 'w')\r\nIOError: [Errno 2] No such file or directory: 'output/nn_list1.out'\r\nEReading input file data/nn_perp_data.dat\r\n   file_type assumed to be ASCII from the file name.\r\n   nobj = 100000\r\nnbins = 5, min,max sep = 20..32.9744, bin_size = 0.1\r\n\r\nIt looks like it couldn't find the output file. The rest of the unit tests proceeded to run after that, however eventually it failed due to a seg fault. Here is the text related to that failure:\r\n\r\nStarting process NNN cross-correlations\r\nUsing 4 threads.\r\nBuilding NField\r\nStarting 38 jobs.\r\n..Segmentation fault (core dumped)\r\n\r\nI ran this twice and it failed both times, and I then ran it again from a new terminal, and it also failed there. Let me know if you need any other information related to this.\r\n"},"comment":{"url":"https://api.github.com/repos/rmjarvis/TreeCorr/issues/comments/199984199","html_url":"https://github.com/rmjarvis/TreeCorr/issues/42#issuecomment-199984199","issue_url":"https://api.github.com/repos/rmjarvis/TreeCorr/issues/42","id":199984199,"user":{"login":"rmjarvis","id":623887,"avatar_url":"https://avatars.githubusercontent.com/u/623887?v=3","gravatar_id":"","url":"https://api.github.com/users/rmjarvis","html_url":"https://github.com/rmjarvis","followers_url":"https://api.github.com/users/rmjarvis/followers","following_url":"https://api.github.com/users/rmjarvis/following{/other_user}","gists_url":"https://api.github.com/users/rmjarvis/gists{/gist_id}","starred_url":"https://api.github.com/users/rmjarvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmjarvis/subscriptions","organizations_url":"https://api.github.com/users/rmjarvis/orgs","repos_url":"https://api.github.com/users/rmjarvis/repos","events_url":"https://api.github.com/users/rmjarvis/events{/privacy}","received_events_url":"https://api.github.com/users/rmjarvis/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T19:46:50Z","updated_at":"2016-03-22T19:46:50Z","body":"It's trying to write a file in the output directory.  So probably you just need to `mkdir output`.  I think I already ran into this and fixed it on master (by including output/.gitignore in the repo), but I guess I hadn't done that yet by 3.2.3.\r\n\r\nAs for the seg fault, I recently found a system that does this for test_nnn.py, and I've started looking into it.  It seems to happen when doing NNN correlations with a list of input files (rather than just 1 file).  I haven't yet fixed it though."}}