[petsc-dev] fix needed for PETSc's use of _mm_prefetch

Jed Brown jed at 59A2.org
Thu Aug 26 04:26:58 CDT 2010


On Wed, 25 Aug 2010 18:19:50 -0500, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
> libfast in: /users/nyevik/MANUALBUILD/petsc-3.1-p4/src/mat/impls/aij/seq
> inode.c: In function 'PetscErrorCode MatMult_SeqAIJ_Inode(_p_Mat*, _p_Vec*, _p_Vec*)':
> inode.c:426: error: invalid conversion from 'int' to '_mm_hint'
> inode.c:426: error:   initializing argument 2 of 'void _mm_prefetch(const void*, _mm_hint)'
> inode.c:427: error: invalid conversion from 'int' to '_mm_hint'
> inode.c:427: error:   initializing argument 2 of 'void _mm_prefetch(const void*, _mm_hint)'
> 
> The PETSc code currently handles all this as the second argument is an int. This has to be fixed in petsc-dev to handle the case when int cannot be cast to _mm_hint

The Intel Intrinsics manual [1] specifies that the prototype is

  void _mm_prefetch(char const *a, int sel)

so this compiler is non-conforming.  What is it?  We may still need a
workaround, but should confirm that it has been filed as a bug.

Jed

[1] see page 77 of http://software.intel.com/file/6373



More information about the petsc-dev mailing list