fortran

F77: problem to compile with g77 a program which was normally compiled with Absoft compiler

I am not a Fortran programmer (just a short experience), but I need to compile a program partly written in F77. Someone has compiled it with Absoft compiler before me, but now I need to repeat the procedure on another machine with g77. For Absoft, the makefile has f77 -f -w -O -B100 -B108 -c *.f mv *.f flib && mv *.o olib f77 -B100 -o...

Code polisher / reformater for C, C++ or Fortran

Hello, suppose you have got a bunch of files written in C, C++ or Fortran, by different authors with different opinions on formating, how to comment (...) and so on. I think many people know situations like these. Are there any free tools for ends like: uniform format of code (indent etc.) create standard comment bodies rename variab...

How to read data from specific line in a file‎ ?

I have a problem how to read the number in this line n and m that column. below is a file where I want to read and save the number as a variable, what is the shaded Thank in advance G07 1437 1437 1437 1437 PRN / # OF OBS G08 1437 1437 1437 1437 PRN / # OF OBS G10 ...

How does one create a custom event in windows?

This is something I'd expect to be quite straightforward, but after a couple of hours browsing Visual Explorer online help and ploughing through various forums, I'm still at a loss... Basically, I'd like to be able to create a custom Windows event which sends a vector of short integers to its recipient. I'd actually like to create the e...

Fortran debugging print statement affects program flow

I have a program which iterates over an array, deterministically making new row-vectors which it then appends to the array. At each iteration the norm of the vector is taken, to ensure it's not a zero vector. If it is zero, the program stops. There was a bug whereby the third iteration would cause the vector to go to zero. In looking ...

Best Fortran IDE

Hi all, Is there anybody use Fortran on stackoverflow? What IDE do you use and which one do you think to be the best. Seems lots of people surround me are quite inconvenient with Intel Visual Fortran. Because there is no support for intellisense, refactoring, etc. Thanks a lot in advance! ...

.NET format specifier for scientific notation with mantissa between 0 and 1

I am working with a Fortran program that expects floating point numbers to be input using Fortran's E format specifier, which is scientific notation, except the mantissa must be between 0 and 1. So instead of: "3147.3" --> "3.1473E3", it needs "3147.3" --> "0.31473E4". I am unable to modify the Fortran program, as it works with a ...

ctags and Fortran's interfaces

I'm wondering how to get ctags working with interfaces in Fortran, eg: INTERFACE SOME_ROUTINE MODULE SOME_ROUTINE_A MODULE SOME_ROUTINE_B END SOME_ROUTINE So that either SOME_ROUTINE_A or SOME_ROUTINE_B is called depending on the parameters passed to the subroutine. If I've got my cursor over a call to SOME_ROUTINE in Vim, and hi...

common blocks, FORTRAN,and DLLs

Hi; I am a modeler who programs...I would never call myself a programmer, yet I program in C# and in FORTRAN. I have a FORTRAN model that I have connected to some C# code through a dll. I have found that I must have a common block in order to keep the variables in memory in the dll. I have also found that I cannot use more than one in...

jna multiprocess

i'm using jna to glue fortran and java together, and it works great. except for one thing. i have two jvm processes, each of which uses the same shared library. individually, they work fine. calling one, and then the other, also works. but then calling the first one again, segv's. the code doesn't do anything interesting; it copies...

Does Fortran preserve the value of internal variables through function and subroutine calls?

After much painful debugging, I believe I've found a unique property of Fortran that I'd like to verify here at stackoverflow. What I've been noticing is that, at the very least, the value of internal logical variables are preserved across function or subroutine calls. Here is some example code to illustrate my point: PROGRAM function...

How does Fortran return arrays?

The subroutine Rule_Tn in the Fortran library CUBPACK needs a parameter Integrand describing the integrated vector function. It's a INTERFACE FUNCTION Integrand(NF,X) RESULT(Value) USE Precision_Model INTEGER, INTENT(IN) :: NF REAL(KIND=STND), DIMENSION(:), INTENT(IN) :: X REAL(KIND=ST...

Odd value returned by simple Fortran function

Just as a forward, I am a complete beginner when it comes to Fortran. I've spent quite awhile looking at the other questions on SO, but I couldn't identify a similar question to this, so please forgive me if my solution is either obvious, or already been answered :) I'm attempting to learn how to correctly implement a self-written Fortr...

Modern language with the advantages of FORTRAN?

I've been working with a lot of FORTRAN 77 lately, and though I had reservations at first, I now see some great qualities of the language. It is: Simple to learn (no object-oriented or functional-programming complications) Easy to read Blazing fast at number-crunching Those qualities are naturally attractive to non-programmer engine...

Fortran string comparison with .LT.

Hello Group, I have to fix a bug in a very old and large financial system that uses Fortran, C and C++. I am primarily a C++ guy, have no idea abt Fortran! I have a problem understanding a Fortran statement which i think has caused a nasty bug in our systems.... if (instructions .lt. ' ') then instructions = ' ' endif instructio...

block or variable definition of integer and memory capacity

hi all does anyone have idea about this problem , i have a code that runs nicely for 3000 element mesh but when i want to run it for 17000 element mesh it shows me this error: a common block or variable may not exceed 2147483647 bytes this is some parts of code: PARAMETER(NDIM=398316702) integer IA(NDF+1),LPIVTC(NDF),JA(NDIM) DI...

is there something like sonar for fortran?

Are there any quality control systems for fortran as there are with java? i used valgrind intensively to ensure i have no memory errors, is there more out there, preferably as freeware? what are your experiences? ...

Force explicit variable declaration with gfortran

I am linking some fortran code (f90) from matlab using mex and I am having matlab freeze occasionally. In the past, I had freezing happening due to mismatch between data types (say integer*4 vs integer*8). The code I am linking has many implicitly defined variables, so I am wondering if there is a hidden data type conflict that only o...

the output of my fortran code is killed , any suggestion?

I'm trying to run a code on ssh that works perfect for a smaller mesh , but since the new mesh is much bigger i used ifort command to compile it, ifort -mcmodel=medium -i-dynamic -otest.out*.f and it complies but when i run it , the output is: killed i know that problem is from memory, does anyone know if there's any way to run it? how...

Possible to Pass an Object as a Parameter to a Fortran Method?

I'm currently working on being able to import a DLL written in Fortran into Visual Basic. I've got all the basics down, so now I'm trying to take it a step further. The title basically says it all, but I'll explain what it is I'm trying to do anyways. For kicks and giggles, let's just assume I want to pass an object that has three doubl...