0% found this document useful (0 votes)
23 views

Blis Library

This document discusses how to install and configure the BLIS linear algebra library for use in applications. It describes cloning the BLIS source from GitHub, configuring it to use OpenMP threading, building and installing it. It then explains how to include BLIS headers, disable its BLAS function prototypes if needed, and link applications against the installed BLIS library.

Uploaded by

salem31
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Blis Library

This document discusses how to install and configure the BLIS linear algebra library for use in applications. It describes cloning the BLIS source from GitHub, configuring it to use OpenMP threading, building and installing it. It then explains how to include BLIS headers, disable its BLAS function prototypes if needed, and link applications against the installed BLIS library.

Uploaded by

salem31
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Getting CPU architecture information with lscpu

https://diego.assencio.com/?index=614d73283d49e939ebfb648cfb86819d
-----------
https://connect.ed-diamond.com/GNU-Linux-Magazine/glmf-122/decouverte-de-la-
programmation-parallele-avec-openmp
Configuring OpenMP
We can check whether the OpenMP features are configured into our compiler or not,
using the command
echo |cpp -fopenmp -dM |grep -i open

If OpenMP is not featured in the compiler, we can configure it use using the
command
#apt install libomp-dev
-------------
http://www.ulaff.net/
https://www.amd.com/en/developer/aocl/blis.html
https://github.com/flame/blis/blob/master/docs/BuildSystem.md
Install blis
------------
git clone https://github.com/flame/blis.git

./configure --prefix=~/src/blis --enable-threading=openmp sandybridge

make -j4 // 4+1

make install // ls include/sandybridge


// ls lib/sandybridge
How to use blis
---------------
If your application is already declaring (prototyping) BLAS functions, then you may
disable those prototypes from being defined included within blis.h. This prevents
blis.h from re-declaring those prototypes, or, allows your other header to declare
those functions for the first time, depending on the order that you #include the
headers.

#include "stdio.h"
#include "stdlib.h"
#include "otherstuff.h"
#define BLIS_DISABLE_BLAS_DEFS // disable BLAS prototypes within BLIS.
#include "blis.h"

gcc -I/path/to/blis -I/path/to/otherstuff -c main.c -o main.o

CBLAS

If you build BLIS with CBLAS enabled and you wish to access CBLAS function
prototypes from within your application, you will have to #include the cblas.h
header separately from blis.h.

#include "blis.h"
#include "cblas.h"

----------------------
Linking against BLIS

Once you have instantiated (configured and compiled, and perhaps installed) a BLIS
library, you can link to it in your application's makefile as you would any other
library. The following is an abbreviated makefile for a small hypothetical
application that has just two external dependencies: BLIS and the standard C math
library. We also link against libpthread since that library has been a runtime
dependency of BLIS since 70640a3 (December 2017).

BLIS_PREFIX = $(HOME)/blis
BLIS_INC = $(BLIS_PREFIX)/include/blis
BLIS_LIB = $(BLIS_PREFIX)/lib/libblis.a

OTHER_LIBS = -L/usr/lib -lm -lpthread

CC = gcc
CFLAGS = -O2 -g -I$(BLIS_INC)
LINKER = $(CC)

OBJS = main.o util.o other.o

%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@

all: $(OBJS)
$(LINKER) $(OBJS) $(BLIS_LIB) $(OTHER_LIBS) -o my_program.x

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy