Giter Site home page Giter Site logo

Access Violation exception about arpackpp HOT 1 CLOSED

m-reuter avatar m-reuter commented on August 27, 2024
Access Violation exception

from arpackpp.

Comments (1)

wo80 avatar wo80 commented on August 27, 2024

In superluc.h, add

inline void* mallocARTYPE(int size, int dtype)
{
	if (dtype == SLU_D) {       // calling the double precision routine.
		return doubleMalloc(size);
	}
	else if (dtype == SLU_S) {  // calling the single precision routine.
		return floatMalloc(size);
	}
	else if (dtype == SLU_Z) {  // calling the double precision complex routine.
		return doublecomplexMalloc(size);
	}
	else {                      // calling the single precision complex routine.
		return complexMalloc(size);
	}
}

and in FactorAsI, change memory allocation to

irowi = (int*)malloc(sizeof(int) * (nnz+this->n));
pcoli = (int*)malloc(sizeof(int) * (this->n+1));
asi   = (ARTYPE*)mallocARTYPE(nnz+this->n, A.Dtype);

This fixes the issue for me.

EDIT:

asi   = (ARTYPE*)malloc(sizeof(ARTYPE) * (nnz + this->n));

works just as well, so no need to edit superluc.h.

from arpackpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.