* Fwd: This OpenMP code doesn't seem to compile correctly (5.4, 6.1). [not found] <ac471fb9-a142-2104-39b9-8a41dbd0bc5b@moene.org> @ 2016-06-28 19:16 ` Toon Moene 2016-06-28 19:59 ` Anton Shterenlikht 0 siblings, 1 reply; 4+ messages in thread From: Toon Moene @ 2016-06-28 19:16 UTC (permalink / raw) To: fortran [-- Attachment #1: Type: text/plain, Size: 776 bytes --] -------- Forwarded Message -------- Subject: This OpenMP code doesn't seem to compile correctly (5.4, 6.1). Date: Tue, 28 Jun 2016 21:13:43 +0200 From: Toon Moene <toon@moene.org> Organization: Moene Computational Physics, Maartensdijk, The Netherlands To: fortran@gcc.gn.org See the attached. I can't find fault with the code, yet it produces: 99999.0000 99999.0000 99999.0000 99999.0000 instead of zeros. Is this indeed an error (in that case I will open a BugZilla report). Kind regards, -- Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news [-- Attachment #2: elkhatib.f90 --] [-- Type: text/x-fortran, Size: 1179 bytes --] MODULE MYFIELDS_MOD ! The definition of a derived type containing an allocatable array IMPLICIT NONE SAVE TYPE :: MYFIELDS REAL, ALLOCATABLE :: GMVT1S(:) END TYPE MYFIELDS END MODULE MYFIELDS_MOD PROGRAM GP_MODEL ! A program to allocate then use a structure containing a allocatable array USE MYFIELDS_MOD , ONLY : MYFIELDS IMPLICIT NONE TYPE(MYFIELDS) :: YRFIELDS ALLOCATE(YRFIELDS%GMVT1S(4)) YRFIELDS%GMVT1S=99999. CALL GP_TEST(YRFIELDS) END PROGRAM GP_MODEL SUBROUTINE GP_TEST(YDFIELDS) ! A subroutine to initialize the component of a structure, which is an ! allocatable array, via an association ! DOES NOT WORK SINCE GFORTRAN 4.9.2 (4.9.1 ?), UNLESS ONE OF THE FOLLOWING CONDITIONS IS RESPECTED : ! - Open-mp is disabled ! - the attribute is POINTER instead of ALLOCATABLE ! - the association is not used ! COULD BE AN ISSUE WITH Version 4.0 of the OpenMP specification USE MYFIELDS_MOD , ONLY : MYFIELDS IMPLICIT NONE TYPE(MYFIELDS), INTENT(INOUT) :: YDFIELDS INTEGER :: J ASSOCIATE(YDGMV=>YDFIELDS) !$OMP PARALLEL DO DO J=1,4 YDGMV%GMVT1S(J)=0. ENDDO !$OMP END PARALLEL DO print*,YDFIELDS%GMVT1S(:) END ASSOCIATE END SUBROUTINE GP_TEST ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: This OpenMP code doesn't seem to compile correctly (5.4, 6.1). 2016-06-28 19:16 ` Fwd: This OpenMP code doesn't seem to compile correctly (5.4, 6.1) Toon Moene @ 2016-06-28 19:59 ` Anton Shterenlikht 2016-06-28 21:40 ` Toon Moene 0 siblings, 1 reply; 4+ messages in thread From: Anton Shterenlikht @ 2016-06-28 19:59 UTC (permalink / raw) To: Toon Moene; +Cc: fortran mech-as222> uname -a FreeBSD mech-as222.men.bris.ac.uk 10.3-RELEASE-p4 FreeBSD 10.3-RELEASE-p4 #0: Sat May 28 12:23:44 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 mech-as222> gfortran6 -Wl,-rpath="/usr/local/lib/gcc6" z.f90 mech-as222> ./a.out 0.00000000 0.00000000 0.00000000 0.00000000 mech-as222> gfortran6 --version GNU Fortran (FreeBSD Ports Collection) 6.0.0 20150927 (experimental) mech-as222> gfortran5 -Wl,-rpath="/usr/local/lib/gcc5" z.f90 mech-as222> ./a.out 0.00000000 0.00000000 0.00000000 0.00000000 mech-as222> gfortran5 --version GNU Fortran (FreeBSD Ports Collection) 5.3.0 Anton On 28/06/2016, Toon Moene <toon@moene.org> wrote: > > > > -------- Forwarded Message -------- > Subject: This OpenMP code doesn't seem to compile correctly (5.4, 6.1). > Date: Tue, 28 Jun 2016 21:13:43 +0200 > From: Toon Moene <toon@moene.org> > Organization: Moene Computational Physics, Maartensdijk, The Netherlands > To: fortran@gcc.gn.org > > See the attached. > > I can't find fault with the code, yet it produces: > > 99999.0000 99999.0000 99999.0000 99999.0000 > > instead of zeros. > > Is this indeed an error (in that case I will open a BugZilla report). > > Kind regards, > > -- > Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290 > Saturnushof 14, 3738 XG Maartensdijk, The Netherlands > At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ > Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: This OpenMP code doesn't seem to compile correctly (5.4, 6.1). 2016-06-28 19:59 ` Anton Shterenlikht @ 2016-06-28 21:40 ` Toon Moene 2016-06-28 22:15 ` Anton Shterenlikht 0 siblings, 1 reply; 4+ messages in thread From: Toon Moene @ 2016-06-28 21:40 UTC (permalink / raw) To: fortran On 06/28/2016 09:59 PM, Anton Shterenlikht wrote: > mech-as222> uname -a > FreeBSD mech-as222.men.bris.ac.uk 10.3-RELEASE-p4 FreeBSD > 10.3-RELEASE-p4 #0: Sat May 28 12:23:44 UTC 2016 > root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 Fascinating - a colleague of mine thought it might be related to a kernel problem. I am using: toon@moene:~/src$ uname -a Linux moene.org 4.6.0-1-amd64 #1 SMP Debian 4.6.1-1 (2016-06-06) x86_64 GNU/Linux > mech-as222> gfortran6 -Wl,-rpath="/usr/local/lib/gcc6" z.f90 > mech-as222> ./a.out > 0.00000000 0.00000000 0.00000000 0.00000000 > mech-as222> gfortran6 --version > GNU Fortran (FreeBSD Ports Collection) 6.0.0 20150927 (experimental) > > mech-as222> gfortran5 -Wl,-rpath="/usr/local/lib/gcc5" z.f90 > mech-as222> ./a.out > 0.00000000 0.00000000 0.00000000 0.00000000 > mech-as222> gfortran5 --version > GNU Fortran (FreeBSD Ports Collection) 5.3.0 > > Anton > > On 28/06/2016, Toon Moene <toon@moene.org> wrote: >> >> >> >> -------- Forwarded Message -------- >> Subject: This OpenMP code doesn't seem to compile correctly (5.4, 6.1). >> Date: Tue, 28 Jun 2016 21:13:43 +0200 >> From: Toon Moene <toon@moene.org> >> Organization: Moene Computational Physics, Maartensdijk, The Netherlands >> To: fortran@gcc.gn.org >> >> See the attached. >> >> I can't find fault with the code, yet it produces: >> >> 99999.0000 99999.0000 99999.0000 99999.0000 >> >> instead of zeros. >> >> Is this indeed an error (in that case I will open a BugZilla report). >> >> Kind regards, >> >> -- >> Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290 >> Saturnushof 14, 3738 XG Maartensdijk, The Netherlands >> At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ >> Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news >> >> > -- Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: This OpenMP code doesn't seem to compile correctly (5.4, 6.1). 2016-06-28 21:40 ` Toon Moene @ 2016-06-28 22:15 ` Anton Shterenlikht 0 siblings, 0 replies; 4+ messages in thread From: Anton Shterenlikht @ 2016-06-28 22:15 UTC (permalink / raw) To: fortran, toon >On 06/28/2016 09:59 PM, Anton Shterenlikht wrote: > >> mech-as222> uname -a >> FreeBSD mech-as222.men.bris.ac.uk 10.3-RELEASE-p4 FreeBSD >> 10.3-RELEASE-p4 #0: Sat May 28 12:23:44 UTC 2016 >> root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > >Fascinating - a colleague of mine thought it might be related to a >kernel problem. I am using: > >toon@moene:~/src$ uname -a >Linux moene.org 4.6.0-1-amd64 #1 SMP Debian 4.6.1-1 (2016-06-06) x86_64 >GNU/Linux And with 4.8: mech-as222> gfortran48 -Wl,-rpath="/usr/local/lib/gcc48" z.f90 mech-as222> ./a.out 0.00000000 0.00000000 0.00000000 0.00000000 Note that your versions of 6 and 5 branches are higher than mine. Perhaps a regression? Anton >> mech-as222> gfortran6 -Wl,-rpath="/usr/local/lib/gcc6" z.f90 >> mech-as222> ./a.out >> 0.00000000 0.00000000 0.00000000 0.00000000 >> mech-as222> gfortran6 --version >> GNU Fortran (FreeBSD Ports Collection) 6.0.0 20150927 (experimental) >> >> mech-as222> gfortran5 -Wl,-rpath="/usr/local/lib/gcc5" z.f90 >> mech-as222> ./a.out >> 0.00000000 0.00000000 0.00000000 0.00000000 >> mech-as222> gfortran5 --version >> GNU Fortran (FreeBSD Ports Collection) 5.3.0 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-28 22:15 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <ac471fb9-a142-2104-39b9-8a41dbd0bc5b@moene.org> 2016-06-28 19:16 ` Fwd: This OpenMP code doesn't seem to compile correctly (5.4, 6.1) Toon Moene 2016-06-28 19:59 ` Anton Shterenlikht 2016-06-28 21:40 ` Toon Moene 2016-06-28 22:15 ` Anton Shterenlikht
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).