A bit off a backstory. We've been recently migrated to SSD in our company. After that fortran code that we have started running very slowly on my computer, my colleagues seem to be fine.
I've tracked the problem down in debugger to various IDUMMY = SYSTEM(command line stuff) calls. Basically whenever this place is reached I have 1-2 second pause before commad executes.
Solutions that have worked for me (i.e. they execute instantly):
OPEN(UNIT=123, FILE='FileName', DISPOSE='DELETE')
IDUMMY = DELFILESQQ('FileName') !this seems to work just fine
OPEN(UNIT=123, FILE='FileName', STATUS='REPLACE')
Now my only remaining issue is one place where I have to copy a file.
I tried IDUMMY = SYSTEMQQ('copy [path]file1.txt [path]file2.txt') same result as with IDUMMY = SYSTEMQQ('copy [path]file1.txt [path]file2.txt')
So I have two questions:
1) why could would this be happening?
2) any elegant way to copy a file in fortran without a using either SYSTEM or SYSTEMQQ? RENAMEFILEQQ executes instantly, but unfortunatelly also moves the file.
Any help would be aprreciated.
P.S. using Parallel Studio XE 2016 Update 3, version 16.0.0062.12
program P use ISO_FORTRAN_ENV implicit none integer(INT8), allocatable :: contents(:) integer iunit integer(INT64) size open(newunit=iunit,file='test.txt',status='old',access='stream') inquire(iunit,size=size) allocate(contents(size)) read(iunit) contents close(iunit) open(newunit=iunit,file='copy.txt',status='replace',access='stream') write(iunit) contents close(iunit) deallocate(contents) end program P