Dear Collegues;
I have a serial Fortran code that works fine. Once I compile the same code using ifort -parallel and run it, it gives wrong results and overflow. I would expect that with "-parallel" flag, the Intel compiler is capable of selecting the loops that are safe to parallelize and I should get the exact same results as for the ...
I am running a loop in a Fortran 90 program that outputs numerical values to an output file for each iteration of the loop. The problem is that the output is not saved to the file but every so many steps. How do I get it to flush each step?
Example code:
open(unit=1,file='output')
do i = 1, 1000
write(1,*) i
end do
close(unit=1)
...
Hi,
I would like to compile fortran code on mac such that it does not depend on any shared library. Ultimately, I want to be able to send the binary to other people and for it to just work (provided the processor has the right architecture). I noticed that g95 and ifort have a -static flag, which does not work on mac.
If I consider the...
I am new to C#; I need to get my fortran dll to communicate with my C# program. I am able to pass variables from my program into C# using set (subroutines) and get (functions) (i.e.,
! fortran
function getSwitch() result(value)
use module
implicit none
dll_export :: getSwitch
logical :: value
value = getkSwitch()
end fun...
Hi,
I am porting Fortran code from Fortran PowerStation(version 4.0) to the Fortran 11(2003) compiler. The old compiler (PowerStation) has 53-bit precision. When porting to the new compiler, I am not achieving proper or exact values for my real/float variables. I hope the new compiler is 64-bit precision. So I think I need to change the...
Hi,
I've ported some Fortran code from Fortran PowerStation(4.0) to the Fortran 11(2003) compiler. In order to maintain double and real values between the old and new compiler, I changed properties>fortran>data>"Default Read Kind" from 4 to 8. Now the problem is that the global variables are not maintaining data from one file to other.
...
I am using PGI Visual Fortran in (Windows OS) to build a project/solution consisting of a fortran (f90) library and an executable. The f90 library links to the netcdf.lib. The f90 compiles and builds OK, but when I try to link it to the executable I get the following errors:
Compiling Project ...
Linking...
error LNK2019: unresolve...
how do I read from an array into a user defined variable... in Fortran?
...
I'm a newbie in the Unix world so all this is a little confusing to me. I'm having trouble compiling some Fortran files under Cygwin on Windows XP.
Here's what I've done so far:
Installed the e text editor.
Installed Cygwin via the "automatic" option inside e text editor.
I need to compile some Fortran files so via the "manage bundles...
Context
The toy Fortran code posted below calls two pointer functions. That is, both functions return a pointer. In fact, they're both array pointers. They both attempt to do the same thing, which is to return an integer array pointer referencing an integer array having three elements, 1, 2, and 3. The first function uses the pointe...
Working with Visual Studio 2008 Pro, with Intel Fortran compiler v11, on Windows 7 x64.
I have an Intel Visual Fortran project set up with all the fortran source files. I wish to gradually replace all these subroutines with C/C++ (actually cuda -- bonus points). Simply right clicking on source files in the solution explorer and "add exi...
We are planning to develop a datamining package for windows. The program core / calculation engine will be developed in F# with GUI stuff / DB bindings etc done in C# and F#.
However, we have not yet decided on the model implementations. Since we need high performance, we probably can't use managed code here (any objections here?). The ...
Hi,
What are the necessary conditions i need to takecare while porting the fortran code from power station to fortran compiler(2003)?
What I observed is, In power station all the variables treat as global variables(even local variables also). where as in intel fortran(2003) they have separate scope for local and global. So I need to m...
Hi.
What is meant by . (dot) usage after a number in Fortran code?
For example:
x=a+b+45.-c-d
thanks in advance
...
After running a model in fortran (95) I end up with some result arrays (and one result matrix). I'd like to move these into excel for reporting purposes. What's the easiest way to do this?
...
I have a problem with my simple Fortran program. I am working in Fortran 77, using Compaq Visual Fortran. The program structure must be in the form of a main and a subroutine, because it is part of a big program related to the finite element method.
My issue is that I would like to set the values 10000 & 10000 for NHELE and NVELE respec...
Hi, this is my first time trying to program in Fortran. I'm trying to write a program that prints the first 1476 terms of the Fibonacci sequence, then examines the first digit of each term and stores the number of 1s, 2s, 3s, ..., 9s that occur in an array.
The problem that I can't seem to figure out is how to read the first digit of ea...
I've been starting to use Fortran (95) for some numerical code (generating python modules). Here is a simple example:
subroutine bincount (x,c,n,m)
implicit none
integer, intent(in) :: n,m
integer, dimension(0:n-1), intent(in) :: x
integer, dimension(0:m-1), intent(out) :: c
integer :: i
c = 0
do i = 0, n-1
c(x(i)) = ...
Hi all,
I am working to become a scientific programmer. I have enough background in Math and Stat but rather lacking on programming background. I found it very hard to learn how to use a language for scientific programming because most of the reference for SP are close to trivial.
My work involves statistical/financial modelling and ...
Does anyone know of a Fortran compiler that can be used inside a Windows Azure project? I am ultimately looking to take a fortran code I have upgraded with MPI and get it to run inside Azure.
I can run the code already on EC2 but integrating a web ui has been klunky as there are a lot of moving parts - IIS, mpi nodes and the like that ...