Skip to content

The dot and inner products fail for large arrays on 64 bit linux using the ATLAS libraries. (Trac #497) #1095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
numpy-gitbot opened this issue Oct 19, 2012 · 3 comments
Labels
00 - Bug component: Other Priority: high High priority, also add milestones for urgent issues
Milestone

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/497 on 2007-04-10 by @charris, assigned to unknown.

The problem is easy to exhibit:

In [2]: dot(eye(1000),eye(1000))
Illegal instruction

The products work for smaller arrays, so I suspect either the output array or a work array is being created with the wrong size, probably a 64bit integer thing in the cblas interface. The example works on 32 bit linux.

This ticket replaces #1030

@numpy-gitbot
Copy link
Author

@charris wrote on 2007-04-11

I think this may be an error in the ATLAS libraries. I am running fc5 here with the ATLAS libraries installed from extras repository, However, those rpms are generated from a script borrowed from Debian, so the problems are probably common to both. Anyway, the following c program also generates the error:

#include <atlas/cblas.h>

int main(int argc, char **argv)
{
    static double a[1000*1000];
    static double b[1000*1000];
    static double c[1000*1000];
    double alpha=1, beta=0;

    cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 1000, 1000, 1000,
            alpha, a, 1000, b, 1000, beta, c, 1000);
    return 1;
}

Compiled with the command line :

gcc -L/usr/lib64/atlas -lcblas test.c

and which, when run, delivers:

$[charris@swamp blasdot]$ ./a.out
Illegal instruction

For Debian, I believe lib64 should be replaced by lib. Anyway, I think this is either a compiler or ATLAS problem that exhibits itself when the arrays get large enough to require blockiing or some such. I compiled with gcc version 4.1.1. The program works fine if 1000 is replaced by 10 everywhere.

@numpy-gitbot
Copy link
Author

@charris wrote on 2007-04-13

I'm closing this ticket. I compiled ATLAS-3.7.30 for my machine and the test program ran successfully, so this is a problem with the distributed ATLAS libraries. I have filed a bug report with Fedora bugzilla. I suggest that someone who runs Debian or Ubuntu also file bug reports.

BTW, apart from the time, ATLAS-3.7.30 was pretty easy to compile. And the optimization time wasn't bad on this machine, either, < 30 minutes. Apart from that, I believe Whaley recommends using version 3.7 instead of 3.6 because the time between official stable releases has become so long.

ATLAS files available at https://sourceforge.net/project/showfiles.php?group_id=23725

@numpy-gitbot
Copy link
Author

Milestone changed to 1.0.3 Release by @charris on 2007-05-14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug component: Other Priority: high High priority, also add milestones for urgent issues
Projects
None yet
Development

No branches or pull requests

1 participant