On Tue, Feb 12, 2019 at 5:39 PM Orion Poplawski
<orion(a)nwra.com>
wrote:
>
> On 2/12/19 1:02 AM, Jakub Jelinek wrote:
> > On Mon, Feb 11, 2019 at 07:17:25PM -0700, Orion Poplawski wrote:
> > > Looks like GCC 9 is finally enforcing an OpenMP change:
> > >
> > > From
https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00628.html
> >
> > Please see
> >
https://gcc.gnu.org/gcc-9/porting_to.html#ompdatasharing
> > which documents what you can do and what works with both
> > compilers and what
> > doesn't.
>
> Thanks for the reference.
>
> > > GCC 8 complains about just adding fp_stderr to shared():
> > >
> > > nco_omp.c: In function 'nco_openmp_ini':
> > > nco_omp.c:205:43: error: 'fp_stderr' is predetermined
'shared'
> > > for 'shared'
> > > # pragma omp parallel default(none)
> > > shared(fp_stderr,thr_nbr_act)
> >
> > Yes, either you want firstprivate(fp_stderr), or drop
> > default(none) if you
> > want to make it work with both compilers.
>
> Okay. In this case we'll probably drop default(none). Many people
> have
> gotten into the habit of using default(none) though in order to
> force
> declaring the form of all variables.
>
> > > And apparently complains if you drop default(none) as well
> > > (from another
> > > project with the same problem):
> > >
> > > [ 9%] Building CXX object
> > > CMakeFiles/_CuraEngine.dir/src/layerPart.cpp.o
> > > /home/ruben/Projects/CuraEngine/src/layerPart.cpp: In function
> > > ‘void
> > > cura::createLayerParts(cura::SliceMeshStorage&,
> > > cura::Slicer*)’:
> > > /home/ruben/Projects/CuraEngine/src/layerPart.cpp:52:78: error:
> > > ‘total_layers’ is predetermined ‘shared’ for ‘shared’
> > > #pragma omp parallel for shared(mesh, slicer, total_layers)
> > > schedule(dynamic)
> >
> > That is with GCC 8 or earlier, right? Just leave total_layers
> > out
> > of the shared clause.
>
> Right, because the default is to be shared. Thanks.
For the lammps package I chatted with upstream:
https://github.com/lammps/lammps/issues/1326
and they already had a hack_openmp script in their source for the PGI
compiler, which basically boils down to something like:
find . -type f \( -name "*.cpp" -or -name "*.h" \) -exec sed -e
'/#pragma omp/s/default(none)/default(shared)/' -e '/#pragma
omp/s/shared([^)]\+)//' -i {} +
and that did the trick for now, while upstream is fixing it for good:
https://github.com/lammps/lammps/pull/1330
Thanks for sharing your solution, but seems to me more simpler the
Orion solution than what I saw in lammps [1] .
The Orion solution is just drop "default(none)" [2] , hope that is
useful information for you ...
Best regards,
[1]
Cheers,
Christoph
>
> --
> Orion Poplawski
> Manager of NWRA Technical Systems 720-772-5637
> NWRA, Boulder/CoRA Office FAX: 303-415-9702
> 3380 Mitchell Lane orion(a)nwra.com
> Boulder, CO 80301
https://www.nwra.com/
> _______________________________________________
> devel mailing list -- devel(a)lists.fedoraproject.org
> To unsubscribe send an email to devel-leave(a)lists.fedoraproject.org
> Fedora Code of Conduct:
https://getfedora.org/code-of-conduct.html
> List Guidelines:
>
https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
>
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
--
Christoph Junghans
Web:
http://www.compphys.de
_______________________________________________
devel mailing list -- devel(a)lists.fedoraproject.org
To unsubscribe send an email to devel-leave(a)lists.fedoraproject.org
Fedora Code of Conduct:
https://getfedora.org/code-of-conduct.html
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org --
Sérgio M. B.