Celeron and IPP example... help.

Celeron and IPP example... help.

Pleasecompile and run the following single file project on Celeron Processor and let me know what results you get. My Celeron 2.4 gives me NO SPEED GAIN AT ALL. Please help.
Daniel

// --- Intel Performance Primitives test --- //
#include
#include
#include

#define inner 1280 /* Feel free to experiment with these values */
#define outter 10000000

int main(int argc, char *argv[])
{
int i,j;
float p[inner],q[inner],x1,x2;
unsigned long BeginTime1,EndTime1;
unsigned long BeginTime2,EndTime2;
printf("

Working...
");

/* Initialize: */
for(i=0;i{
p[i]=(float)(i*3.14);
q[i]=(float)(i*6.28);
}

BeginTime1 = GetTickCount(); /* ~10 ms timer resolution */

for(j=0;j{
x1=0.0;
for(i=0;i{
x1 += p[i]*q[i]; /* ... the usual, slow way. */
}
}
EndTime1 = GetTickCount();

BeginTime2 = GetTickCount(); /* ~10 ms timer resolution */

/* Nested loops, inside loop performs dot product which is in fact:
x = p0*q0 + p1*q1 + p2*q2 + ... +pn*qn */
for(j=0;j{
ippsDotProd_32f( p,q,inner,&x2 );/* Intel optimized... */
}
EndTime2 = GetTickCount();

printf("

Miliseconds NORM: %d.
",(int)(EndTime1-BeginTime1));
printf(" Miliseconds IPP: %d.
",(int)(EndTime2-BeginTime2));
printf("
(Dot product result: x1 = %f)",x1);
printf("
(Dot product result: x2 = %f)

",x2);
return 0;
}

14 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

YSONG, PLEASE HELP ON THIS ONE!

Dear Customer,
What is your output on this system?Did you test this code on any other systems and what are the other results? Which version of IPP are you using?

By the way, have you also submitted this question into Intel Premier Support at https://premier.intel.com to report this problem? If not, I would encourage you to do so. So our IPP support staff will provide assistance on this issue.

Thanks,
Ying

System: Win XP sp1a
IPP: 4.0
Ccompiler: ICC 8.0 or MS (close results)

Results for source cod given above:

1.) OnIntel Celeron - 2.4 GHz:

Miliseconds NORM: 32875

Miliseconds IPP: 32859

2.) On Intel Pentium 4 - 1.6 GHz:

Miliseconds NORM: 40900

Miliseconds IPP: 7100

I can't go http://premier.intel.com because I am still using trial version of IPP and C compiler. How can I bye IPP if I am not sure it is working on Celeron?

Ysong please help or forward this to someone at Intel labs who can compile the example. Thank you...

I have just seen that I am eligable to get help from premier.intel.com even though I am using IPP trial version.Did not pay attention to what registration email said, sorry. Now the problem is that premier.intel.com is not working (the page cannot be displayed)...

dand123,

could you please also to print out the library version info? Please embedpiece of code like this into your program and give us the results:

#include "ippcore.h"

static void ipps_version(void)
{
int freq;
const IppLibraryVersion* version;

version = ippsGetLibVersion();

printf("IntelippSP library, version:
");
printf("major: %d
",version->major);
printf("minor: %d
",version->minor);
printf("majorBuild: %d
",version->majorBuild);
printf("build: %d
",version->build);

printf("target CPU is <%c%c%c%c>
",
version->targetCpu[0],
version->targetCpu[1],
version->targetCpu[2],
version->targetCpu[3]);

printf("Name: %s
",version->Name);
printf("Version: %s
",version->Version);
printf("BuildDate: %s
",version->BuildDate);

printf("Detected CPU type: %d
",ippCoreGetCpuType());

ippGetCpuFreqMhz(&freq);
printf("Detected CPU freq: %d
",freq);

return;
} /* ipps_version() */

The reason I'm asking that is the different Celeron processors has different processor core, some of the has Pentium 3 core but another has Pentium 4 core.

Regards,
Vladimir

Here is what it says:

Intel ippSP library, version:
major: 4
minor: 0
majorBuild: 19
build: 77
targer CPU is
Name: ippspx.dll
BuildDate: Oct 16 2003
Detected CPU type: 6
Detected CPU freq: 2395

why is it running a px.dll library version, which is an optimizedgeneric c code? celeron 2.4 GHz is still pentium 4 so it should be w7.dll.

detected cpu type is ok (6=ippCpuP4=Pentium 4 processor ):

typedef enum {
/* Enumeration: Processor: */
ippCpuUnknown = 0x0,
ippCpuPP, /* Intel Pentium processor */
ippCpuPMX, /* Pentium processor with MMX technology */
ippCpuPPR, /* Pentium Pro processor */
ippCpuPII, /* Pentium II processor */
ippCpuPIII, /* Pentium III processor */
ippCpuP4, /* Pentium 4 processor */
ippCpuP4HT, /* Pentium 4 Processor with HT Technology */
ippCpuP4HT2,
ippCpuCentrino, /* Intel Centrino mobile technology */
ippCpuITP = 0x10, /* Intel Itanium processor */
ippCpuITP2 /* Itanium 2 processor */
} IppCpuType;

Message Edited by dand123 on 01-09-2004 09:05 AM

And you haveippw7.dll accessible, under ipp20 folder, right? Please be sure that there is no other version of IPP in PATH before IPPv4.0 beta.

By the way, we will try to investigate this. Unfortunately I have no Celeron based system close to me, so it will take some time.

Vladimir

I did have some bad PATH enties left from the IPP 3.0. I have removed them or changed to paths for IPP 4.0, but the problem is not solved. Still using px versions of dlls...

Consider this:

IppStatus sts;

sts = ippStaticInitCpu(ippCpuP4);
printf("

status...%d
",sts);

sts = ippStaticInitBest();
printf("

status...%d
",sts);

Both of the functions above return 24 which is ippStsNoOperationInDll which is explained as"The function does nothing in the dynamic version of the library."

How do I force my program to load w7.dll?

Message Edited by dand123 on 01-10-2004 04:55 AM

Functions ippStaticInit, ippStaticInitCpu, ippStaticInitBest are serve for initialization of static libraries. If you are linked with DLLs they will do nothing. Please read IPP documentation.

To use DLL you need to place IPP dispatcher (ipps20.dll) at the same folder as your executable and create here subfolder ipp20 and place ippsw7.dll to this subfolder.

There is no way to force dispatcher to load a particular DLL. You can control optimized code only in static merged libraries through function ippStaticInitCpu.

I managed to link staticaly with w7 library by including ipp*merged.lib, so for now I will stick to that temporary solution. I hope intel premier support will have the answer ready in the near future... Thanks for your help.

Intel Premier Support has solved this issue, it turned out that user's system had incorrect path for IPP 40. After reinstalling the Intel IPP runtime installer, it is fixed, and can detect ipp*w7 version correctly.

Thanks,
Ying
Intel IPP

In fact,
it turned out that the user (myself) has had an AMD processorsystem when installed IPP 4.0 Runtime. After that, thesystem waschanged to Intel (new processor, new motherboard, WinXP repair), but IPP's stayed the same (AMD version!). IPP Runtime reinstallation solved the problem (after manually removing the old dlls from windowssystem32ipp20).

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!