- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a piece of code that was written that requires the /4R16 compile option to run correctly. There is now another user that needs to use this code but he has the Intel Visual Fortran compiler connected to Matlab and runs through there. The problem is that we can't figure out how to set the /4R16 compile option in that environment. Does anyone have any ideas on this?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/4R16? That looks like a Microsoft Fortran PowerStation option in syntax but FPS never had that - /4R8, yes.
This would be Fortran > Data > Default Real Kind > 16
I suggest you triple-check that that's what you really want. I have a hard time believing that MATLAB would use this.
This would be Fortran > Data > Default Real Kind > 16
I suggest you triple-check that that's what you really want. I have a hard time believing that MATLAB would use this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
/4R16? That looks like a Microsoft Fortran PowerStation option in syntax but FPS never had that - /4R8, yes.
This would be Fortran > Data > Default Real Kind > 16
I suggest you triple-check that that's what you really want. I have a hard time believing that MATLAB would use this.
This would be Fortran > Data > Default Real Kind > 16
I suggest you triple-check that that's what you really want. I have a hard time believing that MATLAB would use this.
I have Visual Studio 2005 Profesional Edition with Intel Visual Fortran V10. I had a problem with the MOD statement giving me the wrong answer. At first I thought it was a bug in the compiler so I reported it to Intel Premier Support and they were the ones who told me to use the /4R16 compile option. Well that worked and I now get the correct answer from MOD(2e7,3.1).
I just double checked and yes the /4R8 option does work. So how do we use/set this option for the Intel Visual Fortran compiler when it is inside of Matlab?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't help with "inside Matlab". But let me suggest that you have unreasonable expectations from MOD(2e7,3.1). 2e7 is a single-precision value good to only about six decimal digits. You're already losing precision with a value as large as 2E7. If you want this to be double precision, rather than elevating all reals to double (which you can do with the /real_size:64 option from the command line), write it as MOD(3D7,3.1D0) instead. That will get you double precision for this computation.

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