473,664 Members | 2,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

100k X 100k data processing summary

a
By previous replies, it seems that the following method somehow solves the
problem up to 1000 * 1000 2D data, but when I try 10k * 10k, the
segmentation fault problem appears again.

Richard Tobin told me there is a system limit that can be changed. But I
don't know which file is to be changed.

I have modified again and again and hope to find out a solution that can
handle 100k * 100k data.

float** array_to_matrix (float* m, int rows, int cols) {
int i,j;

float** r;

r = (float**)calloc (rows,sizeof(fl oat*));

for(i=0;i<rows; i++)
{
r[i] = (float*)calloc( cols,sizeof(flo at));

for(j=0;j<cols; j++)
r[i][j] = m[i*cols+j];
}
return r;

}
Nov 24 '07 #1
22 1805
a wrote:
By previous replies, it seems that the following method somehow solves the
problem up to 1000 * 1000 2D data, but when I try 10k * 10k, the
segmentation fault problem appears again.
System memory is finite, if you attempt to allocate more than there is
available, you will fail.
Richard Tobin told me there is a system limit that can be changed. But I
don't know which file is to be changed.

I have modified again and again and hope to find out a solution that can
handle 100k * 100k data.
Which is 10GB*sizeof(flo at), do you have that much (virtual) memory to
play with?

It sound like you have more of an algorithm problem than a C one.
float** array_to_matrix (float* m, int rows, int cols) {
int i,j;

float** r;

r = (float**)calloc (rows,sizeof(fl oat*));
Drop the cast.

--
Ian Collins.
Nov 24 '07 #2
Ian Collins wrote:
a wrote:
>By previous replies, it seems that the following method somehow solves the
problem up to 1000 * 1000 2D data, but when I try 10k * 10k, the
segmentation fault problem appears again.
System memory is finite, if you attempt to allocate more than there is
available, you will fail.
>Richard Tobin told me there is a system limit that can be changed. But I
don't know which file is to be changed.

I have modified again and again and hope to find out a solution that can
handle 100k * 100k data.
Which is 10GB*sizeof(flo at), do you have that much (virtual) memory to
play with?

It sound like you have more of an algorithm problem than a C one.
>float** array_to_matrix (float* m, int rows, int cols) {
int i,j;

float** r;

r = (float**)calloc (rows,sizeof(fl oat*));
Drop the cast.
And always check the return of [mc]alloc isn't null.

--
Ian Collins.
Nov 24 '07 #3
In article <fi**********@j ustice.itsc.cuh k.edu.hk>, a <a@a.comwrote :
>Richard Tobin told me there is a system limit that can be changed. But I
don't know which file is to be changed.
As I said, ask your system administrator. Or read the manual.
We can't tell you, because you haven't even told us what system
you're using.
>I have modified again and again and hope to find out a solution that can
handle 100k * 100k data.
100k * 100k is 10g, and if floats are 4 bytes that's 40 gigabytes.
You really will need a supercomputer for that. Perhaps you should
reconsider your algorithm, or wait several years.

-- Richard
--
"Considerat ion shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Nov 24 '07 #4
>
100k * 100k is 10g, and if floats are 4 bytes that's 40 gigabytes.
You really will need a supercomputer for that. Perhaps you should
reconsider your algorithm, or wait several years.
<OTWorkstatio n boards with support for 64GB of RAM are available from
several vendors! All it takes is a spare $10K for the RAM... </OT>

--
Ian Collins.
Nov 24 '07 #5
Richard Tobin schrieb:
100k * 100k is 10g, and if floats are 4 bytes that's 40 gigabytes.
You really will need a supercomputer for that. Perhaps you should
reconsider your algorithm, or wait several years.
It might work if enough virtual memory is available - serious thrashing
implied. Suitable for *some* problems, however, if access pattern to
this matrix are not arbitrary (which they aren't for most algorithms).

Usually data in such huge matrices is sparse anyways - so, I fully
second your statement the OP should reconsider his algorithm. If it
fails in the early stage of memory allocation he/she probably hasn't
thourhgt about it at all.

Greetings,
Johannes

--
"Viele der Theorien der Mathematiker sind falsch und klar
Gotteslästerli ch. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden." -- Prophet und Visionär Hans Joss aka
HJP in de.sci.mathemat ik <47************ **********@news .sunrise.ch>
Nov 24 '07 #6
>100k * 100k is 10g, and if floats are 4 bytes that's 40 gigabytes.
>You really will need a supercomputer for that. Perhaps you should
reconsider your algorithm, or wait several years.

It might work if enough virtual memory is available - serious thrashing
implied.
On a 32-bit machine (say, Pentium with PAE36) you could have 64G
of physical memory, and a lot more physical swap/page space, but
with a 32-bit address space for an individual process, you're limited
to 4G (and sometimes much less). So you need a machine with 64-bit
addressing and an OS that supports it for individual processes.
Simply adding lots of memory and swap/page space isn't enough.
>Suitable for *some* problems, however, if access pattern to
this matrix are not arbitrary (which they aren't for most algorithms).

Usually data in such huge matrices is sparse anyways - so, I fully
second your statement the OP should reconsider his algorithm. If it
fails in the early stage of memory allocation he/she probably hasn't
thourhgt about it at all.
Nov 25 '07 #7
a
Thanks Richard. It's red hat enterprise, or Fedora related. The biggest
problem I'm having is that I don't know the keyword because compilation
memory program memory alike doesn't give me good results in google search.
"Richard Tobin" <ri*****@cogsci .ed.ac.ukwrote in message
news:fi******** **@pc-news.cogsci.ed. ac.uk...
In article <fi**********@j ustice.itsc.cuh k.edu.hk>, a <a@a.comwrote :
>>Richard Tobin told me there is a system limit that can be changed. But I
don't know which file is to be changed.

As I said, ask your system administrator. Or read the manual.
We can't tell you, because you haven't even told us what system
you're using.

-- Richard
--
"Considerat ion shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.

Nov 25 '07 #8
a
Modifying in /etc/security/limits.conf seems doesn't help solve the problem

* soft data 100000
* soft stack 100000
Nov 25 '07 #9
a

"a" <a@a.comwrote in message news:fi******** **@justice.itsc .cuhk.edu.hk...
Modifying in /etc/security/limits.conf seems doesn't help solve the
problem

* soft data 100000
* soft stack 100000
Furthermore, running as root should be unlimited....
Nov 25 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
1937
by: Dominic Olivastro | last post by:
Hi all: I'm new to this newsgroup, and new to XML. We receive documents in XML, and I am trying to tear them apart to obtain information. I decided that, for my purposes, it would be fairly easy to write a simple XML parser, which it was. But now suddenly I find that some of the information I need is in the form of a Processing Instruction, and not tagged in the usual way. So I get information like this:
0
1461
by: Bing | last post by:
Hi there, I am using the DB2 universal JDBC driver type 4 to insert BLOBs into a DB2 database. The Method I used for supplying the BLOB data value is setBinaryStream(). Everything works fine as long as the binary data is less than or equal to 100k. Anything larger than that (even for one byte) will result an exception saying the value is too large. All the DB2 samples (at least two)I have found have a limit of 100k (magic number!!!),...
2
20740
by: Fatih BOY | last post by:
Hi, I want to send a report from a windows application to a web page like 'report.asp' Currently i can send it via post method with a context like local=En&Username=fatih&UserId=45&Firm=none But the problem occures when i want to send a data with & sign (i.e: Firm=F&B). I try to solve this problem with using boundary, but i failed. Any idea!?
7
17292
by: Mark Waser | last post by:
Hi all, I'm trying to post multipart/form-data to a web page but seem to have run into a wall. I'm familiar with RFC 1867 and have done this before (with AOLServer and Tcl) but just can't seem to get it to work in Visual Basic. I tried coding it once myself from scratch and then modified a class that I found on a newsgroup (referenced below). Both seem to be doing the same thing and neither works (or rather, they seem to work but the...
14
3272
by: Steve Teeples | last post by:
I don't understand why I cannot use a property to modify data within a struct. Can someone tell me why I get the error "Cannot modify the return value of "myData.TheData" because it is not a variable. Here is what breaks. struct Data { public Data(){} private int someData;
15
33359
by: tmax | last post by:
PHP Pros: I have a simple html form that submits data to a php script, which processes it, and then redisplays the same page, but with a "thank you" message in place of the html form. This is all working fine. However, when refresh the browser, I get the following message displayed: "The page you are trying to view contains POSTDATA. If you resend the data, any action the form carried out (such as as search or online purchse) will...
5
4252
by: Eric Cadwell | last post by:
Is there a faster way to write the last 100K of a large file? This code takes almost two minutes to run on my machine. int buffer = 100000; int length = 2000000000; string file = @"C:\test.txt"; if (File.Exists(file)) File.Delete(file);
5
3549
by: Charlie King | last post by:
I'm trying to send data to a remote script (a credit card processing third party) from my site using POST. Currently, I'm doing it using the ususal form dynamically built with my values. This is less than ideal because I want to perform local processing (updating order status in the local database) and then to proceed to the remote script, with resultant values, without relying on the user pressing a button.
0
8861
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8778
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8636
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7375
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4351
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2764
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.