JeffersonLab / qphix

QCD for Intel Xeon Phi and Xeon processors
http://jeffersonlab.github.io/qphix/
Other
13 stars 11 forks source link

Clean out code so it compiles and runs with GCC-4.9 at least for AVX targets #2

Closed bjoo closed 9 years ago

bjoo commented 9 years ago

Currently ICC is necessary to build the code because of some __declspec() and some Cilk++ notations. A feature enhancement is to allow the code to compile with GCC-4.9 (which supports Cilk++, and OpenMP4.0).

bjoo commented 9 years ago

Diptorup Deb from UNC has done this cleanup for the pre QPhiX version of this code. Will apply his patch train in a branch.

bjoo commented 9 years ago

Applied Diptorup's patch train in branch gcc-4.9-patches. I don't have a GCC-4.9 installation currently so won't merge until this is tested. NB: The patching process produced some whitespace warnings:

bertiemac:qphix bjoo$ git am 0002-Use-Intel-vector-pragmas-only-if-ICC-is-being-used.patch 
Applying: Use Intel vector pragmas only if ICC is being used.
/Users/bjoo/patches/qphix/.git/rebase-apply/patch:15: trailing whitespace.
#if defined (__INTEL_COMPILER)      
warning: 1 line adds whitespace errors.

and

bertiemac:qphix bjoo$ git am 0005-Fix-errors-due-to-non-GNU-style-specification-for-al.patch 
Applying: Fix errors due to non-GNU style specification for alignment.
/Users/bjoo/patches/qphix/.git/rebase-apply/patch:325: trailing whitespace.
#endif    
/Users/bjoo/patches/qphix/.git/rebase-apply/patch:462: trailing whitespace.
#endif      
/Users/bjoo/patches/qphix/.git/rebase-apply/patch:488: trailing whitespace.
      typename Geometry<AT,V,S,compress>::FourSpinorBlock mmp_spinor __attribute__ ((aligned(64))); 
warning: 3 lines add whitespace errors.

These are hopefully benign.

bjoo commented 9 years ago

Closed by: c9b138938d10316e3a028187b94d834de657a0cf Merged in Diptorups's gcc-4.9-patches and other features encountered using clang on BG/Q. --enable-cean (Enable C++ Extended Array Notation from Cilk++ - from the original code, use a for-loop if disabled) --enable-mm-malloc (Use mm_malloc for mallocing on Intel platforms) May need -Drestrict=restrict on CXXFLAGS on some compilers See README for additional information