[Llvm-bgq-discuss] Limitation in bgclang's QPX support

Hal Finkel hfinkel at anl.gov
Sat May 24 07:56:55 CDT 2014


Phil,

> > > error: C-style cast from 'double' to 'vector4double' is not
> > > allowed
> > > vector4double fullvirial_v0 = (vector4double) (0.0);

I'm putting together a new build, which should be ready by early next week, in which I've enabled this scalar splat behavior. It does not seem to break anything else, so baring any last-minute problems, your original syntax should work with bgclang soon.

Thanks again,
Hal

----- Original Message -----
> From: "Hal Finkel" <hfinkel at anl.gov>
> To: "Phil Miller" <mille121 at illinois.edu>
> Cc: llvm-bgq-discuss at lists.alcf.anl.gov
> Sent: Wednesday, May 21, 2014 7:51:34 AM
> Subject: Re: [Llvm-bgq-discuss] Limitation in bgclang's QPX support
> 
> ----- Original Message -----
> > From: "Hal Finkel" <hfinkel at anl.gov>
> > To: "Phil Miller" <mille121 at illinois.edu>
> > Cc: llvm-bgq-discuss at lists.alcf.anl.gov
> > Sent: Wednesday, May 14, 2014 5:18:55 PM
> > Subject: Re: [Llvm-bgq-discuss] Limitation in bgclang's QPX support
> > 
> > Phil,
> > 
> > I'll look into this. There may be a way to enable the 'splat'
> > behavior here. In the mean time, you can just write:
> > vector4double fullvirial_v0 = (vector4double) { 0.0, 0.0, 0.0, 0.0
> > };
> 
> Also, you can use the vec_splats intrinsic on both compilers:
> 
> vector4double fullvirial_v0 = vec_splats(0.0);
> 
>  -Hal
> 
> > 
> >  -Hal
> > 
> > ----- Original Message -----
> > > From: "Phil Miller" <mille121 at illinois.edu>
> > > To: llvm-bgq-discuss at lists.alcf.anl.gov
> > > Sent: Wednesday, May 14, 2014 1:37:09 PM
> > > Subject: [Llvm-bgq-discuss] Limitation in bgclang's QPX support
> > > 
> > > 
> > > 
> > > 
> > > Aside from the optimization errors I recently reported, the only
> > > other impediment to compiling unmodified NAMD with bgclang is a
> > > big
> > > pile of errors of the following nature:
> > > ====
> > > error: C-style cast from 'double' to 'vector4double' is not
> > > allowed
> > > vector4double fullvirial_v0 = (vector4double) (0.0);
> > > ====
> > > 
> > > The desired semantics of statements like this are pretty
> > > straightforward, and don't seem to conflict with anything else.
> > > bgxlc is happy to accept these statements, so this can be viewed
> > > as
> > > a (hopefully unintended) compatibility limitation.
> > > 
> > > 
> > > 
> > > If there's a more portable way to express this construct, I might
> > > be
> > > able to pass a patch up to the NAMD developers.
> > > 
> > > 
> > > These were avoided by disabling the QPX-specialized code, and
> > > using
> > > the portable C/C++ versions instead. So, I was finally able to
> > > compile and link a NAMD binary using purely the bgclang
> > > toolchain.
> > > If I encounter subsequent runtime trouble, I'll follow up with
> > > another post.
> > > 
> > > _______________________________________________
> > > llvm-bgq-discuss mailing list
> > > llvm-bgq-discuss at lists.alcf.anl.gov
> > > https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
> > > 
> > 
> > --
> > Hal Finkel
> > Assistant Computational Scientist
> > Leadership Computing Facility
> > Argonne National Laboratory
> > _______________________________________________
> > llvm-bgq-discuss mailing list
> > llvm-bgq-discuss at lists.alcf.anl.gov
> > https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
> > 
> 
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
> _______________________________________________
> llvm-bgq-discuss mailing list
> llvm-bgq-discuss at lists.alcf.anl.gov
> https://lists.alcf.anl.gov/mailman/listinfo/llvm-bgq-discuss
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-bgq-discuss mailing list