Sponsored Content
Full Discussion: Error running FORTRAN code
Top Forums Programming Error running FORTRAN code Post 302535151 by LMHmedchem on Thursday 30th of June 2011 01:51:10 AM
Old 06-30-2011
This is probably nothing other than an array, of some other data or control structure, that is not declared as large enough. This is common in Fortran because you have to pre-size everything and hope you leave enough space. Sometines an allocation will be sufficient when a program is first developed, but may need to be increased later. The use of a parameter.dat file is common where you hard code constants with sizes for things that may need to change. Then you use the constant as the array size. You keep them all in one place and well documented so it is easy to change. When you have too many input files, the array boundaries are exceeded and there is a seg fault. You could also be flat running out of ram, especially if this is run on an older machine with limited resources.

There are lots of other possibilities, but those are the most likely since the program runs for smaller input files. Another thing to consider is that one of the input files is malformed. Fortran is unbelievably picky about file formats and such, so if one of your models had an issue and produced improperly formatted output, or no output at all, that could also cause in issue if the specific format problem wasn't trapped out. The best way to evaluate that is to try to find where the process fails, if you can find the location in the specific input file where the app crashes, you can look at it to see if there is a visible issue or not.

It is still unclear to me what the final output of the app is supposed to be. If the input files are text files, you can try to compress them, or post them on another location on the web and post a link. If I have a sample of the two input files that you are trying to merge, and a sample of the expected output, it should not be to difficult to fix. The files do not need to be complete, or actual files, just enough to see what the format should be.

A quick look shows that this seems to be set to open up to 1000 files, after that you will exceed the size of the do loop iterator.

Quote:
Originally Posted by Tytalus
are you opening all files concurrently or sequentially; are you closing each file before reading from the next ?
:-)
This is an important point, it looks like all of the files are closed at once, and if you are keep all of those large files opened, you may indeed be running out of memory. You have you checked you resources while the app is running to see how much available RAM you have?

LMHmedchem

Last edited by LMHmedchem; 06-30-2011 at 03:06 AM..
 

9 More Discussions You Might Find Interesting

1. Programming

Error while running the C code

Hi Sir, I am running C program which include directfb.h header files. root@lxdevenv:~/Desktop# vi n.c root@lxdevenv:~/Desktop# gcc n.c -o n -I/usr/local/include/directfb -L/usr/local/lib -ldirectfb -lfusion -ldirect -lpthread -lm n.c: In function ‘main':... (2 Replies)
Discussion started by: Ravikishore
2 Replies

2. Programming

Making FORTRAN code more efficient

Hi, I have a very large, very old FORTRAN code that I work with. The code is quite messy and I was wondering if I can speed up execution time by finding subroutines that code execution spends the most time in. Is there any kind of software I can use to see where the code spends most of the... (1 Reply)
Discussion started by: rks171
1 Replies

3. UNIX and Linux Applications

Getting error code when running the script 2 (RC)2

hi All, we have a script to remove the files from particular path,when we tryingto run manually the script went to success and removed the files but the same script which is running by other team it got failed and giving the error "2 (RC)2 "..what is the cause of the failure..and we passing the... (2 Replies)
Discussion started by: nagavenkatesh
2 Replies

4. Programming

Help with make this Fortran code more efficient (in HPC manner)

Hi there, I had run into some fortran code to modify. Obviously, it was written without thinking of high performance computing and not parallelized... Now I would like to make the code "on track" and parallel. After a whole afternoon thinking, I still cannot find where to start. Can any one... (3 Replies)
Discussion started by: P_E_M_Lee
3 Replies

5. Programming

Using Doxygen on Fortran code

I am using doxygen for documenting my fortran code. I want to write some notes after the header in different parts of the subroutine. Any idea what the tags should be as anything I write after the header is not displayed ... (0 Replies)
Discussion started by: kristinu
0 Replies

6. Programming

Removing goto statements in FORTRAN code

I have the code below and I want to remove the "go to" statements. Any idea how I can do it? if (iorder == 0) then tmincurrent = 1.0e11 if(ireverse == 0 .or. istop /= 1) then do i = 1, 6 if ((side(i) /= sidelimit(i)) .and. (tminside(i) < tmincurrent)) then ... (1 Reply)
Discussion started by: kristinu
1 Replies

7. Programming

Strange characters in FORTRAN code output

Hi guys, After compiling a .f90 code and executing it, i get strange characters in the output file like : ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ Are these windows characters? how can i get rid of this? Much appreciated. Paul (1 Reply)
Discussion started by: Paul Moghadam
1 Replies

8. Homework & Coursework Questions

FORTRAN error *** glibc detected ***

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I'm doing aproximation of derivative called five-point stencil. For every value of x, in interval , in step... (0 Replies)
Discussion started by: antonija
0 Replies

9. Programming

Error in my FORTRAN program

I have a Fortran program and I am writing out to logical unit 7. The program is reading from a text file and writing to the new file formatted. It gets through the read and writes some to the file but then stops with the following error: 1525-013 The sequential WRITE statement cannot be... (5 Replies)
Discussion started by: KathyB148
5 Replies
bdiff(1)						      General Commands Manual							  bdiff(1)

NAME
bdiff - Finds differences in large files SYNOPSIS
bdiff file1 file2 [number] [-s] bdiff - file2 [number] [-s] bdiff file1 - [number] [-s] The bdiff command compares file1 and file2 and writes information about their differing lines to standard output. If either filename is - (dash), bdiff reads standard input. OPTIONS
Suppresses error messages. (May either precede or follow the number argument if it is specified.) DESCRIPTION
The bdiff command uses diff to find lines that must be changed in two files to make them identical (see the diff command). Its primary purpose is to permit processing of files that are too large for diff. The bdiff command ignores lines common to the beginning of both files, splits the remainders into sections of number lines, and runs diff on the sections. The output is then processed to make it look as if diff had processed the files whole. If you do not specify number, a system default is used. In some cases, the number you specify or the default number may be too large for diff. If bdiff fails, specify a smaller value for number and try again. Note that because of file segmenting, bdiff does not necessarily find the smallest possible set of file differences. In general, although the output is similar, using bdiff is not the equivalent of using diff. NOTES
The diff command is executed by a child process, generated by forking, and communicates with bdiff through pipes. It should not normally be necessary to use this command, since diff can handle most large files. EXIT STATUS
No differences. Differences found. An error occurred. SEE ALSO
Commands: diff(1), diff3(1) bdiff(1)
All times are GMT -4. The time now is 08:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy