我在用Fortran语言写程序,但是遇到一个问题,大家瞧一瞧,看知不知道原因。
问题如下:
我用Fortran写了一个计算程序,但是在不用的Linux计算机上得到结果不同。我用了相同的Fortran编译器,其中一台机器是
pgf90 10.0-0 64-bit target on x86-64 Linux -tp nehalem-64
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2009, STMicroelectronics, Inc. All Rights Reserved.
和
Intel(R) Fortran Intel(R) 64 Compiler Professional for applications running on Intel(R) 64, Version 11.1 Build 20100414 Package ID: l_cprof_p_11.1.072
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
这两个编译器得到的结果一样。
而另一台机器是
pgf90 10.0-0 64-bit target on x86-64 Linux -tp core2-64
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2009, STMicroelectronics, Inc. All Rights Reserved.
和
Intel(R) Fortran Intel(R) 64 Compiler Professional for applications running on Intel(R) 64, Version 11.1 Build 20100414 Package ID: l_cprof_p_11.1.072
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
这两个结果整体趋势一样,有些细微的区别。
但是在两台机器上的结果不一样,有没有人详解一下原因。 |