- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When use icpc, fread only properly reads files less than about 2.05 GB in length. Below that limit, it correctly places the elements into the array, but above that, it fills the array with zeros. Was fread updated to be 64-bit compliant? It seems not. I have the same problem when I compile with gcc-4.2 as well. See below for the icpc version
sh-3.2$ icpc -V
Intel C++ Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20090827 Package ID: m_cproc_p_11.1.067
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
30 DAY EVALUATION LICENSE
sh-3.2$ icpc -V
Intel C++ Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20090827 Package ID: m_cproc_p_11.1.067
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
30 DAY EVALUATION LICENSE
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - rfrazinumich.edu
When use icpc, fread only properly reads files less than about 2.05 GB in length. Below that limit, it correctly places the elements into the array, but above that, it fills the array with zeros. Was fread updated to be 64-bit compliant? It seems not. I have the same problem when I compile with gcc-4.2 as well.
rpm -qa glibc
If a problem report is made against icc on premier.intel.com, preferably with a simple test case, it should go to a glibc expert.
As you haven't shown an example, I would note that fread works with size_t data types, but 32-bit legacy programmers would probably use int, and that would account for such a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
use -mcmodel=medium or -mcmodel-large to change the memory model.
default is -mcmodel=msmall.
Jennifer
default is -mcmodel=msmall.
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
.............................
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess Jennifer's point would be that you couldn't make a static array bigger than that without setting the memory model. A malloc or new array ought to be OK with default memory model.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page