~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

Viewing changes to src/lib/libchkpt/usotbf.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
*/
5
5
 
6
6
#include <stdio.h>
 
7
#include <stdlib.h>
7
8
#include "chkpt.h"
8
9
#include <psifiles.h>
9
10
#include <libciomr/libciomr.h>
24
25
  double **usotbf;
25
26
  int num_so, i;
26
27
  psio_address ptr;
27
 
  char *key;
 
28
  char *keyword;
 
29
  keyword = chkpt_build_keyword("SO->BF transmat");
28
30
 
29
31
  num_so = chkpt_rd_nso();
30
 
 
31
32
  usotbf = block_matrix(num_so,num_so);
32
 
  key = chkpt_build_keyword("SO->BF transmat");
 
33
 
33
34
  ptr = PSIO_ZERO;
34
35
  for(i=0;i<num_so;i++)
35
 
    psio_read(PSIF_CHKPT, key, (char *) usotbf[i], (int) num_so*sizeof(double), ptr, &ptr);
36
 
  free(key);
 
36
    psio_read(PSIF_CHKPT, keyword, (char *) usotbf[i], (int) num_so*sizeof(double), ptr, &ptr);
37
37
 
 
38
  free(keyword);
38
39
  return usotbf;
39
40
}
40
41
 
54
55
{
55
56
  int num_so, i;
56
57
  psio_address ptr;
57
 
  char *key;
 
58
  char *keyword;
 
59
  keyword = chkpt_build_keyword("SO->BF transmat");
58
60
 
59
61
  num_so = chkpt_rd_nso();
60
62
 
61
 
  key = chkpt_build_keyword("SO->BF transmat");
62
63
  ptr = PSIO_ZERO;
63
64
  for(i=0;i<num_so;i++)
64
 
    psio_write(PSIF_CHKPT, key, (char *) usotbf[i], (int) num_so*sizeof(double), ptr, &ptr);
65
 
  free(key);
 
65
    psio_write(PSIF_CHKPT, keyword, (char *) usotbf[i], (int) num_so*sizeof(double), ptr, &ptr);
 
66
 
 
67
  free(keyword);
66
68
}