LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-20-2007, 12:22 AM   #1
abhattacharya
Member
 
Registered: Jul 2007
Distribution: RHEL, Fedora, Debian, Ubuntu
Posts: 94

Rep: Reputation: 15
Unhappy big file+reading problem


hi
i have a file of size 6.9.GB. how can i make fortran to read this file?
basically the file is a matrix of dimension 134217728 x 27
i'm using a work-station having 2 GB of RAM and 160 GB of HDD

thanks in advance
 
Old 08-20-2007, 06:38 AM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
What happens when you try to read the file? For examle, what exact error message do you receive, if any?
 
Old 08-21-2007, 12:42 AM   #3
abhattacharya
Member
 
Registered: Jul 2007
Distribution: RHEL, Fedora, Debian, Ubuntu
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by wjevans_7d1@yahoo.co View Post
What happens when you try to read the file? For examle, what exact error message do you receive, if any?
error msg is
segmentation fault
 
Old 08-21-2007, 03:14 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
A segmentation fault error is related to memory: the software is trying to access a memory location that is not allowed to be accessed for some reason. A solution can be to increase the stack space (see man ulimit for details) to let the program do its work and then restore the original value. By the way, I am surprised that the code has been compiled, since usually there are limits in the size of arrays. Which fortran compiler are you using? And what about CPU model and amount of swap?
 
Old 08-23-2007, 10:27 AM   #5
abhattacharya
Member
 
Registered: Jul 2007
Distribution: RHEL, Fedora, Debian, Ubuntu
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by colucix View Post
A segmentation fault error is related to memory: the software is trying to access a memory location that is not allowed to be accessed for some reason. A solution can be to increase the stack space (see man ulimit for details) to let the program do its work and then restore the original value. By the way, I am surprised that the code has been compiled, since usually there are limits in the size of arrays. Which fortran compiler are you using? And what about CPU model and amount of swap?
thanks, but ulimit can not help me out as i already made those value maximum.i'm using g77 compiler. CPU is a workstation with xeon prosessor and 2GB ram
 
Old 08-23-2007, 11:14 AM   #6
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Can you buffer it so it only processes the document so many bytes at a time?
Also, you could be getting the segmentation fault due to there not being enough memory for the file to be open (most likely). You have 2GB of RAM, but how big is the swap space partition on your drive?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
reading linux text file in windows - problem madhugp Linux - General 2 01-11-2007 12:47 AM
C++ ifstream: Problem reading a file BenScaplen Programming 26 02-01-2006 08:42 AM
problem reading arabic file names in fedora core 3 Yaan Linux - Newbie 1 05-21-2005 01:44 PM
problem in reading Microsoft word as a binary file ljqu_happy Programming 15 02-02-2005 10:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration