{"action":"created","issue":{"url":"https://api.github.com/repos/desihub/desispec/issues/668","repository_url":"https://api.github.com/repos/desihub/desispec","labels_url":"https://api.github.com/repos/desihub/desispec/issues/668/labels{/name}","comments_url":"https://api.github.com/repos/desihub/desispec/issues/668/comments","events_url":"https://api.github.com/repos/desihub/desispec/issues/668/events","html_url":"https://github.com/desihub/desispec/issues/668","id":344549316,"node_id":"MDU6SXNzdWUzNDQ1NDkzMTY=","number":668,"title":"desispec.io.write_fibermap broken on interactive batch nodes","user":{"login":"sbailey","id":218471,"node_id":"MDQ6VXNlcjIxODQ3MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/218471?v=4","gravatar_id":"","url":"https://api.github.com/users/sbailey","html_url":"https://github.com/sbailey","followers_url":"https://api.github.com/users/sbailey/followers","following_url":"https://api.github.com/users/sbailey/following{/other_user}","gists_url":"https://api.github.com/users/sbailey/gists{/gist_id}","starred_url":"https://api.github.com/users/sbailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbailey/subscriptions","organizations_url":"https://api.github.com/users/sbailey/orgs","repos_url":"https://api.github.com/users/sbailey/repos","events_url":"https://api.github.com/users/sbailey/events{/privacy}","received_events_url":"https://api.github.com/users/sbailey/received_events","type":"User","site_admin":false},"labels":[{"id":144319108,"node_id":"MDU6TGFiZWwxNDQzMTkxMDg=","url":"https://api.github.com/repos/desihub/desispec/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"weaverba137","id":3780690,"node_id":"MDQ6VXNlcjM3ODA2OTA=","avatar_url":"https://avatars1.githubusercontent.com/u/3780690?v=4","gravatar_id":"","url":"https://api.github.com/users/weaverba137","html_url":"https://github.com/weaverba137","followers_url":"https://api.github.com/users/weaverba137/followers","following_url":"https://api.github.com/users/weaverba137/following{/other_user}","gists_url":"https://api.github.com/users/weaverba137/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverba137/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverba137/subscriptions","organizations_url":"https://api.github.com/users/weaverba137/orgs","repos_url":"https://api.github.com/users/weaverba137/repos","events_url":"https://api.github.com/users/weaverba137/events{/privacy}","received_events_url":"https://api.github.com/users/weaverba137/received_events","type":"User","site_admin":false},"assignees":[{"login":"weaverba137","id":3780690,"node_id":"MDQ6VXNlcjM3ODA2OTA=","avatar_url":"https://avatars1.githubusercontent.com/u/3780690?v=4","gravatar_id":"","url":"https://api.github.com/users/weaverba137","html_url":"https://github.com/weaverba137","followers_url":"https://api.github.com/users/weaverba137/followers","following_url":"https://api.github.com/users/weaverba137/following{/other_user}","gists_url":"https://api.github.com/users/weaverba137/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverba137/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverba137/subscriptions","organizations_url":"https://api.github.com/users/weaverba137/orgs","repos_url":"https://api.github.com/users/weaverba137/repos","events_url":"https://api.github.com/users/weaverba137/events{/privacy}","received_events_url":"https://api.github.com/users/weaverba137/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-07-25T18:06:43Z","updated_at":"2018-07-25T18:39:32Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"@weaverba137 can you take a look at this?\r\n\r\nThe following works on Cori login nodes but not Cori interactive batch nodes (via `salloc -N 1 -C haswell -t 01:00:00 -q interactive`):\r\n```python\r\nimport desispec.io\r\nfm = desispec.io.empty_fibermap(500)\r\ndesispec.io.write_fibermap('blatfoo.fits', fm)\r\n```\r\nThis is the case for both 18.6 and 18.3, so it's not new (and I'm surprised that we haven't caught this earlier; Julien just reported it to me).\r\n\r\nOn the interactive batch nodes it gives the traceback:\r\n```\r\n---------------------------------------------------------------------------\r\nNameError                                 Traceback (most recent call last)\r\n<ipython-input-3-c9274a36cd80> in <module>()\r\n----> 1 ispec.io.write_fibermap('blatfoo.fits', fm)\r\n\r\nNameError: name 'ispec' is not defined\r\n\r\nIn [4]: desispec.io.write_fibermap('blatfoo.fits', fm)\r\n   ...: \r\n---------------------------------------------------------------------------\r\nOSError                                   Traceback (most recent call last)\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/util.py in _free_space_check(hdulist, dirname)\r\n    871     try:\r\n--> 872         yield\r\n    873     except OSError as exc:\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/hdu/base.py in _writeto(self, fileobj, inplace, copy)\r\n    658         with _free_space_check(self, dirname):\r\n--> 659             self._writeto_internal(fileobj, inplace, copy)\r\n    660 \r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/hdu/base.py in _writeto_internal(self, fileobj, inplace, copy)\r\n    718         elif copy:\r\n--> 719             datsize = self._writedata_direct_copy(fileobj)\r\n    720 \r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/hdu/base.py in _writedata_direct_copy(self, fileobj)\r\n    640         \"\"\"\r\n--> 641         raw = self._get_raw_data(self._data_size, 'ubyte', self._data_offset)\r\n    642         if raw is not None:\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/hdu/base.py in _get_raw_data(self, shape, code, offset)\r\n    479         elif self._file:\r\n--> 480             return self._file.readarray(offset=offset, dtype=code, shape=shape)\r\n    481         else:\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/file.py in readarray(self, size, offset, dtype, shape)\r\n    269                     memmap = Memmap(self._file, mode=MEMMAP_MODES[self.mode],\r\n--> 270                                     dtype=np.uint8)\r\n    271 \r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/numpy/core/memmap.py in __new__(subtype, filename, dtype, mode, offset, shape, order)\r\n    263         array_offset = offset - start\r\n--> 264         mm = mmap.mmap(fid.fileno(), bytes, access=acc, offset=start)\r\n    265 \r\n\r\nOSError: [Errno 38] Function not implemented\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nOSError                                   Traceback (most recent call last)\r\n<ipython-input-4-f864956bce5d> in <module>()\r\n----> 1 desispec.io.write_fibermap('blatfoo.fits', fm)\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/code/desispec/0.22.1/lib/python3.6/site-packages/desispec-0.22.1-py3.6.egg/desispec/io/fibermap.py in write_fibermap(outfile, fibermap, header)\r\n    130         warnings.simplefilter(\"ignore\")\r\n    131         write_bintable(outfile, fibermap, hdr, comments=fibermap_comments,\r\n--> 132             extname=\"FIBERMAP\", clobber=True)\r\n    133 \r\n    134     return outfile\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/code/desispec/0.22.1/lib/python3.6/site-packages/desispec-0.22.1-py3.6.egg/desispec/io/util.py in write_bintable(filename, data, header, comments, units, extname, clobber, primary_extname)\r\n    210                 else :\r\n    211                     log.debug(\"adding HDU {} to {}\".format(extname,filename))\r\n--> 212                     fx.append(hdu)\r\n    213     else :\r\n    214         log.debug(\"writing new file {}\".format(filename))\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/hdu/hdulist.py in __exit__(self, type, value, traceback)\r\n    395 \r\n    396     def __exit__(self, type, value, traceback):\r\n--> 397         self.close()\r\n    398 \r\n    399     @classmethod\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/hdu/hdulist.py in close(self, output_verify, verbose, closed)\r\n    916             if (self._file and self._file.mode in ('append', 'update')\r\n    917                     and not self._file.closed):\r\n--> 918                 self.flush(output_verify=output_verify, verbose=verbose)\r\n    919         finally:\r\n    920             if self._file and closed and hasattr(self._file, 'close'):\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/utils/decorators.py in flush(self, output_verify, verbose)\r\n    869             name = func.__name__\r\n    870 \r\n--> 871         func = make_function_with_signature(func, name=name, **wrapped_args)\r\n    872         func = functools.update_wrapper(func, wrapped, assigned=assigned,\r\n    873                                         updated=updated)\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/util.py in wrapped(*args, **kwargs)\r\n    254 \r\n    255         try:\r\n--> 256             func(*args, **kwargs)\r\n    257         finally:\r\n    258             if single_thread:\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/hdu/hdulist.py in flush(self, output_verify, verbose)\r\n    795 \r\n    796         elif self._file.mode == 'update':\r\n--> 797             self._flush_update()\r\n    798 \r\n    799     def update_extend(self):\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/hdu/hdulist.py in _flush_update(self)\r\n   1211             # the hdulist to the file.\r\n   1212             if self._resize or self._file.compression:\r\n-> 1213                 self._flush_resize()\r\n   1214             else:\r\n   1215                 # if not resized, update in place\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/hdu/hdulist.py in _flush_resize(self)\r\n   1249 \r\n   1250                 for hdu in self:\r\n-> 1251                     hdu._writeto(hdulist._file, inplace=True, copy=True)\r\n   1252                 if sys.platform.startswith('win'):\r\n   1253                     # Collect a list of open mmaps to the data; this well be\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/hdu/base.py in _writeto(self, fileobj, inplace, copy)\r\n    657 \r\n    658         with _free_space_check(self, dirname):\r\n--> 659             self._writeto_internal(fileobj, inplace, copy)\r\n    660 \r\n    661     def _writeto_internal(self, fileobj, inplace, copy):\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/contextlib.py in __exit__(self, type, value, traceback)\r\n     97                 value = type()\r\n     98             try:\r\n---> 99                 self.gen.throw(type, value, traceback)\r\n    100             except StopIteration as exc:\r\n    101                 # Suppress StopIteration *unless* it's the same exception that\r\n\r\n/global/common/software/desi/cori/desiconda/20180709-1.2.6-spec/conda/lib/python3.6/site-packages/astropy/io/fits/util.py in _free_space_check(hdulist, dirname)\r\n    887             hdu._close()\r\n    888 \r\n--> 889         raise OSError(error_message + str(exc))\r\n    890 \r\n    891 \r\n\r\nOSError: [Errno 38] Function not implemented\r\n```"},"comment":{"url":"https://api.github.com/repos/desihub/desispec/issues/comments/407854585","html_url":"https://github.com/desihub/desispec/issues/668#issuecomment-407854585","issue_url":"https://api.github.com/repos/desihub/desispec/issues/668","id":407854585,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzg1NDU4NQ==","user":{"login":"weaverba137","id":3780690,"node_id":"MDQ6VXNlcjM3ODA2OTA=","avatar_url":"https://avatars1.githubusercontent.com/u/3780690?v=4","gravatar_id":"","url":"https://api.github.com/users/weaverba137","html_url":"https://github.com/weaverba137","followers_url":"https://api.github.com/users/weaverba137/followers","following_url":"https://api.github.com/users/weaverba137/following{/other_user}","gists_url":"https://api.github.com/users/weaverba137/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverba137/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverba137/subscriptions","organizations_url":"https://api.github.com/users/weaverba137/orgs","repos_url":"https://api.github.com/users/weaverba137/repos","events_url":"https://api.github.com/users/weaverba137/events{/privacy}","received_events_url":"https://api.github.com/users/weaverba137/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T18:39:32Z","updated_at":"2018-07-25T18:39:32Z","author_association":"MEMBER","body":"PS, I'm still not able to start an interactive job, so someone else might have to reproduce this."}}
{"actor":{"display_login":"weaverba137"}}