+- +-
Say hello if visiting :) by Gecko
11 Jan 2023, 07:43:05 pm

Seti is down again by Mike
09 Aug 2017, 10:02:44 am

Some considerations regarding OpenCL MultiBeam app tuning from algorithm view by Raistmer
11 Dec 2016, 06:30:56 am

Loading APU to the limit: performance considerations by Mike
05 Nov 2016, 06:49:26 am

Better sleep on Windows - new round by Raistmer
26 Aug 2016, 02:02:31 pm

Author Topic: 5.21 source compilable with ICC anywhere?  (Read 13051 times)

Offline maverick

  • Squire
  • *
  • Posts: 25
5.21 source compilable with ICC anywhere?
« on: 19 Jun 2007, 06:24:18 pm »
Hi all,

I'm looking for sources of s@h_enhanced 5.21, compilable with ICC.  Current sources give full of intrinsics errors, even intrinsics are disabled.(and that Eric doesn't guarantee ICC w/o intrinsics works).  And that it should be compiled on Window$ also.  And that currently it's still under development...

Then anyone (me?) must edit intrinsics.....

regards,

-Tetsuji

Offline Crunch3r

  • Knight who says 'Ni!'
  • *****
  • Posts: 602
    • 64 bit boinc clients
Re: 5.21 source compilable with ICC anywhere?
« Reply #1 on: 19 Jun 2007, 06:28:57 pm »
Hi all,

I'm looking for sources of s@h_enhanced 5.21, compilable with ICC.  Current sources give full of intrinsics errors, even intrinsics are disabled.(and that Eric doesn't guarantee ICC w/o intrinsics works).  And that it should be compiled on Window$ also.  And that currently it's still under development...

Then anyone (me?) must edit intrinsics.....

regards,

-Tetsuji

Hi TMR,  ;D ;D ;D

It's not exactly a 5.21 source but 5.21 is based on our 2.4 source tree ;)
I mailed Simon so that you get access to the development source ;)

I'm really happy to see you here my friend  :)

I want to share something with you: The three little sentences that will get you through life. Number 1: Cover for me. Number 2: Oh, good idea, Boss! Number 3: It was like that when I got here.

Homer Simpson

Offline Simon

  • Ni!
  • Knight who says 'Ni!'
  • *****
  • Posts: 1045
    • Is it a bird? Is it a plane? No...its-the.net!
Re: 5.21 source compilable with ICC anywhere?
« Reply #2 on: 19 Jun 2007, 06:34:58 pm »
Hi Tetsuji,

good to see you here! I've given you access to the pre-release section, there are some Linux source tarballs available there.

As for ICC-compatible sources, right now we have just our current codebase which works on Linux and Windows but is still based on 5.15 with some Multibeam edits.

Sources based on 5.21 haven't even begun to compile for me, either...no matter whether with MSVC or ICC.

Regards,
Simon.

Offline maverick

  • Squire
  • *
  • Posts: 25
Re: 5.21 source compilable with ICC anywhere?
« Reply #3 on: 19 Jun 2007, 07:21:12 pm »
Hi, Crunch3r & Simon,

Thank you for warm welcome!

And thank you for the source 2.4.  However it looks like it's still developing (at least Alex seems to developing AKfoldSSE.cpp which isn't present yet!  AK stands for Alex Kan, right?).

Offline Josef W. Segur

  • Janitor o' the Board
  • Knight who says 'Ni!'
  • *****
  • Posts: 3112
Re: 5.21 source compilable with ICC anywhere?
« Reply #4 on: 20 Jun 2007, 12:38:45 am »
Hi, Crunch3r & Simon,

Thank you for warm welcome!

And thank you for the source 2.4.  However it looks like it's still developing (at least Alex seems to developing AKfoldSSE.cpp which isn't present yet!  AK stands for Alex Kan, right?).

You are indeed welcome here.

The origin of AKfoldSSE was Alex's 6.x SSE2 folding routine, but I adapted it to my folding scheme sometime last year. The .cpp file should be in the 2.4 sources Optimizer directory.

All intrinsics I've used have been per Intel instruction set documentation, they should work with the Intel compiler. Simon and Crunch3r have been able to take what I've written and tested with DevC++/MinGW and get it working with their Intel builds fairly quickly. But I think they have moved to very recent versions of the Intel tools.
                                                                                   Joe

Offline maverick

  • Squire
  • *
  • Posts: 25
Re: 5.21 source compilable with ICC anywhere?
« Reply #5 on: 20 Jun 2007, 06:09:08 pm »
You are indeed welcome here.

The origin of AKfoldSSE was Alex's 6.x SSE2 folding routine, but I adapted it to my folding scheme sometime last year. The .cpp file should be in the 2.4 sources Optimizer directory.

All intrinsics I've used have been per Intel instruction set documentation, they should work with the Intel compiler. Simon and Crunch3r have been able to take what I've written and tested with DevC++/MinGW and get it working with their Intel builds fairly quickly. But I think they have moved to very recent versions of the Intel tools.
                                                                                   Joe

Thank you!  But actually ICC rejects some of the intrinsics.  They don't seem 100% compatible.  So we need to use intrinsics modified for ICC.(why aren't they compatible?).   The problem is incompatibility of argument types.  For example
Code: [Select]
vector/analyzeFuncs_sse.cpp(803): error: argument of type "x86_m128={__m128}" is incompatible with parameter of type "__m128"
          s = _mm_add_ps(s, SS2);
                         ^


vector/analyzeFuncs_sse.cpp(803): error: argument of type "const_float4" is incompatible with parameter of type "__m128"
          s = _mm_add_ps(s, SS2);
                            ^

vector/analyzeFuncs_sse.cpp(803): error: a value of type "__m128" cannot be assigned to an entity of type "x86_m128={__m128}"
          s = _mm_add_ps(s, SS2);
            ^

I don't see anything wrong and I'm at a loss, but once solved, it will be easy.

Thanks in advance.

[edit]
I made a small test program as follows:
Code: [Select]
#define __SSE__
#define __MMX__

#include <xmmintrin.h>

__m128 a,b,c;

void
func(){
  a = _mm_add_ps(b,c);
}
g++ gives a lot of errors, while ICC compiles this w/o any errors (output code is as expected).....ICC looks generous.
« Last Edit: 20 Jun 2007, 07:39:45 pm by maverick »

Offline Josef W. Segur

  • Janitor o' the Board
  • Knight who says 'Ni!'
  • *****
  • Posts: 3112
Re: 5.21 source compilable with ICC anywhere?
« Reply #6 on: 20 Jun 2007, 11:24:42 pm »
...
The problem is incompatibility of argument types.  For example
Code: [Select]
vector/analyzeFuncs_sse.cpp(803): error: argument of type "x86_m128={__m128}" is incompatible with parameter of type "__m128"
          s = _mm_add_ps(s, SS2);
                         ^


vector/analyzeFuncs_sse.cpp(803): error: argument of type "const_float4" is incompatible with parameter of type "__m128"
          s = _mm_add_ps(s, SS2);
                            ^

vector/analyzeFuncs_sse.cpp(803): error: a value of type "__m128" cannot be assigned to an entity of type "x86_m128={__m128}"
          s = _mm_add_ps(s, SS2);
            ^

I don't see anything wrong and I'm at a loss, but once solved, it will be easy.

Thanks in advance.
...

The x86_m128 type shouldn't be in use in that module, it looks like xmmintrin.h isn't being included at the top of x86_ops.h so __m128 is being replaced by x86_m128 at the bottom. For a Linux build, the sah_config.h file should have a line
#define HAVE_XMMINTRIN_H 1

That line was added June 1, but changes in that file aren't showing on the [seti_cvs] list, the most recent is June 18. I suppose that's because the file should be auto-generated rather than manually edited.

I don't know if that will resolve the issue with const_float4 types. Those are Eric's method of ensuring that the compiler won't generate SSE initialization code for vector constants, running SSE before entry to main() and crashing on systems which don't have SSE. If they continue to be a problem, maybe copying those constants as is done in analyzeFuncs_x86_64.cpp will be necessary, but I'd try casting them first.
                                                                                        Joe

Offline maverick

  • Squire
  • *
  • Posts: 25
Re: 5.21 source compilable with ICC anywhere?
« Reply #7 on: 21 Jun 2007, 03:21:57 pm »

The x86_m128 type shouldn't be in use in that module, it looks like xmmintrin.h isn't being included at the top of x86_ops.h so __m128 is being replaced by x86_m128 at the bottom. For a Linux build, the sah_config.h file should have a line
#define HAVE_XMMINTRIN_H 1

That line was added June 1, but changes in that file aren't showing on the [seti_cvs] list, the most recent is June 18. I suppose that's because the file should be auto-generated rather than manually edited.

I don't know if that will resolve the issue with const_float4 types. Those are Eric's method of ensuring that the compiler won't generate SSE initialization code for vector constants, running SSE before entry to main() and crashing on systems which don't have SSE. If they continue to be a problem, maybe copying those constants as is done in analyzeFuncs_x86_64.cpp will be necessary, but I'd try casting them first.
                                                                                        Joe

Hi Joe,

Thank you for the hint. but defining "#define HAVE_XMMINTRIN_H 1" and "#include <xmmintrin.h>  near the top of x86_ops.h doesn't work.   So I may need to try casting, but if so, there are a LOT of these codes....sigh.   I wonder how others avoid this.

[edit]
somehow, casting doesn't work, either....
Code: [Select]
vector/analyzeFuncs_sse.cpp(803): error: argument of type "x86_m128={__m128}" is incompatible with parameter of type "__m128"
          s = (__m128)_mm_add_ps((__m128)s, (__m128)SS2);
                                 ^

vector/analyzeFuncs_sse.cpp(803): error: argument of type "x86_m128={__m128}" is incompatible with parameter of type "__m128"
          s = (__m128)_mm_add_ps((__m128)s, (__m128)SS2);
                                            ^

vector/analyzeFuncs_sse.cpp(803): error: type of cast must be integral or enum
          s = (__m128)_mm_add_ps((__m128)s, (__m128)SS2);
               ^

« Last Edit: 21 Jun 2007, 04:21:12 pm by maverick »

Offline Josef W. Segur

  • Janitor o' the Board
  • Knight who says 'Ni!'
  • *****
  • Posts: 3112
Re: 5.21 source compilable with ICC anywhere?
« Reply #8 on: 21 Jun 2007, 05:52:39 pm »
One thing I didn't consider was that if xmmintrin.h wasn't included you'd be seeing errors on the intrinsic functions as well as their arguments.

If you haven't tried it already, just comment out those 3 lines at the end of x86_ops.h which make the preprocessor rewrite __m128 to x86_m128 in the project source. It seems that has to be what's causing the problem, technically #ifndef only works for preprocessor macro definitions and maybe Intel has implemented __m128 in some other way.

If that helps we can think about rewriting the conditional more compatibly.
                            &nbqp;                                                            Joe

Offline maverick

  • Squire
  • *
  • Posts: 25
Re: 5.21 source compilable with ICC anywhere?
« Reply #9 on: 21 Jun 2007, 06:05:19 pm »
Hi Joe,

Thanks!  That's it.  I didn't see the last part!   I fixed like:
Code: [Select]
#ifndef __INTEL_COMPILER
#ifndef __m128d
#define __m128d x86_m128d
#endif

#ifndef __m128i
#define __m128i x86_m128i
#endif

#ifndef __m128
#define __m128 x86_m128
#endif

Now I got other errors...
« Last Edit: 21 Jun 2007, 06:11:45 pm by maverick »

Offline maverick

  • Squire
  • *
  • Posts: 25
Re: 5.21 source compilable with ICC anywhere?
« Reply #10 on: 21 Jun 2007, 06:28:56 pm »
Hi,

Next one is nothing to do with me (because it's em64t), but the error codes are
Code: [Select]
vector/analyzeFuncs_x86_64.cpp(76): error: a value of type "__m128" cannot be assigned to an entity of type "x86_m128={__m128}"
      zz = _mm_setzero_ps ();
         ^

vector/analyzeFuncs_x86_64.cpp(120): error: a value of type "__m128d" cannot be assigned to an entity of type "x86_m128d={__m128}"
                  CC = _mm_loadu_pd (aC);
                     ^

vector/analyzeFuncs_x86_64.cpp(121): error: a value of type "__m128d" cannot be assigned to an entity of type "x86_m128d={__m128}"
                  DD = _mm_loadu_pd (aD);
                     ^

vector/analyzeFuncs_x86_64.cpp(123): error: argument of type "x86_m128d={__m128}" is incompatible with p!bameter of type "__m128d"
                  cc = _mm_cvtpd_ps (CC);
                                     ^

I'm thinking of deleting this one.  The first
#if defined(__i386__) || defined(__x86_64__) || defined (_M_AMD64) || defined(_M_IX86)
is the problem.  May I trim it to
#if defined(__x86_64__) || defined (_M_AMD64) ?

Offline Josef W. Segur

  • Janitor o' the Board
  • Knight who says 'Ni!'
  • *****
  • Posts: 3112
Re: 5.21 source compilable with ICC anywhere?
« Reply #11 on: 21 Jun 2007, 07:06:20 pm »
Eric included the (__i386__) in that sequence, maybe for a good reason I don't understand. I suggest an && !defined (__INTEL_COMPILER) approach.

That chirp method is glacially slow anyhow, at least on my Intel based systems. And if a compiler actually restricted the time and ang variables to single precision float it would be unacceptably inaccurate (as used, calculations involving those will almost certainly be kept in FPU registers and be OK).
                                                                                      Joe

Offline maverick

  • Squire
  • *
  • Posts: 25
Re: 5.21 source compilable with ICC anywhere?
« Reply #12 on: 21 Jun 2007, 07:18:34 pm »
Thanks.

I compiled and ran it, but it gives computation errors....I must have done something wrong or it's not ready yet....   Anyway I'd better use source 2.4 here (I've been using s@h's nightly tarball).

Just a moment.  There is an intel compiler for em64t.... :D
« Last Edit: 21 Jun 2007, 07:21:01 pm by maverick »

 

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?
Members
Total Members: 97
Latest: ToeBee
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 59559
Total Topics: 1672
Most Online Today: 30
Most Online Ever: 983
(20 Jan 2020, 03:17:55 pm)
Users Online
Members: 0
Guests: 44
Total: 44
Powered by EzPortal