help with dpotrf
Posted: Mon Sep 12, 2016 9:19 pm
Hi,
I'm trying to call magma_dpotrf or magma_dpotrf_m in a project, but I haven't been able to get the output to run without producing an error (although my code compiles without a problem). I decided to simplify the call and write a short example, but I'm still unable to run this without a segmentation fault.
I've been able to use other Magma routines successfully with the anticipated result (although I haven't tried them all). I'm relatively new to programming in C, so I apologize if there is an easy fix I'm overlooking.
I'm using Magma 2.0.2 on Ubuntu 16.04 with OpenBLAS. Thank you for your help!
I'm trying to call magma_dpotrf or magma_dpotrf_m in a project, but I haven't been able to get the output to run without producing an error (although my code compiles without a problem). I decided to simplify the call and write a short example, but I'm still unable to run this without a segmentation fault.
Code: Select all
#include <cublas_v2.h>
#include <magma.h>
#include <magma_lapack.h>
#include <stdio.h>
void main() {
int size = 2;
int *info;
double A[4] = {2.0, 1.0, 1.0, 2.0};
magma_init();
magma_dpotrf(MagmaUpper, size, A, size, info);
for (int i = 0; i < 4; i++) {
printf("%f\n", A[i]);
}
magma_finalize();
}
I'm using Magma 2.0.2 on Ubuntu 16.04 with OpenBLAS. Thank you for your help!