OpenMatriX 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dec622f6548b7b7b28e605b4a68651c8499c3b39
4
- data.tar.gz: 5efe8eb3fbdd801edb26879d2f8eb7bcae826dab
3
+ metadata.gz: d9756eb016b4fc012dea543550b67beaf6038102
4
+ data.tar.gz: 3e6b86681e09163cc8480bf180277ae60903cd6e
5
5
  SHA512:
6
- metadata.gz: 3f6686191e9c169d315731161ff537f0481aac9229fd1426be5f9f514becca37d0575c05d96cc79a3901a42289df7292a997e8cd85e08c5a86984725f4d02c85
7
- data.tar.gz: 07e97957246ec2f10d1bc3cca6ce81003d9fd0ed0532feab326a28e8986cc30b747aba10197c36edd87e20db1c685cd2e43518a51eac3fe812602a1baf87bd40
6
+ metadata.gz: 4593f8addcf7e95215217b837de8fe05358713e5be1c37196b4872e19da9d23db131880ae98c9c02ce7d6a7062b454b6c41e11b9ca01812d6aedb705f84f8198
7
+ data.tar.gz: 2156c6007e7a4717984da7c0499afc3be59592988464f770d757420e5075de5e0e388e2422a2df672746b54cd29b7ed4c86d48b81e595bb77240005477586776
@@ -1,11 +1,20 @@
1
1
  # Debian Installation and Use Howto
2
2
 
3
3
  This how-to MAY be applicable to other linux distros. This was written while making stuff work
4
- on a Debian Jessie virtual machine that was upgraded from Debian Wheezy.
4
+ on a Debian Jessie virtual machine that was upgraded from Debian Wheezy. After realizing that
5
+ the virtual machine had a 32-bit OS and there is an addressing error somewhere, an attempt was
6
+ made to upgrade from 32-bit to 64-bit. This did not go well and left the virtual machine in
7
+ an entirely messed up state. A new virtual machine was built with a fresh install of Debian
8
+ Jessie (64-bit this time!) and all of these were reviewed and some revisions were made.
5
9
 
6
10
  # Prep
7
11
 
8
- First off, remove the included hdf5 distro. You need 1.8.15, Jessie stable comes
12
+ First off, make sure gcc, g++, and build-essentials are installed.
13
+ ```
14
+ sudo apt-get install -y gcc g++ build-essentials
15
+ ```
16
+
17
+ Second off, remove the included hdf5 distro if it exists. You need 1.8.15, Jessie stable comes
9
18
  with 1.8.13. And make sure you have 64 bit Debian. THIS WILL NOT WORK WITH A
10
19
  32 BIT OPERATING SYSTEM.
11
20
 
@@ -13,7 +22,11 @@ with 1.8.13. And make sure you have 64 bit Debian. THIS WILL NOT WORK WITH A
13
22
  sudo apt-get remove libhdf5-dev
14
23
  ```
15
24
 
16
- Download the source for hdf5 ans szip from hdf5's webpage and un-tar it, compile, test, and install it:
25
+ # HDF Library Installation
26
+
27
+ Download the source for hdf5 and szip from hdf5's webpage and un-tar it, compile, test (optional, but highly recommended),
28
+ and install it:
29
+
17
30
  ```
18
31
  wget http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz
19
32
  gunzip szip-2.1.tar.gz
@@ -22,6 +35,7 @@ rm szip-2.1.tar
22
35
  cd szip-2.1
23
36
  ./configure --prefix=/usr/local/hdf5
24
37
  make
38
+ make check
25
39
  sudo make install
26
40
 
27
41
  wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.15-patch1.tar
@@ -46,11 +60,4 @@ Then, reload the linker:
46
60
  ```
47
61
  sudo ldconfig
48
62
  ```
49
-
50
- # Landing
51
-
52
- Install Ruby and Rails:
53
- ```
54
- sudo apt-get install ruby
55
- sudo apt-get install rubygems
56
- gem install rails
63
+ At this point, the gem should work
data/README.md CHANGED
@@ -57,6 +57,11 @@ puts tt.getIJ(i,j) # Returns value at i,j
57
57
  file.close()
58
58
  ```
59
59
 
60
+ ## Linux Notes
61
+
62
+ This has only been tested on Debian Jessie, and it MUST be a 64-bit version. See
63
+ the [howto](Debian-HOWTO.md).
64
+
60
65
  ## Important Concepts for Non-Travel-Modelers
61
66
 
62
67
  Note that our use of matrices may be a little different from others', and we
@@ -250,6 +250,9 @@ module OMX
250
250
  #ssize_t H5Lget_name_by_idx( hid_t loc_id, const char *group_name, H5_index_t index_field, H5_iter_order_t order, hsize_t n, char *name, size_t size, hid_t lapl_id )
251
251
  attach_function :tNames2, :H5Lget_name_by_idx, [H5Types.hid_t, :string, :int, :int, :int, :pointer, :int, :int ], :int
252
252
 
253
+ # hid_t H5Pcreate( hid_t cls_id )
254
+ attach_function :createpl, :H5Pcreate, [H5Types.hid_t], H5Types.hid_t64
255
+
253
256
  def initialize(file)
254
257
  @id = file.id
255
258
  @gId = gOpen(@id, "data",0)
@@ -267,19 +270,24 @@ module OMX
267
270
  def getTableNames()
268
271
  nT = self.getNTables()-1
269
272
  gName = FFI::MemoryPointer.new(:string)
270
-
271
- pl = createpl(OMX::h5P_CLS_LINK_ACCESS_ID_g)
272
-
273
- # Note from okiAndrew: this seems seriously kludgy, but it works.
273
+ #idxOrder = OMX::h5_INDEX_CRT_ORDER
274
+ #ii = OMX::h5_ITER_INC
275
+ puts "before pl"
276
+ puts "link access constant = #{OMX::h5P_CLS_LINK_ACCESS_ID}"
277
+ pl = createpl(OMX::h5P_CLS_LINK_ACCESS_ID)
278
+ puts "pl = #{pl}, pl.class = #{pl.class}"
274
279
  tN ||= []
275
280
  for t in 0..nT
276
- tn2o = tNames2(@gId, ".", 0, t, 0, gName, 20, pl)
281
+ size = 1 + tNames2(@gId, ".", 0, 0, t, nil, 0, createpl(OMX::h5P_CLS_LINK_ACCESS_ID))
282
+ puts "size = #{size}"
283
+ tn2o = tNames2(@gId, ".", 0, 0, t, gName, size, pl)
277
284
  #puts "gName = #{gName.read_string()}"
278
285
  tN << gName.read_string()
279
286
  end
280
287
  return(tN)
281
288
  end
282
289
 
290
+
283
291
  end #class OMXTables
284
292
 
285
293
  #Class to read the data from the OMX file
@@ -1,3 +1,3 @@
1
1
  module OpenMatriX
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: OpenMatriX
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Rohne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-03 00:00:00.000000000 Z
11
+ date: 2015-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler