atlas and cblas

Hello

I am very new mac user, and I struggling with altlas and cblas. I have installed atlas in Darwin Ports, and downloaded cblas for netlib.

Compilation goes smoothly, with parameters
BLLIB = -L/opt/local/lib -latlas
CC = gcc
FC = gfortran
LOADER = $(FC)
CFLAGS = -v -O0 -DADD_ -I/Users/likask/MyBuild/src/CBLAS/src -Wall
FFLAGS = -v -O0 -Wall -I/Users/likask/MyBuild/src/CBLAS/src

However after compilation I can not pass tests,
kiss:testing likask$ gdb ./xccblat1
(gdb) set env DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib
(gdb) r
Starting program: /Users/likask/MyBuild/src/CBLAS/testing/xccblat1
GuardMalloc: Allocations will be placed on 16 byte boundaries.
GuardMalloc: - Some buffer overruns may not be noticed.
GuardMalloc: - Applications using vector instructions (e.g., SSE or Altivec) should work.
GuardMalloc: GuardMalloc version 18
GuardMalloc: Allocations will be placed on 16 byte boundaries.
GuardMalloc: - Some buffer overruns may not be noticed.
GuardMalloc: - Applications using vector instructions (e.g., SSE or Altivec) should work.
GuardMalloc: GuardMalloc version 18
Reading symbols for shared libraries ++++.. done
Reading symbols for shared libraries . done
GuardMalloc: Allocations will be placed on 16 byte boundaries.
GuardMalloc: - Some buffer overruns may not be noticed.
GuardMalloc: - Applications using vector instructions (e.g., SSE or Altivec) should work.
GuardMalloc: GuardMalloc version 18
Complex CBLAS Test Program Results

Test of subprogram number 1 CBLAS_CDOTC

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xb002c000
0x90a47a3b in atl_f77wrap_cdotc__ ()
(gdb) where
#0 0x90a47a3b in atl_f77wrap_cdotc__ ()
#1 0x90a4caff in cdotc_ ()
#2 0x00003c17 in cblas_cdotc_sub (N=0, X=0xbffff534, incX=1, Y=0xbffff4fc, incY=1, dotc=0xbffff574) at cblas_cdotc_sub.c:22
#3 0x00003856 in cdotctest_ (N=0x5664, X=0xbffff534, incX=0x5668, Y=0xbffff4fc, incY=0x566c, dotc=0xbffff574) at c_cblas1.c:28
#4 0x000029fd in check2_ (sfac=@0x4020) at c_cblat1.f:675
#5 0x00001def in MAIN__ () at c_cblat1.f:675
#6 0x00003d28 in main (argc=1, argv=0xbffff730) at ../../../gcc-4.3-20070810/libgfortran/fmain.c:26

I have used -framework Accelerate insted atlas with similar result.

I know that cblas is included in accelerate framework, but for similar reason it not working with my code. I have segmentation fault. I tested my code on linux on various platforms and it works fine, no leaks.

I hope it is simple trick to solve this problem. I have Mac OS X 10.5.6 with Xcodes 3.1

I hope for some help, regards,
Lukasz

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

atlas and cblas

Ok, I made some progress. Although cblas form netlib does not working. Good news is that cblas made by apple works with my libraries. I keep arrays and tables in structures (strct A { ... }), and this was source of the problem. Solution is simple:
gcc -malign-double ...

Lukasz