Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6975 Discussions

Inconsistent LAPACKE_sgels results across different hardware

Eric_H_6
Beginner
350 Views

While running tests between our Atom test machine and our i7 test machine, I noticed that LAPACKE_sgels() is giving different results on different hardware. One of our unit tests was supposed to verify that LAPACKE_sgels() would return something other than 0 (success) for a least squares problem with no solution. I've extracted the code below:

#include <iostream>
#include "mkl_lapacke.h"

int main() {

   float a[6] = { 2, -2, -1, 1, 0, 0 };

   float b[3] = { 1, 0, -1 };

   int status = LAPACKE_sgels(LAPACK_ROW_MAJOR,
                              'N',
                              3,               // rows
                              2,               // columns
                              1,               // nrhs
                              a,               // input
                              2,               // lda
                              b,               // vector
                              1);              // ldb

   std::cout << "Status: " << status << std::endl;

   return 0;
}

I compile the code with the following:

g++ -o mkl-test mkltest.cpp -I/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/include -Wl,--no-as-needed -L/usr/local/lib -L/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64  -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread

On my i7, I get status is equal to 0, on my Atom, I get status equal to 2. Does anyone know why?

--Eric

 

0 Kudos
4 Replies
Gennady_F_Intel
Moderator
350 Views

Eric, Could you give Atom CPU specific? ( Specification and supported instruction sets)

0 Kudos
Eric_H_6
Beginner
350 Views

Gennady Fedorov (Intel) wrote:

Eric, Could you give Atom CPU specific? ( Specification and supported instruction sets)

Sure. The Atom is an Intel Atom CPU E3845 @ 1.91 GHz. Flags (from /proc/cpuinfo) are:

fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch arat epb dtherm tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms

The i7 is an Intel Core i7-4650U CPU @ 1.70GHz. Flags (from /proc/cpuinfo) are:

fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt

Is that what you need?

0 Kudos
Gennady_F_Intel
Moderator
350 Views

Yes, thanks. I see the problem on my side too and check the reason of that. we will back soon. thanks for the test. 

0 Kudos
Eric_H_6
Beginner
350 Views

Gennady Fedorov (Intel) wrote:

Yes, thanks. I see the problem on my side too and check the reason of that. we will back soon. thanks for the test. 

Any progress?

0 Kudos
Reply