Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. GerritGroot

    Passing a variable amount of functions as an argument

    Hi, In this forum I once saw a way to pass a function as an argument to another function or subroutine: http://www.tek-tips.com/viewthread.cfm?qid=1572869 Would it be possible to pass a function as an argument wherein the amount of functions that you pass as an argument is variable? Thanks...
  2. GerritGroot

    Max file size of 2Gb for gfortran under win XP

    Hi, Under Windows XP I made a little program to change words in huge text files (in fact three files of 1Gb, 1.8Gb and 7Gb) as normal text editors refuse to open these huge text files. To do so, without an editor, I - 1 - Open the input textfile - 2 - Read one line only (so the program uses...
  3. GerritGroot

    Latest gfortran installer for windows doesn't work

    Hi, I installed: http://users.humboldt.edu/finneyb/gfortran-windows-20121210.exe Link (gcc-4.8.0) Thinking that I was updating my compiler, however compiling I get the error: Warning: Nonexistent include directory Uninstalling it and reinstalling my old "gfortran-windows.exe" Version 3, 29...
  4. GerritGroot

    gfortran didn't create a stand-alone exe

    Hi, I took an executable, generated by gfortran to another computer (both are windows XP) and got the following error: libgcc-s-dw2-1.dll missing The computer where the exe came from had gfortran version 4.7.0: Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=c:/archivos de...
  5. GerritGroot

    How to prevent overflow (and precision loss) in big factorials

    Hi, I need to compute a series of factorials for high numbers, however, for very high numbers, normal factorials easily break down. Let me firts post my code PROGRAM FactorialTest IMPLICIT NONE REAL :: Func1,Func2 WRITE(*,*)Func1(10,5),Func2(10,5) WRITE(*,*)Func1(20,10),Func2(20,10) END...
  6. GerritGroot

    Calling functions

    Hi, Using gfortran, if I have a code like PROGRAM Test IMPLICIT NONE REAL :: y,MyFunc y=MyFunc(2.) WRITE(*,*)y END PROGRAM Test REAL FUNCTION MyFunc(x) REAL, INTENT(IN) :: x MyFunc=x**2 END FUNCTION MyFun that works and another one like PROGRAM Test IMPLICIT NONE REAL :: MyFunc...
  7. GerritGroot

    No strip.exe needed in gfortran4.7?

    Hi, I changed from gfortran 4.6 to gfortran 4.7 and the size of my executable reduced to one third when compiling with 4.7 with respect to 4.6 I suppose this may be because the default debug settings changed. Before I used strip.exe to reduce the size of my .exe file (see...
  8. GerritGroot

    gfortran bug for ADVANCE='NO'?

    Hi, I used the following procedure to get some screen feedback. SUBROUTINE StartEndInfo(Line,Sort) IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: Line CHARACTER(LEN=*), INTENT(IN) :: Sort CHARACTER(LEN=60) :: StartLine CHARACTER(LEN=20) :: EndLine IF(TRIM(Sort)=='Start')THEN...
  9. GerritGroot

    Check for duplicated variables in local subroutines

    Hi, Imagine that I've got a SUBROUTINE with some local subroutines under a CONTAINS statement, like: SUBROUTINE GlobalSub IMPLICIT NONE INTEGER :: i i=1 CONTAINS SUBROUTINE LocalSub IMPLICIT NONE INTEGER :: i DO i=1,10,1 WRITE(*,*)'the global variable i shouldn't change...
  10. GerritGroot

    write(*,*) changes exe behaviour

    Hi, I got an error that ehm... ...changes its location in the code. The behaviour is different EITHER The program brakes down and windows says "yourexe.exe did something that's not allowed, send a report?" OR The program just stops, as if it ended somewhere in the middle and it returns...
  11. GerritGroot

    Deallocation of derived types with local allocatables

    Hi, Imagine that I've got a derived type as follows: TYPE MY_Type INTEGER :: intone,inttwo INTEGER, DIMENSION(:), ALLOCATABLE :: myintarr CHARACTER(LEN=80) :: myname REAL, DIMENSION(:), ALLOCATABLE :: reallistone,reallisttwo REAL, DIMENSION(:,:), ALLOCATABLE :: matone,mattwo...
  12. GerritGroot

    Modules that USE eachother and thus don't compile ever

    Imagine that I have got two modules Module 1 in which I use a part of Module 2 and Module 2 in which I use a part of Module 1. I can't compile, neither module1 nor module2, because the compiler will tell me that it misses the compiled version of the other module that it needs. What is the...
  13. GerritGroot

    Programming hardware with Fortran

    Ok, another million dollar question, I don't remember whether I asked this already once, maybe I did, if so I'm sorry, but I couldn't find the thread back. Is there hardware that can be programmed in fortran. I sometimes look at websites with robotics etc. and all this stuff is programmed...
  14. GerritGroot

    Coffee question: Who uses fortran?

    Hi, During the coffee, someone asked me why I program in fortran, as I'm the only one in the whole company who's using fortran. I answered that in my discipline (aerodynamics) fortran is the most used language and that, as far as I know, people in physics also still use it. Later on, I...
  15. GerritGroot

    Non intuitive MATMUL behaviour

    Hi, I'v got some strange unexpected behaviour of MATMUL in F90, which seems to be compiler independent, so I think I didn't get the point of how MATMUL works I got: PROGRAM TestMatMul IMPLICIT NONE REAL, DIMENSION(4,4) :: A REAL, DIMENSION(4) :: x,y...
  16. GerritGroot

    -ffpe-trap=precision,denormal in gfortran

    Hi, Does anyone know what the option -ffpe-trap=precision does in gfortran If I read 4 real values given in a text file like "1. 2. 3. 4." and compile with the option -ffpe-trap=precision, the program breaks down, supposedly because it's losing precision, but ehhh..., losing precision when...
  17. GerritGroot

    Code info within the executable with gfortran

    Hi, Building (and compiling) an executable in gfortran using the options: -Wall -O3 -fbounds-check It happened to me that the executable seemed to have fortran code information included, which is not always desired. Once running the executable, the program broke down on some insignificant...
  18. GerritGroot

    Byte amount in the array index

    Hi, I've got a question about the byte amount of the array indices themselves. Imagine that I define: INTEGER, PARAMETER :: I8B=SELECTED_INT_KIND(18) ! And INTEGER(KIND=I8B), PARAMETER :: mx4b=2**32 INTEGER(KIND=I8B), DIMENSION(mx4b) :: MyArray Now, MyArray is an array of integers, each of...
  19. GerritGroot

    Unit 6 in gfortran for (*,*)?

    Does anyone know whether unit 6 for writing files is reserved in gfortran for writing to the screen? I am writing to file unit 6 and get stuff from write(*,*) in my text file :-( After not having found anything in the code, I changed the unit to UNIT=7 and the problem was gone.
  20. GerritGroot

    gfortran's speed and exe size

    Hi, I got a simple half a page code, just to convert some file formats. If I compile this with microsoft developer's studio I get around 122kB, while if I compile the same code with gfortran I get an executable of 651kB, more than 5 times as big! Furthermore, the executable of gfortran is...

Part and Inventory Search

Back
Top