Program to convert spn files from formatted to unformmated and vice versa - useful for switching between computers
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
logical | :: | file_found | ||||
integer | :: | file_unit |
program w90spn2spn
!! Program to convert spn files from formatted to unformmated
!! and vice versa - useful for switching between computers
use w90_constants, only: dp
use w90_io, only: io_file_unit, stdout, io_error, seedname
use w90_conv_spn
use w90_comms, only: num_nodes, comms_setup, comms_end
implicit none
! Export mode:
! TRUE: create formatted .spn.fmt from unformatted .spn ('-export')
! FALSE: create unformatted .spn from formatted .spn.fmt ('-import')
logical :: file_found
integer :: file_unit
call comms_setup
stdout = io_file_unit()
open (unit=stdout, file='w90spn2spn.log')
if (num_nodes /= 1) then
call io_error('w90spn2spn can only be used in serial...')
endif
call conv_get_seedname
if (export_flag .eqv. .true.) then
call conv_read_spn()
write (stdout, '(a)') ''
call conv_write_spn_fmt()
else
call conv_read_spn_fmt()
write (stdout, '(a)') ''
call conv_write_spn()
end if
! close(unit=stdout,status='delete')
close (unit=stdout)
call comms_end
end program w90spn2spn