- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Without optimization, I would like to know if there is a way to make a small size .obj.
If I optimize it, it will be difficult to debug.
Without optimization, I want to make a small size .obj.
Platform : Windows x64
The results of the survey are as follows.
- I was able to make a small size .obj by the following method.
Do not specify /Od
The number of bytes of .obj created by compiling a source.
Compilation Option and .obj-size(bytes)
/Od Yes No
-----------------------------------------
ifort 19 19,989 *a 8,697
ifort 2021 19,943 8,792
ifx 2024 271,474 *b 10,996 *c
- Considering changing iFort to ifx.
Until now, it was *a.
In ifx, if /OD is specified, *b is obtained
In ifx, if /OD is not specified, *c is obtained
- I compiled with /Od and /nodebug, but the size of .obj was the same as when /Od was specified.
- Size of .exe linked with other .obj and .lib.
*a 86,597Kbytes
*b 184,088Kbytes (huge)
*c 81,290Kbytes
- If /Od is not specified, The size of the obj will be smaller.
I'm guessing that the optimization default, /O2, will be specified.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
" I would like to know if there is a way to make a small size .obj"
Why? Does it matter?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Even if it's 64-bit, Less memory means faster response times.
Since the data to be handled is large, we want to make the program as small as possible.
I think it's an important issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If (when) "size matters", compile the fully debugged sections of code with optimizations enabled, and compile the necessary source files with no optimizations and debugging enabled.
In MS VS Solution Explorer, right-click on a source file, then set the specific compiler optimizations for that file.
Not, it is often beneficial to add a configuration
Debug - Full debug
Release - Full Release
ReleaseDebug - mostly Release, some Debug
...
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I understand what is being said.
I'm experiencing a bug in the optimization with another compiler that isn't an Intel compiler.
Because of that, I want to use it without optimizing it.
I understand that ifort and ifx have different compilers, so the object files are different.
However, since the ifx object is more than 10 times larger than the ifort,
I would like to know if there is a way to make a small size .obj of ifx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does the ifx debug build have array bounds checking enabled and ifort not?
To a lesser extent does the ifx debug build have uninitialized variable checking enabled and ifort not?
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The options specified for ifort and ifx are the same.
/fpp /c /Od /D_WIN64 /Qm64 /warn:declarations /warn /Qsave /GS /nogen-interfaces
I checked the options in /help, but I couldn't find any description that the default had changed.
I'd like to know which option you are talking about.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would be very useful if you could attach a small source file that demonstrates the problem. By any chance does this source declare large arrays with initialization?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attach the source files next week.
(I'm going out on a business trip from now on.)
The source in question does not declare large arrays.
The largest one is INTEGER*8 ARRAY(16).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm very, very sorry for the delay.
From the original object tendencies, I created a simple source.
ODSIZE_00.f
ODSZIE_01.f
OD_ALIAS.h
The differences between ODSIZE_00.f and ODSIZE_01.f are as follows:
ODSIZE_00.f(6): C#include "OD_ALIAS.h"
ODSIZE_01.f(6): #include "OD_ALIAS.h"
In OD_ALIAS.h, "!DIR$ ALIAS" is described in 100 lines.
However, these 100 are symbol names that are not referenced in the source file.
The compile options were specified as follows:
/fpp /c /Od /I. /D_WIN64 /Qm64 /warn:declarations /warn /Qsave /GS /nogen-interfaces
(Windows x64)
The file size of the created .obj is as follows:
ODSIZE_00.f ODSZIE_01.f
ifort 2021 1,324 bytes 1,324 bytes
ifx 2024 1,590 bytes 5,023 bytes
When I check the .obj with dumpbin, "RAW DATA #5" is replaced by "!DIR$ALIAS".
Information about the system I'm developing.
- The system is created in Fortran and C.
- A single source file allows for 32-bit and 64-bit compilation.
- "!DIR$ ALIAS" is used to replace the symbol name.
- More than 6,000 "!DIR$ ALIAS" are registered in the include files used by all sources.
Therefore, in some source files, "!DIR$ ALIAS" is also described as unreferenced.
If I don't specify the compile option "/Od" (i.e. "/O2"), then The file size of .obj is as follows:
ODSIZE_00.f ODSZIE_01.f
ifort 2021 1,132 bytes 1,132 bytes
ifx 2024 1,409 bytes 1,409 bytes
I'm wondering if the unused information for "DIR$ALIAS" is left if I specify "/Od".
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page