- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't know what Intel plans are for IVF. My usual methods are
Compile .F90 file with optimizations as desired and produce/keep assembler file.
Edit assembler file as desired.
Exclude .f90 source file from build
Add the .asm file to build (so repeated edits will compile)
The above is for inline code.
For out of line code the argument passing may vary so I might use a shell .F90 subroutine/function to generate the firs cut of the .ASM file.
Or write the subroutine/function in C++
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![Smiley with tongue out [:-P]](/isn/Community/en-US/emoticons/emotion-4.gif)
There are other situations where inline Assembler code is useful. I hope the good folks at Intel listen.
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Could you suggest to the development team that some C-like intrinsics would be welcome in IVF. An example of whichis MFENCE. It would be nice not to have to call a C/C++ function to perform such an operation. It wouldn't hurt for both compiler teams to get together to discuss the intrinsics adopted by C/C++ and the motivations for doing so.
Jim
- 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
Would you consider it a hack to make program statements perform as intended or would you consider it a hack to CALL an external subroutine to make program statements perform as intended?
Consider an example that is not too unrealistic. Let's say a multi-threaded application written WITHOUT OpenMP where you wish, as an example, store data into a buffer, then write an indicator into a flag variable. It is a requirement to assure that the all the data is written into the buffer (through to RAM)_prior_ to the flag being written (through to RAM). To accomplish this, placing an MFENCE between the last write of the buffer data and the writting of the buffer full flag would suffice.
Since an MFENCE intrinsic is not available one must resort to performing a CALL to C function to perform the MFENCE, or call an alternate function that has the side effect of performing the MFENCE.
Note, when compiling WITH OpenMP you have available the compiler directive !$OMP FLUSH var which is intended to provide this type of functionality. But unfortunately this results in the calling of a function the mearly returns. i.e. there is no fencing operation. A waste of processor time to perform a call to a no-op subroutine.
Note, the testing of !$OMP FLUSH may have tended to pass your test suite due to introducing a delay but it does not specifically cause a flush/fencing operation and thus fails occasionally in my applications. What !$OMP FLUSH does do is assure registerized variables are written, but in this case written means into the cache and not through to RAM, and not with regard to sequencing. Writes to RAM are not assured to occure in the order in which the instructions appeared to have been execuited (i.e. in the order in which the instruction fetch occured).
There is also a similar problem with !$OMP ATOMIC not working correctly all the time. (It works correctly most of the time, like while you are trying to debug a failure).
Yes, this was reported several years ago, no fix, I quit bothering myself with pushing this issue as I use other means to assure the consistency of the memory.
I don't have my heart set on Intel introducing intrinsic functions.
That said, an intrinsic function is NOT part of the Fortran standard. An intrinsic function can be a vendor supplied library function, but where the vendor's compiler knows what is in the function and therefore can place the equivilent functionality in-line.
Jim Dempsey

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page