Fortran Definition and 858 Threads
-
P
Fortran [Fortran] String variable for output filenames
This is the troublesome part eLeftOutFile = 'data/ElonL'//fileNameSuffix(0:25)//'.dat' OPEN(754,FILE=eLeftOutFile,STATUS='REPLACE',ACCESS='SEQUENTIAL') First off, fileNameSuffix is a CHARACTER(len=40) just to be safe, I am just cutting it off, since those are the relevant parameters...- panzerlol
- Thread
- Fortran Output String Variable
- Replies: 5
- Forum: Programming and Computer Science
-
D
Fortran Help in Fortran: Get Assistance to Solve Integer Overflow Error
Hi, i am truing to generate a matrix of my big file in which each line must be assigned as a vector into a matrix. on the other word, i have a big file by 24480 row and 6828 column, so i want to define that each row is been as a vector in a big matrix. using below program i was facing by an...- Davoodk
- Thread
- Fortran
- Replies: 2
- Forum: Programming and Computer Science
-
R
Fortran Why is Fortran running much slower on Linux?
I have a Fortran95 program that I run on my Windows laptop (i7 2.0Ghz); its in serial, so its running on one thread, which seems consistent with task manager results (12.5% processor usage), so I figure it should be using ~1 ghz. I am compiling using the standard one that came with my F95...- Rotarman
- Thread
- Fortran Linux Running
- Replies: 1
- Forum: Programming and Computer Science
-
D
Fortran Fortran: Creating a sequence with constraints
I'm trying to write a program in fortran that will create a sequence of numbers (starting with a number that I input) that follow the following constraints: If the number (n) in the sequence is even, then the next number in the sequence will be n/2. If the number (n) in the sequence is odd, then...- d-star
- Thread
- Constraints Fortran Sequence
- Replies: 9
- Forum: Programming and Computer Science
-
S
Fortran [Fortran] Problem with subroutine
Hello everyone ; I have tried to run a program which has many subrotines so I control each of them.But, when I run one of them, the below error message is seen; /tmp/ccMqKR9L.o: In function `MAIN__': getg0.f:(.text+0x73c): undefined reference to `readin_' collect2: ld returned 1 exit status...- selmayda
- Thread
- Fortran Subroutine
- Replies: 4
- Forum: Programming and Computer Science
-
N
Fortran FORTRAN - SUBST help and error
Hi, I am new to FORTRAN and trying to debug/compile some code passed on to me. 2 questions: - What purpose does SUBST or DSUBST serve? - When I run my Makefile I keep getting the following error: 'PGF90-S-0026-Unmatched quote' According to the PG manual this translates to 'Integer...- ns2455
- Thread
- Error Fortran
- Replies: 2
- Forum: Programming and Computer Science
-
A
Fortran Troubleshooting Fortran Errors: How to Fix Code Compilation Issues
Dear all, I'm write code in Fortran language when compile my program I got error message : forrtl: severe (71): integer divide by zero Image PC Routine Line Source f0511 00000000007536A5 Unknown...- alcantara_20
- Thread
- Error Fortran
- Replies: 17
- Forum: Programming and Computer Science
-
C
Fortran Fortran: determine the horizontal distance of a ball
Im writing a program to determine the horizontal distance of a ball but getting this error: Y(t)=Y0+VY0*t+(1/2)*g*t^2 1 Error: Unclassifiable statement at (1) Distance=(X(t))^2+(Y(t))^2 1 Error: Unclassifiable error at (1) My code is as follows: PROGRAM...- CCguru
- Thread
- Ball Fortran Horizontal
- Replies: 4
- Forum: Programming and Computer Science
-
P
Fortran Fortran: specification statement cannot appear in the executable section
Hi guys, I am working on a Fortran code for a while. Might seem ridiculous but to better trace it, I split code into three separate parts and trying to compile both using the command 'ifort ss.f singpot.f SNGPOT.f -o ss'. With this command I receive the error singpot.f(22): error #6236: A...- Peptid
- Thread
- Fortran Section
- Replies: 3
- Forum: Programming and Computer Science
-
U
Fortran Automatic array allocation in Fortran 95?
The following code seems to run ok under fortran 95 (g95 compiler), but I was unsure about the exact nature of the array assignment. As you can see it is a variable sized array, without any explicit "allocate" command. The code works even when the array size could not be known at compile time...- uart
- Thread
- Array Automatic Fortran
- Replies: 2
- Forum: Programming and Computer Science
-
J
Fortran Solving FORTRAN Strange Issue with Iteration Program
I have a simple iteration program that does something I can't explain. It has to do with the use of if then statements. I can't see why this change would change the outcome. Here are the 2 examples: This works: if (guess.eq.target) then lp=3 write (*,*)...- jelanier
- Thread
- Fortran Strange
- Replies: 7
- Forum: Programming and Computer Science
-
A
Fortran Fortran: opening variable file names
I am trying to write code so a 2-d array is written to the hard drive (which is later to be read). There are several do loop iterations and I would like the file name to change with every iteration so I get as many files as there are loop iterations. I get one 1-d array that is named A, no...- autobot.d
- Thread
- File Fortran Variable
- Replies: 8
- Forum: Programming and Computer Science
-
A
Fortran What is the correct way to assign a bound of magnitude 10**270 in Fortran?
I want to find a bound for around magnitude 10**270 which is within bounds of double precision but I get DOUBLE PRECISION :: bound = 10**270 Error: Arithmetic overflow at (1) .\q2.f03:70.4: where 1 is beneath the first *. I am sure it is something simple I am overlooking...- autobot.d
- Thread
- Fortran
- Replies: 1
- Forum: Programming and Computer Science
-
Y
Fortran Storing Data in Fortran: Solving the File Replacement Problem
I was looking for a fortran code wherein the stored file in DAT file will be stored once I run the program again. My program is just replacing the saved file.- yancee
- Thread
- Data Fortran
- Replies: 10
- Forum: Programming and Computer Science
-
A
Fortran How can I fix incorrect output from my Fortran subroutine for a test matrix?
Hi all, So I have a program that calls a module that contains a subroutine so I can make a matrix. When I write the matrix in the subroutine (commented out part in module) I get the right output, but when the main program tries to output it is some insanely small or large numbers. I am new to...- autobot.d
- Thread
- Fortran Output Subroutine
- Replies: 3
- Forum: Programming and Computer Science
-
R
Fortran Fortran Help. Reading space delimited floats
Hi all, long time lurker: finally have a question I couldn't find already answered. I'm doing some work with Fortran95 for a research project, and I'm a complete noob, so pardon me. The issue is that I have some data I'd like to read from a text file in double precision that is between 7 and...- Rotarman
- Thread
- Fortran Reading Space
- Replies: 2
- Forum: Programming and Computer Science
-
Q
Fortran Fortran code for spins in heisenberg hamiltonian
hi friends. i don't know how can i write a fortran code for expressing spins in Heisenberg model which have 3 dimension spin operator, sx,sy,sz? thanks for your help- quin
- Thread
- Code Fortran Hamiltonian Heisenberg
- Replies: 1
- Forum: Programming and Computer Science
-
D
Fortran Getting Started with Fortran: Questions & Answers
I am ust beginning a fortran assignment, where I need to get a users input, to get numbers and a true/false statement. These I'm hoping will be able to translate to parameters for a bigger program. So far my code looks like: integer N,l,Tsteps logical PBC print*,"Input Number" read...- Dgrosser
- Thread
- Fortran
- Replies: 1
- Forum: Programming and Computer Science
-
T
Comp Sci How to Search and Replace Values in Fortran Arrays?
hi i have two data sets one(data1) containing 3 8 2 1 5 7 9 9 2 2 5 7 7 10 3 6 6 6 6 and other(data2) containing 5 1 10 5 20 7 30 6 40 9 50 now i want my program to search the values 1 5 7 9 from (data1) in data 2 column 1 and then take the average of the...- timewilltell
- Thread
- Array Fortran Search Value
- Replies: 11
- Forum: Engineering and Comp Sci Homework Help
-
D
Fortran Help with Fortran Programming for .txt File Reading
Hi everyone I am new to Fortran, I am trying to write a program to read a .txt file in which i have 24480 rows and ~ 6000 columns. In each row (as individuals) i have genotypes indicated as 1 and 2, which if, for example, in row one, i have had 204 genotypes, first half of this genotypes...- Davoodk
- Thread
- Fortran
- Replies: 16
- Forum: Programming and Computer Science
-
F
Fortran Problem on reading dataset with variable decimal places as it is using fortran
Hi all, I have attached my text file(tab delimited). I am planning to read those dataset into real array of (30,38). The dataset has variable decimal places like 312.66, 0, 535.696 ,456122.758. With the following codes, READ(12,*)((X(I,J),I=1,30),J=1,38)...- fortranuser
- Thread
- Fortran Reading Variable
- Replies: 4
- Forum: Programming and Computer Science
-
T
Fortran Fortran Help: Matching Data and writing values
hi i have two file with following data file-1 (named: xyxp.dat) 6 1 1 0 10 3 2 1 5 3 5 4 8 0 0 0 11 1 2 5 4 5 6 4 12 file-2 (named: xyzn.dat) 6 1 0 0 0 2 1 1 0 3 3 2 1 4 1 2 5 5 3 5 4 6 5 6 4 now i want to match each value of the first three columns of file -1 with the corresponding...- timewilltell
- Thread
- Data Fortran Writing
- Replies: 3
- Forum: Programming and Computer Science
-
S
Fortran Fortran Help - Do loops not calculating.
Hello all, I am working on a Fortran90 code that will give me an approximation of a few mathematical constants. My code will compile and run, however, my outputs are given as 0.000000 for all constants that I am calculating in the loops. Any help would be greatly appreciated. My code is as...- skockler8
- Thread
- Fortran Loops
- Replies: 4
- Forum: Programming and Computer Science
-
H
Fortran Why fortran program produces different values, when used as a subroutine ?
Hello fortran users I, have a problem regarding values that my program produces. Let me detailed it to you. See, i have createrd a separate fortran program to calculete area under a given function i.e. it perfroms integration. When this program runs independently it gives me area of the...- haroonjamia
- Thread
- Fortran Program Subroutine
- Replies: 2
- Forum: Programming and Computer Science
-
R
Fortran How to Compile and Run Fortran Programs in Eclipse?
Hi guys. I want to write fortran programs in eclipse. All I have done so far is install eclipse with Photran (which according to google should allow me to). What do I need to do now to be able to compile and run a sample code? I am trying to run this: program hello_world implicit none...- rhimmelblau
- Thread
- Fortran Writing
- Replies: 1
- Forum: Programming and Computer Science
-
R
Fortran What do I need to create FORTRAN programs?
So I am an Aerospace engineering student and we are learning FORTRAN right now (you can all thank Boeing for that). I had gotten used to writing in Visual studio with the nice visual debugger and compiler. Unfortunately I can't seem to find a student version of the FORTRAN debugger for VS, so I...- rhimmelblau
- Thread
- Fortran Programs
- Replies: 2
- Forum: Programming and Computer Science
-
F
Fortran [Fortran] problem on reading the csv file
hi. I have a csv file name Relative which has 24 different data set containing characters as well as numbers. It looks like Date,Hour,Min (RH),Max (RH),Avg (RH) 2012-08-28,0,85.190,87.200,86.325 2012-08-28,1,85.390,88.570,86.775 With reference to one of the thread reply in this forum...- fortranuser
- Thread
- Csv File Fortran Reading
- Replies: 6
- Forum: Programming and Computer Science
-
H
Fortran How to read Symbolic equations from a file in fortran ?
How to read Symbolic equations from a file in fortran ?? I am working on Linux platform. I have a very big equation about two pages. I want to put that equation in a file.txt and then i want my FORTRAN program to read the equation from file.txt instead of making any function or subroutine...- haroonjamia
- Thread
- File Fortran
- Replies: 20
- Forum: Programming and Computer Science
-
A
Fortran Top Free FORTRAN Compiler for CFD Applications
Hey PF, I'm looking for a free and reliable compiler for FORTRAN; the application will be for CFD. Unlike C++, FORTRAN compilers seem harder to find. If anyone can provide some insight besides "do a google search" that would be great, thanks.- Aero51
- Thread
- Compiler Fortran
- Replies: 10
- Forum: Programming and Computer Science
-
E
Fortran Fortran OpenMP parallelization and writing in multiple files.
Hello. I'm attempting to write some data in different files (each thread write in each file), but I'm getting an error saying: 'File already opened in another unit'. I'm using the function OMP_get_thread_num() from OpenMP library in order to open individual files in individual threads. !$OMP...- eleteroboltz
- Thread
- files Fortran Multiple Writing
- Replies: 2
- Forum: Programming and Computer Science
-
T
Fortran FORTRAN 90 Unexpected Statement Function Statement in Nested Do Loop
In the following code, highlighted in bold, I am using a nested DO loop to create a running sum of the yearly emissions ("emissions") read out of histem.txt, to create a cumulative emissions curve. The code generates an "Unexpected STATEMENT FUNCTION statement for sum in cem(i) = sum...- tch2
- Thread
- Fortran Function Loop
- Replies: 4
- Forum: Programming and Computer Science
-
M
Fortran Optimizing Steepest Descent in Fortran: How to Find the Optimal Step Size?
Hello All, I'm new to the forum and new to fortran as well. I've been trying to create a method for implementing the steepest descent method for optimization. I've been able to create the code for a fixed step size and it worked beaufitully, but I can not seem to be able to find the optimal...- massalami
- Thread
- Fortran
- Replies: 11
- Forum: Programming and Computer Science
-
T
Fortran New to FORTRAN, Error message I don't understand
Hi! I am completely new to Fortran and I'm trying to compile a source code someone else has written. I get the following error: [Error] TESTEPH.F(187); type mismatch: intg JPLEPH assigned to char*80 NAMFIL. The code around line 187: 183 C NAMFIL IS THE EXTERNAL NAME OF THE BINARY...- Trolll
- Thread
- Error Fortran
- Replies: 8
- Forum: Programming and Computer Science
-
W
Fortran Issues with porting Fortran code
I have a Fortran (F77) code which I used to use at my previous institution that I am having trouble with at my new job. I used to compile it with ifort on computers running Fedora (14 if I recall correctly). At my new job they don't have ifort so I have had to revert to the use of g77 (f77) on...- WD_star
- Thread
- Code Fortran Issues
- Replies: 6
- Forum: Programming and Computer Science
-
G
Fortran Compiling fortran on portable device
I have a fortran program I would like to run on some kind of portable device. Ideally, it would be an older and cheaper device. Does anyone have any advice? The program takes an input from the user (which is an incorrect luminance value read from a 40 year old light meter) and feeds it...- geouke
- Thread
- Device Fortran
- Replies: 7
- Forum: Programming and Computer Science
-
I
Fortran FORTRAN program for harmonic series sum
Hi Here is my code to get the sum of harmonic series. Harmonic series is \sum_{i=1}^{\infty}\; \frac{1}{i} here is the code program harmonic implicit none integer :: i,n real :: sum=0.0 write(*,*)'How many terms you want to sum ?' read(*,*) n do i= 1 ,n...- issacnewton
- Thread
- Fortran Harmonic Program Series Sum
- Replies: 7
- Forum: Programming and Computer Science
-
P
Fortran Type mismatch problem FORTRAN 77
Hi all, I am trying to run a long FORTRAN 77 code in my laptop. Document contains a makefile and it is instructed to use 'make pgi' command to compile. Beside many warnings, each time I enter that command, it returns me ' Return type mismatch of function 'cmod' at (1) (REAL(4)/REAL(8))...- Peptid
- Thread
- Fortran Type
- Replies: 4
- Forum: Programming and Computer Science
-
V
Fortran [Fortran] Passing elements of array to subroutine
I have one main program where I have calculated some array, say A(i,j) If I want ot use the values in subroutine, and calculate some more values and give back the result to main program, how my syntax should be? I tried this way. Its not working. program a...- VasanthG
- Thread
- Array Elements Fortran Subroutine
- Replies: 6
- Forum: Programming and Computer Science
-
D
Comp Sci Finding the perimeter of evolving objects in Fortran
Hello fellows, I am writing a computer program in Fortran, to find the perimeter of multiple squares. These squares move as "time" goes along, and if they come in contact with each other, they stick together, forming clusters. The reason why I'm doing this in Fortran is because the original...- Dgrosser
- Thread
- Fortran Perimeter
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
T
Fortran Fortran 90: dinamic matrix valued function as argument
hello, I'm trying to write a program with a subroutine that can handle array valued functions of different dimensions, I'm new to fortran 90 so i have some troubles. Here's what i tried: program passing use functions use sub_mod implicit none integer, dimension(2,2):: a2 integer...- Taff
- Thread
- Argument Fortran Function Matrix
- Replies: 1
- Forum: Programming and Computer Science
-
G
Fortran Programming trouble with fortran optimization code
Hi everyone, I have some trouble adapting an existing fortran code for my application. In the following Module I am optimizing a value for two planes ( i = iplan one&two). In order to do that, I need to assign ten certain values from an external inp. file for each plane. I have two loops...- granbycools
- Thread
- Code Fortran Optimization Programming
- Replies: 1
- Forum: Programming and Computer Science
-
K
Fortran Fortran code conversion into Excel VBA
Hi, I'm currently working on a project that requires me to convert a Fortran code into excel vba. There are some problems that I've stumbled into, so itll be great if someone could help out. one of it would be on how to convert a COMMON statement in Fortran to Excel VBA ( as in how would...- kay90
- Thread
- Code Excel Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
S
Fortran Need some help with dynamic memory allocation in Fortran
Hi, I need some help with allocating arrays dynamically. I have an array whose size keeps changing at each step - I start with a row vector and add another row vector at each step of a cycle. I need to use this new array for further calculations. I've been trying to declare the arrays...- sue132
- Thread
- Dynamic Fortran Memory
- Replies: 5
- Forum: Programming and Computer Science
-
E
Fortran Use C functions with Watcom Fortran
Is there a way to use C functions from Watcom Fortran?- eddyq
- Thread
- Fortran Functions
- Replies: 1
- Forum: Programming and Computer Science
-
I
Fortran Fortran intrinsic functions source code
Hi How can I see the source codes used for defining intrinsic functions in Fortran 90/95 ? e.g. what is the actual program for sqrt ? thanks- issacnewton
- Thread
- Code Fortran Functions Source
- Replies: 6
- Forum: Programming and Computer Science
-
A
Fortran MPI using Intel Fortran compiler
Hi everyone, I have a question about how MPI works. Currently I have a job running on MPI on the mode master_slave, I mean that every slave executes a separate task without communicate with the others slaves, once a slave-node finishes, it sends a warning to the master and then the master...- adrian_ortega
- Thread
- Compiler Fortran
- Replies: 3
- Forum: Programming and Computer Science
-
I
Fortran How to deal with small numbers in Fortran 95?
Hi I am doing a program using gfortran compiler. I feed angle theta in degrees to the program. Program is supposed to calculate the value of tan(theta) using values of sine and cosine of theta. the program should give warning of division-by-zero if magnitude of cosine theta is less than...- issacnewton
- Thread
- Fortran Numbers
- Replies: 7
- Forum: Programming and Computer Science
-
G
Fortran Why is C Preferred for Numerical Analysis over Fortran?
I am a graduate geology student and have been using MATLAB for about a year now. I began learning C a while back to have a broader tool-set to work with but found that it just got in the way of learning material more specific to my major. Besides, MATLAB does everything I need anyway. That...- geouke
- Thread
- Fortran
- Replies: 4
- Forum: Programming and Computer Science
-
F
Fortran Fortran Troubleshooting - Get Help with Codeblocks Issues
Hello everyone, I'm new here and i have a question: I did this fortran code and isn't work, but i think the problem is my codeblocks Someone can execute the code and if they presents some errors help me also?- felipearcaro
- Thread
- Fortran
- Replies: 32
- Forum: Programming and Computer Science
-
T
Fortran Creating 2-d array from a text file in fortran
I have a text file of the format x1 y1 x2 y2 . . . . . . I need to read this into an array. How is this done in Fortran?- tcmoore3
- Thread
- Array File Fortran Text
- Replies: 1
- Forum: Programming and Computer Science