View previous topic :: View next topic |
Author |
Message |
StamK
Joined: 12 Oct 2016 Posts: 159
|
Posted: Wed Aug 16, 2017 12:09 pm Post subject: _SetMaximumIOBufferSize error |
|
|
I am currently getting the following error:
Within file CLEARWIN64.DLL In _SetMaximumIOBufferSize
I haven't tested this exact version in 32bit (as quite a few changes to be done).
Is this error too generic, or is there something I can start looking for? |
|
Back to top |
|
|
StamK
Joined: 12 Oct 2016 Posts: 159
|
Posted: Wed Aug 16, 2017 3:38 pm Post subject: |
|
|
If I run a pure Fortran application, this doesn't happen - but if I start a C++ Qt executable which calls this Fortran application as a DLL, then it happens.
Perhaps a case of increasing a buffer size somewhere? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Wed Aug 16, 2017 4:12 pm Post subject: |
|
|
Can you provide sample code that demonstrates this failure? |
|
Back to top |
|
|
StamK
Joined: 12 Oct 2016 Posts: 159
|
Posted: Wed Aug 16, 2017 4:48 pm Post subject: |
|
|
I would have to share the whole code - perhaps Robert could send me a test version of CLEARWIN64.dll with a very large buffer size (related to SetMaximumIOBufferSize) just to see if the problem goes away?
Thanks |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Wed Aug 16, 2017 5:11 pm Post subject: |
|
|
The default buffer size is 32767 and this can be increased by a call to SET_MAXIMUM_IO_BUFFER_SIZE@ at the start of the program.
Code: | C_EXTERNAL SET_MAXIMUM_IO_BUFFER_SIZE@ '__SetMaximumIOBufferSize' (VAL)
|
Code: | extern void SetMaximumIOBufferSize(int) "__SetMaximumIOBufferSize";
|
|
|
Back to top |
|
|
StamK
Joined: 12 Oct 2016 Posts: 159
|
Posted: Wed Nov 29, 2017 4:26 pm Post subject: |
|
|
Thanks for this. I tried increasing it to a very large size but I am still getting the same error.
It appears consistently (i.e. I can reproduce it in specific instances), but it happens on various, unrelated parts of the code. I need to upload a rather large part of code and I will contact Robert (as C++ clearwin64 and c++ related) about this.
Thanks |
|
Back to top |
|
|
StamK
Joined: 12 Oct 2016 Posts: 159
|
Posted: Wed Nov 29, 2017 5:27 pm Post subject: |
|
|
Wanted to add that I also used GlobalMemoryStatus@ to check max memory that the process can commit. I compared what happens when it is Qt->Qt dll->fortran dll, and Fortran->Qt dll->Fortran dll, but there was no significant difference, so the bug is more subtle than Qt taking up more memory than Fortran. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Thu Nov 30, 2017 8:05 pm Post subject: |
|
|
I see SET_MAXIMUM_IO_BUFFER_SIZE@ is a new addition in v8.2 .
Are there specific ideas/reasons/uses which have encouraged it's inclusion ? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Thu Nov 30, 2017 10:37 pm Post subject: |
|
|
The documentation is not strictly accurate.
The subroutine already existed in salflibc.dll and clearwin64.dll. It was already exported by salflibc.dll but was not exported by clearwin64.dll.
With 8.20 this subroutine is now also exported by clearwin64.dll.
This omission became apparent as a result of the above discussion.
As far as I know the subroutine was previously undocumented and possibly never used nor needed. |
|
Back to top |
|
|
|