Fortran Definition and 858 Threads

  1. A

    Fortran Fortran locate symbol in data file

    I need to look for the presence of '////' in my data file i could read it as character since i need to eliminate them from the file, I've tried to avoid them using if(xx .eq. '////') then but is not working the error comes as if(mt.ne. '////')then...
  2. A

    Fortran Fortran; Calling an executable that in turn runs an input file

    Hi. I need to write a fortran program that calls an EXE, call it "runner.exe" that in turn runs an input file, call it "run.inp". Thing is, I would normally run "runner.exe" manually, and type in "run.inp" and "runner.exe" gives outputs. But now, I have 100's of input files and I can't affod...
  3. G

    Fortran Find peak in the historgram data file - FORTRAN

    Hello guys, I have a file with X Y values (separated by space) I want to scan the data to find the PEAK in the file. (It will probably be a lowest Y point...) How do I do this is Fortran? Thank you, Alexander
  4. V

    Fortran FORTRAN, open several files and read it

    Hi pals I'm using fortran program to open several files like iso1.dat,iso2.dat... iso9.dat withis this files are number that I can read with my program, but I don't know how can I open the files above and then read it this is my simple code implicit real*8(a-h,o-z)...
  5. S

    Fortran Fortran 95 Help ( Compiling errors)

    Hello all, I'm kinda stuck with this fortran 95 program I have to write. It is an Infinite Series of SIN. IMPLICIT NONE ! ! Data Dictionary REAL :: x ! Measurement of angle in degrees REAL :: result ! facilitates addition of the functions REAL :: f_x ! function defining the series REAL...
  6. S

    Heard about the software Fortran

    Hello, I just heard about the software Fortran but i know nothing about it. I heard it is better than Matlab when dealing with numerical methods. Is it easier to use than Matlab?
  7. M

    Fortran What is the solution for skipping the last line in a FORTRAN program?

    Hi, I am an newbie programmer and I need some help with modifying a code in fortran. This program is supposed to skip the first two lines and the last line of the sample data and then extract only the date from the date column and write it to and output text file. The program I have now manages...
  8. A

    Fortran Fortran, complex array with rank one

    I'm using the MATMUL command to multiplicate two arrays: array A is of rank one and has three complex elements, while array B is a 3x3 matrix with complex elements. However, the compilation is aborted because "the shapes of the array expressions do not conform". I'm pretty sure that the...
  9. T

    Fortran How Can I Define and Use Very Small Numbers in Fortran 90?

    how do I define and use small numbers for computations? on the scale of 10^-30? e.g. Program A implicit none double precision a,b,c,d c = (a*b)/(a+b) d = etc... End program The above has an overflow error when I give a,b the values 3.345 * 10^-27 Can anyone help? Thanks Ising
  10. C

    MATLAB Using Matlab functions in Fortran -

    Hello, My work is on numerical techniques which require to solve sparse matrices etc. All my work is in fortran and I have almost no skill in Matlab.But I have just realized that Matlab can do some computations quite easily with its built-in functions and I want to take advantage of this. I...
  11. D

    Fortran Understanding the Relationship Between F# and Fortran in the .NET Framework

    Is F# fortran for .NET? My roommate seems to be under the impression that it is something like that. But I can't find any clear info on it's relation to Fortran.
  12. S

    Fortran Passing variables between subroutines in different files using Fortran

    Good day, I'm modifying a Monte Carlo program (MCCCS Towhee) using Fortran and am having trouble passing an argument (a 2x1 array) from a subroutine withing one file (the existing main loop that 'drives' the code) to another subroutine written in another file (an energy calculation, also part...
  13. A

    Fortran Reading formatted input in fortran

    format statement to read input in fortran hello everyone, I've to read this following line in fortran, I don't know to read the exponential form please help me 3.49E+03 2.73E+01 2.01E-01 9.16E-02 5.94E-02 5.11E-02 3.27E+04 3.27E+04 can somebody help me to write the format...
  14. J

    Fortran Fortran 90 help reading from file

    Hi All I'm completely new to Fortran 90 and I have to create a program that opens a formatted data file and reads in certain values into my program's variables. The variables are represented in the first six rows with ncols, nrows, xllcorner, yllcorner, cellsize and NODATA being the...
  15. A

    Fortran Fortran question, read from file

    Hello. I'm completely new to programming, and I'm having some troubles with a Fortran program I'm writing. I have an input file containing three columns, where each column contains a couple of cartesian coordinates (column 1 contains various x coordinates, and so on). What I would like my...
  16. T

    Fortran How do i 'relabel' variables (in fortran)

    Suppose I have a global variable like "GauntCoefficients".. and I want to use it in a formula in the next block of code. In C++, I might do something like this to make the code more readable: const int* gc = GauntCoefficients; (then write some nasty formula with "gc" rather than...
  17. Q

    Fortran Fast connection between fortran 77 and 90

    Hi! I'm having kind of a "little" problem. I got an old program written in Fortran77 and I want to implement some functionality from Fortran90 routines. The routines are quite long, so I'm not able to rewrite them in F77... Is there a possibility to connect the routines so that they can...
  18. Y

    Fortran Is it possible to call shell commands from a Fortran program?

    Hello! I'm new here and I was wondering if anyone could help me. I've a program in fortran which I want to combine with Matlab, both working in Ubunt 7.10 but I don't want to use mex-functions or MATLAB engine functions because it could cause damage to the fortran program I'm using. I was...
  19. Z

    Fortran Fixing Fortran DO Command Errors for Visual Fortran (f90)

    I am working with visual Fortran (f90 I believe) I have the following program and it says that I have 2 errors. I have narrowed it down to having something to do with my loop statement in bold. Is there something wrong that I'm not getting? program exercise1 implicit none...
  20. Z

    Comp Sci How to Open a Command Window for Fortran 90

    I feel very silly for asking this but I have just downloaded Fortran 90 and am trying to figure out how to open the command window. I am used to using MATLAB which automatically opens a command window when you open the program. I have the option of opening the developer studio or the command...
  21. E

    Fortran Reading MS Excel Files in FORTRAN 77

    Dear Members, How can I read an MS Excel created csv or tab delimited file in FORTRAN 77? The two tab delimited and csv files are attached. Thank you, Ekin
  22. J

    Fortran Compling of Fortran file aborted

    Hi I want to sort the data in output file by Fortran transfer file. when I do ./transfer<output>data1 It gives an error message: invalid number: incomprehensible list input apparent state: unit 5 (unnamed) last format: list io lately reading direct formatted external IO Aborted can...
  23. K

    Fortran Fortran Compiler and C Preprocessor

    I am very new to programming and am trying to determine if a Fortran compiler and C preprocessor is a property of the specific computer one has or if it is something that can be downloaded? Specifically I want to run the Neutron transport code, DANTSYS; system requirements are listed here...
  24. J

    Fortran Learn Fortran Programming: Compaq Visual Fortran 6 Options

    Hello, Currently I am using compaq visual fortran 6 to learn fortran programming. I am very beginner on this so I really confuse about how to use it. Can anyone tell me which option I should choose from the following attached image, to start writing some fortran code...
  25. C

    Fortran Fortran 90 Replace Text on Screen - Andy's Question

    Hello. In producing screen output from Fortran, I use the write statement. Back in the day, there was a way to use the FORMAT statement to allow you to replace text on the screen with different text. For example, counting up percentage complete of a process or something like that. Well...
  26. R

    Fortran How can I read and write 3D arrays in Fortran?

    Hi! I have a 3D array u(n,m,2), where n=2000, m=200 are the xy-coordinates, and u(n,m,1) and u(n,m,2) store values of variables a and b computed at the coordinates. (not very familiar with fortran I/O for arrays, when new lines are started, etc). I'd like to output this array into a...
  27. G

    Fortran Can software parallelization in Fortran reduce CPU usage and execution time?

    hello i have intel core 2 quad and my operating system is windows,every time i execute my fortran code it takes 8 hours to finish and just 25% of my cpu is used during the run(cpu usage=25%),it means just one core of my processor is used,so is there any way that i can use all the 4 cores of my...
  28. K

    Fortran Fortran Program Test: How to Change Line in File

    program test open(50,file='test.dat') write(6 ,FMT='(I3,/)') 111 WRITE(6 ,FMT='(I3,/)') 222 write(50,FMT='(I3,/)') 111 WRITE(50,FMT='(I3,/)') 222 close(50) end In the above, at the screen i see: 111 222 but in the dat file i see: 111222...
  29. M

    Fortran Creating a Graphical Interface for FORTRAN Programs: Tips and Tools

    Hi guys, I am fairly competent at programming scientific FORTRAN programs (from the CFD world). A friend of mine asked me to help him develop a program which he says will help him in his profession greatly. The backend calculations are incredibly easy. However, what I need to do is this: 1)...
  30. K

    Fortran Fortran Help, Please. Waiting online.

    The "multiplication (*)" in the group is simply performing them after one another. Take 6 coloured balls. Permute the first and third one. Now permute the third and fifth one (note: by third one I mean the one in the third position, not the third ball which is not in the first position). You...
  31. A

    Fortran Fortran Program Doubt: Plotting DST Index Values

    i have written a program to plot dst index values using fortran + pgplot, read the input as formatted input when I'm trying to plot the data points are not plotted correctly. k = 0 do i = isdt, iedt --------------start date to end date do j = 1,24...
  32. U

    Fortran Sequential File output in Fortran

    Hello, I am currently using a Fortran program to run a simulation which involves an explicit differentiation loop. The program currently plots simulation data at specified time intervals using a subroutine with another program. I'd like to have the program also output data files at these...
  33. M

    Fortran Compaq Visual Fortran: Does it Have IMSL Library?

    Hello, I have one questions. Does Compaq Visual Fortran have IMSL library? I tried to compile program which use MSIMSLMS module but program said that did not found the module. Thanks, Marden
  34. K

    Fortran Understanding Permutations in Fortran Programming

    Is there anyone familiar with Fortran programming, who can give me some ideas how can I strart this? Many thanks Take 5 colored balls(1,2,3,4,5). The "multiplication" in the group is simply performing them after one another. Permute the first and third one. Now permute the third and...
  35. K

    Comp Sci Computional Methods Problem with Fortran programming

    Is there anyone familiar with Fortran programming, who can give me some simple ideas or resources how can I strart this project? Many thanks Data Structures - The Permutation Group In this project, the group of permutations on N elements (where N is probably fairly small, perhaps N= 9 or...
  36. K

    Comp Sci Computional Methods Problem with Fortran programming

    Is there anyone familiar with Fortran programming, who can give me some simple ideas or resources how can I strart this project? Many thanks Data Structures - The Permutation Group In this project, the group of permutations on N elements (where N is probably fairly small, perhaps N= 9 or...
  37. M

    Fortran FORTRAN Open Arbitrary number of files in Do Loop

    I have a quick question that I've always wondered exactly how to do but never needed to. Well of course now I do. I have a DO loop that loops an arbitrary number of times. I would like to open a file each time it comes around, using the DO loop iterator as part of the filename. Ideally, it would...
  38. D

    Fortran What is the most optimized way to transpose a matrix in Fortran?

    Hi! I'm working on a programming project(fortran 77). and I need to transpose a big matrix, and for the moment I'm doing it by to do-loops: DO 20 J = 2,NP DO 10 I = 1,J-1 T = P(I,J) P(I,J) = P(J,I) P(J,I) = T 10 CONTINUE 20...
  39. M

    Fortran Loading 2D array files to Fortran variables

    Hi, I have created data files by compiling and running a c++ code. Now I need to open and store the contents of these files in Fortran 77 variables. But I am not able to do this. The read command does not return the values stored in the file. The files are having some 2003 lines and 53...
  40. W

    Fortran Why Doesn't Fortran Recognize Small Numbers?

    We're not talking very small. Is it the compiler? I'm using gfortran. An example would be: f(y)=1E-5*(y**3) For f(40), that should be 0.64. When I compile and execute, however, it displays 0's. If I make the coefficient 1, the result does come out to be correct. I have an old...
  41. J

    Fortran What Could Be Causing Errors in My Fortran Program Compilation?

    Hi there I compile the following Fortran program but it shows more error it output file. can you help me. with Regards, jamshid INCLUDE '(SCOHLP)' INCLUDE '(PAPROP)' * * ******LOGICAL LFIRST ******SAVE LFIRST, ZMIN, DELTAZ ******DATA LFIRST /.TRUE./ * Initialization...
  42. F

    Fortran Fortran: how do you read from a memory-mapped file?

    Hello everyone! I have some binary data (list of integer and float values) stored in a memory-mapped file. I need to read this data. I know how to do this in Delphi and C, but Fortran completely stalled me. So far I managed to open my virtual file (OpenFileMapping) and create a mapview...
  43. B

    Fortran Fortran issue. HEEEEELP? Not a human error, somethings buggy ?

    Fortran issue. HEEEEELP? Not a human error, somethings buggy...? I have no clue why this is acting like this, I'm getting a strange error. I don't believe this is a human error, I've followed the examples perfectly. The picture shows it all. I ran it once trying to use a random function and...
  44. C

    Fortran Help with Fortran Code Using FFTW-3.3alpha1

    Hello, I've been trying for 2 weeks now to write in fortran a MPI program that computes the Fourier transform off a real matrix and then in vers transform using fftw-3.3alpha1. I installed the libray on evry computer availbale at my school and an I was able to compile yet my code. Even if...
  45. K

    Fortran Why Do Commented Write Statements Affect FORTRAN SDP Output?

    I have a stochastic dynamic program with markov process written in FORTRAN, below. If you comment out the write statement that says "uh, THIS SHOULD MAKE NO DIFFERENCE" and/or some of the other write statements that are just text, no variables being written, you will see a difference in the...
  46. K

    Fortran Formatting Issues in Fortran Compounded Interest Program?

    I'm trying to write a program for compounded interest, but am having trouble with the formattting. Any ideas? This is what I have: program interest_calculations !name, Assignment 5-25, to calculate interest implicit none real :: A !future value of the account real :: r !annual percentage...
  47. W

    Fortran I'm Having a lot of Problems with Fortran (77)

    I'm new to this language, and my programming experience is limited (I've only done Assembly). My issues do not necessarily lie in the coding itself, but in the compiling and building. I'm using Eclipse, on which I installed Photran. The syntax recognition and formatting of the GUI is very...
  48. R

    Fortran (3I3,F9.6) Fortran source code

    what does this mean..i saw this in Fortran source code! (3I3,F9.6) thanks.
  49. A

    Learn Fortran for Atomic/Particle Physics Grad Studies

    Alright I'm a first year physics student whose goal is to get a masters or PHD in atomic or particle physics. However I've been talking to a lot of physics grad students and the all mention using Fortran in their research. Now I've gone over my courses and the only programming class I'm required...
  50. F

    Fortran Error 112 /undef when running fortran code

    Hiya. I am able ot compile my program with no errors but when I run it I get the message: Error 112, Reference to undefined variable, array element or function result. I cannot see where I have gone wrong and more frustratingly this code was working, running producing results on the unix...
Back
Top