replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Writing text files- taking long time
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Writing text files- taking long time

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Fri Mar 15, 2013 5:57 pm    Post subject: Writing text files- taking long time Reply with quote

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
View user's profile Send private message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Sat Mar 16, 2013 9:32 am    Post subject: Reply with quote

Please can anyone help?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Sat Mar 16, 2013 9:56 am    Post subject: Reply with quote

If you can provide a short sample program, help may be available.
Back to top
View user's profile Send private message AIM Address
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Sun Mar 17, 2013 5:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Sun Mar 17, 2013 7:17 pm    Post subject: Reply with quote

Can you post small working prototype code which measures time for writing two files consequently versus writing two files simultaneously?
Back to top
View user's profile Send private message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Sun Mar 17, 2013 8:29 pm    Post subject: Reply with quote

Yes.

Simultaneosly- 19 minutes

If I generate just one of any of the two files 3 minutes
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Sun Mar 17, 2013 8:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group