- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
From the Intel Fortran for Windows 9 documentation it sounds like -Qzero only guaranteees that scalars are zero initialized but my small test programs make it appear that arrays in main and subprograms are also being zero-initialized. In fact this seems to happen without -Qzero unless I use -automatic. I'd love to know what the guaranteed and actual behavior are wrt zero initialization and if there is any switch for getting local arrays zero initialized.
We are migrating some VAX FORTRAN applications that exploit the default zero initialization that the VAX (but not AXP!) did for scalars and, I believe, arrays along with the implicit SAVE. Until the explicit initializations can be added we need to emulate the VAX behavior as closely as possible. Any suggestions would be great.
Our debug build switches are:
-vms -f77rtl -intconstant -Qansi_alias- -Qcommon_args -Qsave -Qzero -align:dcommons -align:norecords -warn:general -warn:nodeclarations -warn:nounused -warn:nouncalled -check:all -Gs0 -Qfpstkchk -Qtrapuv -debug -traceback -Od
Thanks!
From the Intel Fortran for Windows 9 documentation it sounds like -Qzero only guaranteees that scalars are zero initialized but my small test programs make it appear that arrays in main and subprograms are also being zero-initialized. In fact this seems to happen without -Qzero unless I use -automatic. I'd love to know what the guaranteed and actual behavior are wrt zero initialization and if there is any switch for getting local arrays zero initialized.
We are migrating some VAX FORTRAN applications that exploit the default zero initialization that the VAX (but not AXP!) did for scalars and, I believe, arrays along with the implicit SAVE. Until the explicit initializations can be added we need to emulate the VAX behavior as closely as possible. Any suggestions would be great.
Our debug build switches are:
-vms -f77rtl -intconstant -Qansi_alias- -Qcommon_args -Qsave -Qzero -align:dcommons -align:norecords -warn:general -warn:nodeclarations -warn:nounused -warn:nouncalled -check:all -Gs0 -Qfpstkchk -Qtrapuv -debug -traceback -Od
Thanks!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no option that guarantees zero-initialization of arrays. My advice is to add such initialization to your code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. I wish that were practical but given that there are thousands of them we can't do them all within the available time.
Stuart
Stuart
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