Program to convert checkpoint files from formatted to unformmated and vice versa - useful for switching between computers
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
logical | :: | file_found | ||||
integer | :: | file_unit |
program w90chk2chk
!! Program to convert checkpoint 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
use w90_comms, only: num_nodes, comms_setup, comms_end
implicit none
! Export mode:
! TRUE: create formatted .chk.fmt from unformatted .chk ('-export')
! FALSE: create unformatted .chk from formatted .chk.fmt ('-import')
logical :: file_found
integer :: file_unit
call comms_setup
stdout = io_file_unit()
open (unit=stdout, file='w90chk2chk.log')
if (num_nodes /= 1) then
call io_error('w90chk2chk can only be used in serial...')
endif
call conv_get_seedname
if (export_flag .eqv. .true.) then
call conv_read_chkpt()
call conv_write_chkpt_fmt()
else
call conv_read_chkpt_fmt()
call conv_write_chkpt()
end if
! close(unit=stdout,status='delete')
close (unit=stdout)
call comms_end
end program w90chk2chk