[SciPy-User] Segmentation fault (core dumped)

Daπid davidmenhur at gmail.com
Thu Oct 12 10:20:25 EDT 2017


How far in your code do you reach? That will help narrowing down the
problem.

Also, do you have the core dump? Can you run gdb on it?

On 12 October 2017 at 15:34, Sema Atasever <s.atasever at gmail.com> wrote:

> Dear scipy-users:
>
> I am trying to write a python program which uses SciPy library that makes
> hierarchical clustering.
>
> After I type in my input at the "shell> " prompt:  *python
> SciPy_clustering.py *
>
> gives me the following error:
>
> *Segmentation fault (core dumped)*
>
> How can i fix this problem?
>
> There is enough memory on my system (516 GB), python code uses just 21GB
> memory.
>
> My dataset includes 73.622 data samples (rows)  and 22 features (columns).
> When i shrink dataset (31.000) it works fine correctly.
>
> Thanks in Advance.
>
> *python Clustering Code:*
> # needed imports
> import numpy as np
> import time
> from matplotlib import pyplot as plt
> from scipy.cluster.hierarchy import dendrogram, linkage
> from scipy.cluster.hierarchy import cophenet
> from scipy.spatial.distance import pdist
>
> start_time = time.clock()
>
> X=np.loadtxt(open("dataset.txt", "rb"), delimiter=";")
>
> print ('\nX.shape')
> print (X.shape)
>
> # generate the linkage matrix
> Z = linkage(X, 'single')
>
> np.savetxt('Z_output.txt', Z, fmt='%-7.5f')
>
> c, coph_dists = cophenet(Z, pdist(X))
>
> print("Cophenetic Correlation Coefficient : \n")
> print(c)
>
> print("\nRunning Time:")
> print (time.clock() - start_time, "seconds")
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at python.org
> https://mail.python.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20171012/6dd66fa7/attachment.html>


More information about the SciPy-User mailing list