Jourdan,
Have you considered manufacturing a file name on the fly?
Generic_name = 'OUTPUT_'
call date_and_time( date, time) ! date and time are scalar character variables
! assuming your programme takes longer than a second to run you should get a unique time stamp
! time is of the form hhmmss.sss - check your run time for the code
Fout = Generic_name // date // time
Alternatively if you are able to access the process ID - you could use that as the post-fix.
Hope that helps!
Venkat.
Dr. Venkat V S S Sastry
Applied Mathematics and Scientific Computing
Department of Informatics and Systems Engineering
Defence Academy, Cranfield University, Shrivenham, SN6 8LA, UK
Tel: 44+(0)1793 785315
http://uk.linkedin.com/in/venkatsastry<http://amorshortcourses.wordpress.com/wp-admin/index.php>, http://amorshortcourses.wordpress.com/<http://amorshortcourses.wordpress.com/wp-admin/index.php> http://cdssummerinternships.wordpress.com
Skype: vangaveti_vss_sastry
________________________________
From: Fortran 90 List [[log in to unmask]] on behalf of Jourdan Gold [[log in to unmask]]
Sent: 14 November 2011 18:34
To: [log in to unmask]
Subject: new file names and modifying the program
Hello,
I have a program for which the results are stochastic and I want to obtain many versions of the output to assess variability. Currently, everytime, I start a new run I need to change the filename and resave it. If there a simple way to modify the program so that I can have it run many times and record the output in each file seperately. i.e. create a loop so that the file name changes automatically after each run and then allow it do multiple runs automatically. I am getting tired of making a small change and then recompiling the program. it seems inefficient.
--
Jourdan Gold,
PhD Candidate,
Department of Mathematics and Statistics,
University of Guelph
|