program main
  use base_ioutil_mod
  use base_struct_mod
  implicit none

  type(axis)                      :: ax_modl,ay_modl,az_modl,ahx_modl,ahy_modl,ahz_modl
  type(axis)                      :: at_data,agx_data,agy_data,asx_data,asy_data
  real, dimension(:), allocatable :: mod1, mod2
  real, dimension(:), allocatable :: dat1, dat2

  character(len=256)              :: mod1_, mod2_, dat1_, dat2_

  mod1_ = "mod1"; mod2_ = "mod2"
  dat1_ = "dat1"; dat2_ = "dat2"

  call sep_init(SOURCE)
  call getch_add_string("head=/dev/null")
  call getch_add_string("noheader=y")
  call set_no_putch()
  call sep_begin_prog()


  call hinaxis(mod1_, ax_modl , 1); call hinaxis(mod1_, ay_modl , 2); call hinaxis(mod1_, az_modl , 3)
  call hinaxis(mod1_, ahx_modl, 4); call hinaxis(mod1_, ahy_modl, 5); !call hinaxis(mod1_, ahz_modl, 6)

  call hinaxis(dat1_, at_data , 1); call hinaxis(dat1_, agx_data, 2); call hinaxis(dat1_, agy_data, 3)
  call hinaxis(dat1_, asx_data, 4); call hinaxis(dat1_, asy_data, 5)

  allocate(mod1(ax_modl%n*ay_modl%n*az_modl%n*ahx_modl%n*ahy_modl%n))
  allocate(mod2(ax_modl%n*ay_modl%n*az_modl%n*ahx_modl%n*ahy_modl%n))
  allocate(dat1(at_data%n*agx_data%n*agy_data%n*asx_data%n*asy_data%n))
  allocate(dat2(at_data%n*agx_data%n*agy_data%n*asx_data%n*asy_data%n))

  call sep_read(mod1, mod1_); call sep_read(mod2, mod2_)
  call sep_read(dat1, dat1_); call sep_read(dat2, dat2_)

  write(0,*)"dot(1)=", sum(mod1*mod2)
  write(0,*)"dot(2)=", sum(dat1*dat2)


end program
