Results 1 to 10 of 10

Thread: gfortran gives different output after installation openSUSE 11.3

  1. #1

    Default gfortran gives different output after installation openSUSE 11.3

    The problem is strange for me, I have fresh installed openSUSE 11.3 after that my fortran codes using gfortran compiler gives different output. The same codes gives correct values in windows but I use linux for programming.

    Please help me to solve the problem.

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,760

    Default Re: gfortran gives different output after installation openSUSE 11.3

    Versions????? Maybe you need a parameter to generate older code patterns...

  3. #3

    Default Re: gfortran gives different output after installation openSUSE 11.3

    Quote Originally Posted by gogalthorp View Post
    Versions????? Maybe you need a parameter to generate older code patterns...
    The version is
    GCC-fortran 4.5-4.2
    GCC45-fortran 4.5.0_20100604-1.12

    library installed is
    libgfortran45 4.5.0_20100604-1.12

    It is too strange for me, checked many times. Codes complied normally, but the output is not correct, these are different in openSUSE and Windows.

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,760

    Default Re: gfortran gives different output after installation openSUSE 11.3

    When you say different, what do you mean. Binary different or functionally different? A Windows binary would be different then a Linux binary even if the code is the same.

  5. #5

    Default Re: gfortran gives different output after installation openSUSE 11.3

    Quote Originally Posted by gogalthorp View Post
    When you say different, what do you mean. Binary different or functionally different? A Windows binary would be different then a Linux binary even if the code is the same.
    The output from same code is given below:
    Linux Windows

    3.5089999999999999 -1.25982602363416422E-309 3.5089999999999999 -108070.92167079351
    3.5190000000000001 -1.24257611352839618E-309 3.5190000000000001 -106591.18268324799
    3.5289999999999999 -1.22465577795257682E-309 3.5289999999999999 -105053.93297895517
    3.5390000000000001 -1.20618548460569455E-309 3.5390000000000001 -103469.50656783844
    3.5489999999999999 -1.18727252757412510E-309 3.5489999999999999 -101847.10739613992
    3.5590000000000002 -1.16801238080656836E-309 3.5590000000000002 -100194.92544843904
    3.5690000000000000 -1.14848991119454019E-309 3.5690000000000000 -98520.240814039367
    3.5790000000000002 -1.12878046644262293E-309 3.5790000000000002 -96829.516999239175
    3.5890000000000000 -1.10895085068764837E-309 3.5890000000000000 -95128.484626300065
    3.5990000000000002 -1.08906020006982944E-309 3.5990000000000002 -93422.216535153013
    3.6090000000000000 -1.06916076851196189E-309 3.6090000000000000 -91715.195193177220
    3.6190000000000002 -1.04929863327328371E-309 3.6190000000000002 -90011.373220110196
    3.6290000000000000 -1.02951432868758291E-309 3.6290000000000000 -88314.227747883502
    3.6389999999999998 -1.00984341541625229E-309 3.6389999999999998 -86626.809257627072
    3.6490000000000000 -9.90316992135295415E-310 3.6490000000000000 -84951.785467165464
    3.6589999999999998 -9.70962155340568366E-310 3.6589999999999998 -83291.480781021935
    3.6690000000000000 -9.51802412911110293E-310 3.6690000000000000 -81647.911760404939
    3.6789999999999998 -9.32858055902346176E-310 3.6789999999999998 -80022.819022105439
    3.6890000000000001 -9.14146493074249900E-310 3.6890000000000001 -78417.695931986105
    3.6989999999999998 -8.95682551836649966E-310 3.6989999999999998 -76833.814420229144
    3.7090000000000001 -8.77478749026466929E-310 3.7090000000000001 -75272.248211161495
    3.7189999999999999 -8.59545534620667144E-310 3.7189999999999999 -73733.893729859323
    3.7290000000000001 -8.41891511143513798E-310 3.7290000000000001 -72219.488920406075
    3.7389999999999999 -8.24523631093044864E-310 3.7389999999999999 -70729.630186297974
    3.7490000000000001 -8.07447374778421305E-310 3.7490000000000001 -69264.787641707779
    3.7589999999999999 -7.90666910381326945E-310 3.7589999999999999 -67825.318842868786

  6. #6

    Default Re: gfortran gives different output after installation openSUSE 11.3

    Quote Originally Posted by victorray View Post
    The output from same code is given below:
    Linux Windows

    3.5089999999999999 -1.25982602363416422E-309 3.5089999999999999 -108070.92167079351
    3.5190000000000001 -1.24257611352839618E-309 3.5190000000000001 -106591.18268324799
    3.5289999999999999 -1.22465577795257682E-309 3.5289999999999999 -105053.93297895517
    3.5390000000000001 -1.20618548460569455E-309 3.5390000000000001 -103469.50656783844
    3.5489999999999999 -1.18727252757412510E-309 3.5489999999999999 -101847.10739613992
    3.5590000000000002 -1.16801238080656836E-309 3.5590000000000002 -100194.92544843904
    3.5690000000000000 -1.14848991119454019E-309 3.5690000000000000 -98520.240814039367
    3.5790000000000002 -1.12878046644262293E-309 3.5790000000000002 -96829.516999239175
    3.5890000000000000 -1.10895085068764837E-309 3.5890000000000000 -95128.484626300065
    3.5990000000000002 -1.08906020006982944E-309 3.5990000000000002 -93422.216535153013
    3.6090000000000000 -1.06916076851196189E-309 3.6090000000000000 -91715.195193177220
    3.6190000000000002 -1.04929863327328371E-309 3.6190000000000002 -90011.373220110196
    3.6290000000000000 -1.02951432868758291E-309 3.6290000000000000 -88314.227747883502
    3.6389999999999998 -1.00984341541625229E-309 3.6389999999999998 -86626.809257627072
    3.6490000000000000 -9.90316992135295415E-310 3.6490000000000000 -84951.785467165464
    3.6589999999999998 -9.70962155340568366E-310 3.6589999999999998 -83291.480781021935
    3.6690000000000000 -9.51802412911110293E-310 3.6690000000000000 -81647.911760404939
    3.6789999999999998 -9.32858055902346176E-310 3.6789999999999998 -80022.819022105439
    3.6890000000000001 -9.14146493074249900E-310 3.6890000000000001 -78417.695931986105
    3.6989999999999998 -8.95682551836649966E-310 3.6989999999999998 -76833.814420229144
    3.7090000000000001 -8.77478749026466929E-310 3.7090000000000001 -75272.248211161495
    3.7189999999999999 -8.59545534620667144E-310 3.7189999999999999 -73733.893729859323
    3.7290000000000001 -8.41891511143513798E-310 3.7290000000000001 -72219.488920406075
    3.7389999999999999 -8.24523631093044864E-310 3.7389999999999999 -70729.630186297974
    3.7490000000000001 -8.07447374778421305E-310 3.7490000000000001 -69264.787641707779
    3.7589999999999999 -7.90666910381326945E-310 3.7589999999999999 -67825.318842868786
    Here first two column for Linux and last two for Windows. In openSUSE 11.2(I do not remember the gfortran version), the out put was same as in Wndows. Actually I get to know about that when I find that my results are too strange. When I did not find any reason, I checked it on windows.

    But I can not use Windows, I use openSUSE. So it is really serious for me.

  7. #7

    Default Re: gfortran gives different output after installation openSUSE 11.3

    Please help me to solve the problem, it is indeed important for me.

  8. #8
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: gfortran gives different output after installation openSUSE 11.3

    victorray wrote:

    >
    > Please help me to solve the problem, it is indeed important for me.
    >
    >

    From looking at the output produced by some code which nobody knows compiled
    with compiler switches you do not tell us, without telling us the
    architecture of the gfortran (32 or 64 bit) and which target architecture
    was choosen when compiling (and yes - this has an influence because it
    affects the default precission in some cases in fortran) this is just wild
    guessing.
    If you use an unstable algorithm that can lead to some kind of random number
    generator.

    Do you link against a third party library?
    Is the code itself bugfree?
    Did you compile with debugging symbols and did you debug it?

    You tell us about a black box without details and let us speculate about its
    outcome.


  9. #9

    Default Re: gfortran gives different output after installation openSUSE 11.3

    Quote Originally Posted by martin_helm View Post
    victorray wrote:

    >
    > Please help me to solve the problem, it is indeed important for me.
    >
    >

    From looking at the output produced by some code which nobody knows compiled
    with compiler switches you do not tell us, without telling us the
    architecture of the gfortran (32 or 64 bit) and which target architecture
    was choosen when compiling (and yes - this has an influence because it
    affects the default precission in some cases in fortran) this is just wild
    guessing.
    If you use an unstable algorithm that can lead to some kind of random number
    generator.

    Do you link against a third party library?
    Is the code itself bugfree?
    Did you compile with debugging symbols and did you debug it?

    You tell us about a black box without details and let us speculate about its
    outcome.
    without telling us the architecture of the gfortran (32 or 64 bit) and which target architecture was choosen when compiling (and yes - this has an influence because it affects the default precission in some cases in fortran) this is just wild
    guessing.


    The compiler installed is 64 bit and I used only 64 bit in openSUSE

    If you use an unstable algorithm that can lead to some kind of random number
    generator.


    The code is not related to the random number generator, it is a application of simple physical formula.

    Do you link against a third party library?
    Is the code itself bugfree?
    Did you compile with debugging symbols and did you debug it?


    Not using any library, it is itself bugfree, I did not bug it.

    It is a simple code working fine before in openSUSE 11.2.

    How it is possible that the same code gives different results in different OS rather it is not related to random number generator.

    Thank you in advanced.

  10. #10
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: gfortran gives different output after installation openSUSE 11.3

    Until now you refuse to answer the details asked for (only one detail at a
    time but not the complete details which are needed).
    Every programmer running into that kind of trouble (and yes things like that
    can easily happen) would first compile his code with debug symbols and run a
    debbuger of his/her choice on it to see what happens.

    You do not even tell us anything what YOU did to check this, to do a root
    cause analysis, before posting here in all kind of subforums with the same
    missing information.

    I am out here.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •