View previous topic :: View next topic |
Author |
Message |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Fri Mar 15, 2013 5:57 pm Post subject: Writing text files- taking long time |
|
|
I'm writing 2 text files using FORTRAN each file being 50 MB and I'm opening both files simultaneously and writing.
I find that the tiem taken for writing is perhaps taking longer.
What could be the rpoblem?Can anyoen help
Christy |
|
Back to top |
|
 |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Sat Mar 16, 2013 9:32 am Post subject: |
|
|
Please can anyone help? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Sat Mar 16, 2013 9:56 am Post subject: |
|
|
If you can provide a short sample program, help may be available. |
|
Back to top |
|
 |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Sun Mar 17, 2013 5:28 pm Post subject: |
|
|
I have 2 files to which I'm writing soem information, they are both text files
Code: | open (file_1)
write...I write information to furst file
open (file_2
write...I write info to second file
do something......
again write info to first file
write info to second file |
Could there be a problem if I write info simultaneously?
The files are just 50 MB each
Christy |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Sun Mar 17, 2013 7:17 pm Post subject: |
|
|
Can you post small working prototype code which measures time for writing two files consequently versus writing two files simultaneously? |
|
Back to top |
|
 |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Sun Mar 17, 2013 8:29 pm Post subject: |
|
|
Yes.
Simultaneosly- 19 minutes
If I generate just one of any of the two files 3 minutes |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Sun Mar 17, 2013 8:37 pm Post subject: |
|
|
That is unusual indeed unless you write on punchcards, lineprinter or use 40 years old floppy disks LOL.
Post as Paul said above small 20 lines working code demonstrating that difference which we can run on our computers. It takes 3 min to write it. Don't be shy of your code style or dumb errors, we all make mistakes.
Or if the code is tricky to extract small snippet, run the whole code on free Qsoft RAMdrive which has speed 5 GB per second, 10-100 times faster then any harddrive or SSD, and see if this was a hardware issue. |
|
Back to top |
|
 |
|