Fortran Definition and 858 Threads
-
B
Fortran Having some trouble with Fortran
I am sitting down and working my way through a Fortran 90/95 book for a research project I will be involved in at my university in a few weeks. However, I can't even seem to get the most basic program to work even when copying the template directly from the book. It always says invalid character...- Bashkir
- Thread
- Fortran
- Replies: 16
- Forum: Programming and Computer Science
-
Fortran How to move on from Compaq Visual Fortran
My group at work uses several pieces of legacy Fortran code which we've always compiled using Compaq Visual Fortran. Since CVF has not been supported for while now and is not (easily) compatible with Windows 7, I'd like to move to a more up-to-date compiler and IDE. I'm trying Simply Fortran...- belliott4488
- Thread
- Fortran Visual
- Replies: 4
- Forum: Programming and Computer Science
-
C
Fortran Fortran Programming Silverfrost Error 112
I'm new to Fortran, trying to run this program but when I enter the variables it gives me an error 112. Please help me find where is the mistake. I copied the program from an old book. DIMENSION S(50),V(50) ! Element stress and velocity DIMENSION U(51) ! Nodal displacement ! Double...- carlosg
- Thread
- Error Fortran Programming
- Replies: 8
- Forum: Programming and Computer Science
-
A
Fortran Identify explicit shape spec list in the FORTRAN code
Identify "explicit shape spec list" in the FORTRAN code Hi, I'm trying to do some source code analysis using the ROSE compiler infrastructure on some of the kernels in NAS Parallel benchmark. I get an error while parsing the Embarrassingly Parallel kernel. Digging further, I gathered that...- anirudhnair
- Thread
- Code Explicit Fortran List Shape
- Replies: 1
- Forum: Programming and Computer Science
-
K
Fortran FORTRAN Problem Runtime Error: End of File
FORTRAN Problem! "Runtime Error: End of File" Hey everyone, back again with another Fortran question. I am getting the runtime error in Fortran "End of Line". I have tried to simply understand what this means, but I am not getting much help from Google. I have pasted my code below, and...- karenmarie3
- Thread
- Error File Fortran Runtime
- Replies: 2
- Forum: Programming and Computer Science
-
K
Fortran Can't get Fortran code to give me desired output file
Hey everyone, I have written a Fortran code for a project I am working on, but am having an issue: I can't get the code to output my data to the file I have opened. Here is what I am trying to do. I am setting up a Monte-Carlo code that selects a random x- and y-value. These values are...- karenmarie3
- Thread
- Code File Fortran Output
- Replies: 5
- Forum: Programming and Computer Science
-
S
Fortran How to read data from various files of different sizes in fortran
In my Fortran program, I want to read data from various files whose size I do not know in prior. The input files which I am trying to read may contain different number of entries. If I have same and known number of entries in all files (say 386), I can use something like...- SAMANDEEP
- Thread
- Data files Fortran
- Replies: 2
- Forum: Programming and Computer Science
-
L
Fortran Segmentation error form the fortran code
Hi Forum users I have a velocity autocorrelation code which was made to read a three component velocity vectors and I have modified to read a 9 component stress tensor data. I can compile it successfully but when I try to run it and compute a stress correlation function I get an error: i.e...- lehloks
- Thread
- Code Error Form Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
R
Fortran To read a binary file using fortran
I am trying to read a binary file using fortran. this is how the binary file looks like. 1901 109.1000 241.4000 284.2000 121.9000 1902 104.0000 283.7000 202.6000 201.9000 1903 114.8000 293.0000 279.6000...- Rems
- Thread
- Binary File Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
N
Fortran Why Is MPI_COMM_RANK Not Working Correctly on Mac OSX?
Hi all, I have been running mpi fortran code on Linux based systems without any trouble for some time but making the same code run on a Mac is causing me some headaches. I installed mpi using the guide at: http://www.macresearch.org/compiling-mpi-f90-support-snow-leopard I am trying to run...- natski
- Thread
- Fortran Mac
- Replies: 1
- Forum: Programming and Computer Science
-
B
Fortran Fortran, passing an array to multiple subroutines
Hi guys, I am kind of a newbie to fortran and I'd like to ask a simple question. In the code below, I have a main program with one subroutine. It's a simple one. In the main code I am filling an array with elements from 1 to 10. Then I am passing this array to a subroutine "sub", where...- Biederman
- Thread
- Array Fortran Multiple
- Replies: 5
- Forum: Programming and Computer Science
-
S
Fortran Porting fortran program-compile error ambiguous use of intrinsic Real
Hello, I had started an earlier thread on porting this same program to linux. In that thread I had asked about padding (align) issues. It may turn out that the padding messages may only be warnings and I have shelved that problem. A more critical issue is the one error on ambiguous use of...- saleemhasan
- Thread
- Error Fortran
- Replies: 3
- Forum: Programming and Computer Science
-
S
Fortran Porting fortran program-problem with padding in common
Hello, I must start by stating that I know almost nothing about fortran. I am trying to help port a fortran program to linux. It compiles and runs fine on irix (64 bit sgi origin 2000). There are two make files and both of them give padding warnings. --------- Padding of 4 bytes required...- saleemhasan
- Thread
- Fortran
- Replies: 8
- Forum: Programming and Computer Science
-
K
Fortran [Fortran] subroutine needs fixing
I am trying to use this subroutine which I found online in my model but I am not experienced in programming and I need to know how can I check for errors or debug the code and try to find the mistakes or syntax errors , I have attached the code for your review Thank you- khalchris
- Thread
- Fortran Subroutine
- Replies: 2
- Forum: Programming and Computer Science
-
V
Fortran Create a makefile with allocatable memory in fortran
I have many subroutines which I want to compile individually using makefile. But the memory allocation is not specified in ".INC" file but as separate subroutine depending on the user input. The "gfortran" compiler is showing the following error...- VasanthG
- Thread
- Fortran Memory
- Replies: 9
- Forum: Programming and Computer Science
-
M
Fortran [Fortran] subroutines within the same module
Hi all, I am working on a Fortran 90 program that has many subroutines within the same module. The question is "are all the variables of a called subroutine are available to the calling subroutine without declaring them in the argument list of the called surboutine"? even though they are...- mopen
- Thread
- Fortran module
- Replies: 2
- Forum: Programming and Computer Science
-
N
Fortran How to read files while running fortran program?
Hi, I am trying to run a simulation written mostly in Fortran on Linux. The User's Manual says that "To run a simulation one needs to read several input files." Then, it lists a bunch of files. I was wondering what it means by that and how I "read" the files? Thanks in advance, Naomi- ngendler
- Thread
- files Fortran Program Running
- Replies: 4
- Forum: Programming and Computer Science
-
N
Fortran Integrating User-Defined Functions in Fortran 95: Troubleshooting Runtime Errors
Hi! I'm trying to write a function that will integrate a user given function. I am having trouble with reading the function. Here is a section of my code: [FONT="Courier New"]function f(x) implicit none real :: x,f,p print *,'Type a probability density function' read *, p !It doesn't...- ngendler
- Thread
- Error Fortran Runtime
- Replies: 13
- Forum: Programming and Computer Science
-
Z
Fortran Memory Allocation issues in FORTRAN 90
I'm having trouble allocating memory for a dynamic two dimensional array in FORTRAN 90; the odd thing is that when I did the same thing using three on dimensional arrays instead of an array with the dimensions 3*x, I didn't have a problem. read (1,*) ndat1 !The first line of every file is...- ZackVM
- Thread
- Fortran Issues Memory
- Replies: 3
- Forum: Programming and Computer Science
-
P
Fortran Optimizing Programs: Fortran or Visual Basic?
Fortran / Visual Basic ?? I wrote more then few dosens programs in all flavors of Basics, mostly in DOS. Unfortunatelly with the new Windows systems, 32, 64 bit they are no longer usable. I would like to rewrite some of them. It is mostly structural engineering, cams, linkages. The codes are...- Paul_Sm
- Thread
- Fortran Visual
- Replies: 13
- Forum: Programming and Computer Science
-
N
Fortran Getting an unclassifiable statement error in Fortran 95
Getting an "unclassifiable statement" error in Fortran 95 I am trying to integrate the function x from 0 to 1. Here is my code: [FONT="Courier New"]program myownmonte !This program will integrate the function x from 0 to 1 implicit none real :: ans0,y,f,x,xmax integer ...- ngendler
- Thread
- Error Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
N
Fortran Fortran output has lots of errors that I don't understand
I am trying to write a program that in Fortran 95 will integrate x^2 from 0 to 1. Easy right?? I'm getting errors, though, that I really don't understand. Here is my code: [FONT="Courier New"]program montecarlo2 implicit none real :: fmax,iseed,srand,xmax,x2,x,y !why do we need pi...- ngendler
- Thread
- Errors Fortran Output
- Replies: 2
- Forum: Programming and Computer Science
-
Fortran Fortran, reading a particular column of a matrix, allocatable
I have a program that makes a histogram from data taken in a file but it only works if the data is an array (nx1 matrix). I've downloaded a data file which is a 159663x12 matrix but only the 8th column contains numbers I'm interested it. The other columns contain either letters and/or numbers...- fluidistic
- Thread
- Column Fortran Matrix Reading
- Replies: 11
- Forum: Programming and Computer Science
-
Fortran Fortran, is it possible to count the number of times a particular valu
I have a data file with 21 values in it, which range from 2 to 10 by integers values. I would like to know whether it's possible to write a Fortran code to count the number of times a particular value (for instance "6") appear in the file. Let's call x_i the number of times the value i appears...- fluidistic
- Thread
- Count Fortran
- Replies: 17
- Forum: Programming and Computer Science
-
J
Fortran Solve FORTRAN READ Problems: Troubleshooting & Manual
Hi, I'm having trouble with some FORTRAN code I'm trying to use. I receive an error: At line 769 of file ../src/mpolar.f (unit = 11, file = 'polarx.387') Fortran runtime error: Sequential READ or WRITE not allowed after EOF marker, possibly use REWIND or BACKSPACE Upon inspection...- jasonbot
- Thread
- Fortran
- Replies: 5
- Forum: Programming and Computer Science
-
N
Fortran Fortran 77 compatibility with Fortran 95
Hi, I have a program written in Fortran 77 that I need to include in my Fortran 95 program. I don't have an F77 compiler, but I was told that F95 should be able to read F77 programs. I'd like to write INCLUDE 'vegas.f' in the first line of my program, but it's not compiling. I keep getting...- ngendler
- Thread
- Fortran
- Replies: 8
- Forum: Programming and Computer Science
-
G
Fortran Problem setting integer precision in Fortran
I'm trying to work with big integers but for some reason this program won't compile: program prob003 implicit none integer, parameter :: k32 = selected_int_kind(32) integer(kind=k32) :: num = 600851475143 end program prob003 The file name is prob003.f90 and I'm trying to...- GabDX
- Thread
- Fortran Integer Precision
- Replies: 4
- Forum: Programming and Computer Science
-
O
HTML/CSS Can a Fortran 95 Program Run Online Using a HTML Form?
I've got a Fortran 95 program (which basically does few calculations) and I'd like to use it online. So that, the users will input data into a HTML form, the program will run, and it will display the results. Would it be possible to do it in the following way? To run a little program (e.g...- onlybarca6
- Thread
- Form Fortran Html
- Replies: 1
- Forum: Programming and Computer Science
-
Comp Sci Multiplying Matrices in Fortran: How to Create a Function for Any Dimension
Hi. Write an external function that takes two matrices, multiplies them and returns the resulting matrix. Matrices can be of any dimension. Print the resulting matrix The above is what I have to do. http://paste.servut.us/pgmm This is what I've done so far. But it seems like...- Nugso
- Thread
- Fortran Matrix Matrix multiplication Multiplication
- Replies: 16
- Forum: Engineering and Comp Sci Homework Help
-
E
Fortran Problem in Extracting Numercial Values in fortran
Hello all,I have a small doubt. I use F95/90 and IBM compiler.This is a portion of my text file ----------------------- Alpha Singles Amplitudes 15 3 23 4 -0.186952 15 3 26 4 0.599918 15 3 31 4 0.105048 15 3 23 4...- equillibrium
- Thread
- Fortran
- Replies: 2
- Forum: Programming and Computer Science
-
S
Fortran Finding Maximum Acceleration Values in Fortran
Hello I am currently working on a program that will take the values from a .csv file containing multiple data and analyzing them. The file can be found here: https://docs.google.com/file/d/0BzuDEPd26OcheVhiWlZ3STlZU0k/edit?usp=sharing The data in question starts in row 11 and is in the first 4...- ShoxPhysics
- Thread
- Fortran Maximum
- Replies: 6
- Forum: Programming and Computer Science
-
S
Comp Sci How to tell Fortran to get rid of composite numbers?
Problem Statement: Do the sieve of Eratosthenes from 2 to 100 and find all the primesSo I'm trying to do the sieve of Eratosthenes in fortran 90 (I'm using Plato IDE)My efforts to solve this/ method to use: Obviously, I want the program to do a LOOP starting with every whole number from 2...- Sir Arun
- Thread
- Composite Fortran Numbers
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
M
Fortran Fortran help: Open and Write functions
How can I have an open statement: OPEN(Unit=1,File='data.txt',...) and be able to later have a write statement: WRITE(*,15) 15 FORMAT('Data was collected from ',?,'file:') where the ? would call in the file name. Also, when I type 'file:', it creates a link to something. How...- Mustachio13
- Thread
- Fortran Functions
- Replies: 5
- Forum: Programming and Computer Science
-
Comp Sci How to Search Database & Find Phone Number in Fortran Program?
Write a program that creates a phone-book (Name, Surname, Phone Number). Ask the user the number of entries Read user input to an array Write this array into a file in the hard-disk Your program should avoid multiple entries! If a record already exists in the phone-book, the program should...- Nugso
- Thread
- Fortran
- Replies: 13
- Forum: Engineering and Comp Sci Homework Help
-
Fortran What's causing my Fortran bisection method to give incorrect results?
I'm rusty with fortran and programming in general. I can't see my "error" in a code that I wrote from scratch. Basically I wanted to get some fun and solve for a temperature in thermodynamics where I must get "T_f" which appear in a transcendental equation: ##A\ln \left ( \frac{T_f^2}{T_1T_2}...- fluidistic
- Thread
- Bisection method Fortran Method
- Replies: 4
- Forum: Programming and Computer Science
-
T
Fortran What is the purpose of the Fortran 77 commands expg and dexp?
Hi! I have the next expression and I don't know what exactly mean the commands a= dexp ((const1)* (b-298) / (b*298)) This one, I guess it's to calculate the exponential value of the expression giving a double precission. But i didn't find any info about the command expg, i.e: a =...- Triscas
- Thread
- Fortran
- Replies: 7
- Forum: Programming and Computer Science
-
J
Fortran Does FORTRAN 95 Support Hardware Serial Ports and Configuration?
Does FORTRAN support use of hardware serial ports? I need to write and read to a COM port. If so, can you configure the port as well? (ie baud rate , parity ,data bits, stop bits ) Thanks, Jim- jelanier
- Thread
- Fortran Serial
- Replies: 9
- Forum: Programming and Computer Science
-
S
Fortran How to Find an Effective 2D FFT Subroutine in Fortran 77?
Does someone have an effective two-dimensional FFT subroutine in Fortran 77?- seanshee
- Thread
- Fft Fortran Subroutine
- Replies: 3
- Forum: Programming and Computer Science
-
S
Calculate ERFC in Fortran 77 | Help ERFC Fortran 77
Is there anybody know how to calculate ERFC in Fortran 77?- seanshee
- Thread
- Fortran
- Replies: 5
- Forum: Atomic and Condensed Matter
-
M
Fortran Fortran 90 (floating point error)
Hello, I am dealing with the code below and i am receiving 'runtime error M6104:MATH floating point error:overflow'. i searched the error online and it is written the output values have high range than input values that i represent as input. I am using Microsoft Developer Studio and since my...- MelihAltunan
- Thread
- Error Fortran Point
- Replies: 8
- Forum: Programming and Computer Science
-
I
Fortran Where Can I Find Affordable Fortran Compilers for Scientific Computing?
Hello all, I need to learn to code in fortran 77 preferably or fortran 99 if 77 isn't available easily for a scientific computing course this fall. Does anyone know where I can obtain one of these compliers for somewhere between free and a few hundred dollars?- Ingenium5
- Thread
- Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
N
Fortran [FORTRAN] Determining Apoapsis + Periapsis (Astrophysics)
Say the focus point - the Sun - is at P(0,0), would I then determine the apoapsis (periapsis) by implementing the Pythagorean Theorem on each point to determine which point's distance is largest (smallest for periapsis) from the origin, then output the coordinates for each? Each coordinate to be...- Nicolaus
- Thread
- Astrophysics Fortran
- Replies: 1
- Forum: Programming and Computer Science
-
N
Fortran [FORTRAN] Character Substring Extracting
How would I go about extracting the 3 substrings delimited by the slashes in the date? The date is a string in the format "d/m/y" This subprogram checks if there are at least 2 slashes for correct format, and then, if the format is correct, the program would then extract the day, month, and...- Nicolaus
- Thread
- Fortran
- Replies: 6
- Forum: Programming and Computer Science
-
T
Fortran What does the Fortran 77 command 'write' do and how is it used?
Hello, I'm new using fortran and I don't know what does it mean: write (4,*) ' ' write (4,310) write (4,311) this lines go consecutive in the programm I have to understand. - might say that 4 is not a reference to a line of the code. - 310,311 are references about how the...- Triscas
- Thread
- Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
S
Fortran Multi-Dimensional array multiplication in fortran
Hi; Is there anyone who knows multi-dimensional array multiplication in fortan ? such as; A(5,5,3,3) * B(5,5,3,3) thanks- selmayda
- Thread
- Array Fortran Multiplication
- Replies: 6
- Forum: Programming and Computer Science
-
B
Fortran Fortran bug: rank problem gfortran
This is my own code, and it won't compile with gfortran. All I want to do is extract the location of the cell with the minimum value in an array. A seemingly simple task but one that does not work with the intrinsic function minloc, for reasons I do not understand. The error message...- billiards
- Thread
- Bug Fortran Gfortran rank
- Replies: 3
- Forum: Programming and Computer Science
-
W
Fortran What does 0.1773372103+245 mean in FORTRAN?
Hi, I'm writing a program in FORTRAN (my first) to find E and B fields due to a spinning sphere of charge. Anyways when printing out E and B field magnitudes I am getting numbers like this: 0.1773372103+245 What the heck does this mean!? Is it like 0.1773372103 x 10^245? Thanks for any...- wyosteve
- Thread
- Fortran
- Replies: 9
- Forum: Programming and Computer Science
-
R
Comp Sci Fortran DO Statements (how many loop times)
Hello, Examining the following DO statements and determining how many times each loop will be executed. Assume that all loop index variables are integers. (a) DO irange = -32768, 32767 (b) DO j = 100, 1, -10 (c) DO count = 2, 3, 4 (d) DO index = -4, -7 (e) DO i = -10, 10, 10 The loop will...- rk2ray
- Thread
- Fortran Loop
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
R
Fortran Why Is My FORTRAN If/Else Statement Not Working Correctly?
I am not able to get what's wrong in below. IF ( temp < 97.5 ) THEN WRITE (*, *) NTemperature below normalN ELSE IF ( temp > 97.5) THEN WRITE (*, *) NTemperature normalN ELSE IF ( temp > 99.5) THEN WRITE (*, *) NTemperature slightly highN ELSE IF ( temp > 103.0) THEN WRITE (*, *)...- rk2ray
- Thread
- Code Error Fortran
- Replies: 6
- Forum: Programming and Computer Science
-
R
Fortran FORTRAN PROGRAM FOR MEANS (Beginner)
I am learning Fortran and I am able to write code for 3 number means. Now For computing it for set of numbers is not getting in my mind. I am not able to do it. Writing a single Fortran program that calculates the arithmetic mean, rms (root-mean-square) average, geometric mean, and harmonic...- rk2ray
- Thread
- Beginner Fortran Means Program
- Replies: 3
- Forum: Programming and Computer Science