Dear all,
I have a question. Is there any fast way to deallocate a linked list or I have to to it manually?
A sort of DEALLOCATE(linkedlistname)
Thanks a lot
Dear all,
I have a question. Is there any fast way to deallocate a linked list or I have to to it manually?
A sort of DEALLOCATE(linkedlistname)
Thanks a lot
Hello,
Does DCOPY have some lenght limit? In my fortran code I copy a 65000x2000 matrix using this subroutine, and I think that it is generating some problems in my results.
Thanks!
The legacy application that I am porting from g77 to Intel Fortran has many tests of the form:
IF (INTEGER_VAR)
and, since the FORTRAN is generated by RATFOR, many more tests of the form
IF (.NOT.(INTEGER_VAR)) CONTINUE . . .
I would like to detect these with a compiler warning, but even '-warn all' does not flag these. Is there a flag that I can use?
Side note: g77 detects these by default, but not when the -fugly flag is used. And when you use that flag, it looks like some of the tests are executed incorrectly.
Thanks,
Jay
I'm upgrading an application to allow for dynamically-loaded DLLs created by the user. (I'm basing it on the DynamicLoad Intel example). For my case, one of the arguments to the main subroutine that will be required in the DLL is a derived type. A dumbed-down example is below:
type :: mytype integer :: i = 0 character(len=:),allocatable :: name type(mytype),pointer :: next => null() end type mytype
Note that it contains an allocatable character string, which is not interoperable with C, based on my understanding. It also contains pointers that are used to construct a linked list. The mytype dummy argument for the DLL routine is also a pointer. My questions are:
1. Is it OK to have DLLs on Windows with derived types arguments that contain variables that aren't C-interoperable?
2. Should I include a SEQUENCE statement in this type? It seems to work with or without it.
3. I presume the DLL can only be written in Fortran, unless I were to refactor the type to use interoperable character arrays and c_ptr's? As it is now, would it work with any Fortran compiler, or would it have to be Intel?
4. Is it enough to publish the mytype declaration, and have the user declare it themselves within their DLL? Is that a problem that the type is defined twice (once in my main program and once in their DLL)? Does SEQUENCE make this OK? Or, would BIND(C) make this OK?
Any help would be appreciated! Thanks in advance!
Hi,
1) I'm relative new to Fortran and I have a series of questions to fortran that may
seem very simple to your experts. I'm aware that this line of questions may seem
inappropiate for this forum in the meaning "too simple". If you believe this is true,
can you guide me to another forum where I can ask this line of questions?
2) If I'm calling a subroutine or a Function within another subroutine or function; should
I then make an interface/End interface section in each subroutine/function from which I'm
calling a another subroutine/function?
3) I have made a simple .F90 file with a number of functions and subroutines. Is it possible to have
several .F90 files and then call these subroutines/functions from the different .F90 files? For instance,
to call FunctionB in file2.F90 from FunctionA in file1.F90 ?
Hi,
I am trying to create a routine that launches an application from within my
code. However, in certain conditions (unfortunately not all of them avoidable),
the external application goes non-responsive and I'm having problems in
terminating it.
I appologise for any over-simplified or incorrect terminology, but I'm not
a programmer, I'm an engineer, more comfortable with equations and numbers than
codes, and I'm learning Fortran on the go, only as the necessity appears :)
I'll explain a bit what I'm trying to do.
The external application (XFOIL.exe) is launched in batch mode. I've set the
path to the batch file in a CHARACTER variable:
CHAR = 'C:\WingOptim\xfoilrun.bat'
Next, I create the new process for the XFOIL executable:
STARTUPINFO = T_STARTUPINFO(SIZEOF(STARTUPINFO), &
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
RET = CREATEPROCESS (CHAR, &
'"'//CHAR//'" -CHILD'C, &
NULL_SECURITY_ATTRIBUTES, &
NULL_SECURITY_ATTRIBUTES, &
FALSE, &
0, &
NULL, &
NULL_CHARACTER, &
STARTUPINFO, &
PROCESSINFO)
Finally, after a time that should be more than enough for normal execution,
I close the process and the associated handles.
RET = WAITFORSINGLEOBJECT (PROCESSINFO%HPROCESS, &
20000)
RET = CLOSEHANDLE (PROCESSINFO%HTHREAD)
RET = CLOSEHANDLE (PROCESSINFO%HPROCESS)
RET = TERMINATEPROCESS (PROCESSINFO%HPROCESS, &
JM_EXIT_CODE)
However, there are certain situations when the XFOIL application goes non-
responsive, as I've already mentioned.
The problem that I have is that when this happens, even though control is
transfered back to my main code and its execution continues, a certain
"residual" image of the XFOIL.EXE process remains open in my Windows task list.
If the non-responsive scenario happens several times, each time a new residual
process is created, and slowly my CPU load increases to the point where the
execution of my code becomes impossible (each XFOIL.exe residual eating 25%
of CPU maximum load).
I've also tried to forcefully close XFOIL.exe by passing the taskkill command
to the system. While my XFOIL process is open, i get its ID:
PID = PROCESSINFO%DWPROCESSID
Then, I pass the command to the system:
WRITE (STRING,110) PID
110 FORMAT ('TASKKILL /F /PID ', I5)
RESULT = SYSTEM(STRING)
However, this has no extra effect, and residuals keep building up.
The only way I found to close the residual processes is to manually force them
to close from the task list of the Windows Task Manager. However, this is not
feasible because the execution time of my code is long (a couple of days).
Can anyone point me in the right direction?
Thanks,
Oliviu
Cause:
A function call inside the loop is preventing auto-vectorization.
Example:
Program foo implicit none integer, parameter :: nx = 100000000 real(8) :: x, xp, sumx integer :: i interface real(8) function bar(x, xp) real(8), intent(in) :: x, xp end end interface sumx = 0. xp = 1. do i = 1,nx x = 1.D-8*real(i,8) sumx = sumx + bar(x,xp) enddo print *, 'Sum =',sumx end real(8) function bar(x, xp) implicit none real(8), intent(in) :: x, xp bar = 1. - 2.*(x-xp) + 3.*(x-xp)**2 - 1.5*(x-xp)**3 + 0.2*(x-xp)**4 bar = bar / sqrt(x**2 + xp**2) end
LOOP BEGIN at foo.f90(18,5)
remark #15543: loop was not vectorized: loop with function call not considered an optimization candidate. [ foo.f90(17,22) ]
LOOP END
Resolution:
real(8) function bar(x, xp) !$OMP DECLARE SIMD (bar) UNIFORM(xp) implicit none real(8), intent(in) :: x, xp bar = 1. - 2.*(x-xp) + 3.*(x-xp)**2 - 1.5*(x-xp)**3 + 0.2*(x-xp)**4 bar = bar / sqrt(x**2 + xp**2) end
remark #15301: FUNCTION WAS VECTORIZED [ bar.f90(1,18) ]
remark #15344: loop was not vectorized: vector dependence prevents vectorization. First dependence is shown below. Use level 5 report for details
remark #15346: vector dependence: assumed OUTPUT dependence between line 17 and line 18
LOOP END
Program foo implicit none integer, parameter :: nx = 100000000 real(8) :: x, xp, sumx integer :: i interface real(8) function bar(x, xp) !$OMP DECLARE SIMD (bar) UNIFORM(xp) real(8), intent(in) :: x, xp end end interface sumx = 0. xp = 1. !$OMP SIMD private(x) reduction(+:sumx) do i = 1,nx x = 1.D-8*real(i,8) sumx = sumx + bar(x,xp) enddo print *, 'Sum =',sumx end
LOOP BEGIN at foo.f90(17,5)
remark #15301: OpenMP SIMD LOOP WAS VECTORIZED
LOOP END
The loop is now vectorized successfully; running and timing the program shows a speedup.
Note that if the DECLARE SIMD directive is omitted, the !$OMP SIMD directive will still cause the remaining parts of the loop in foo to be vectorized, but the call to bar() will be serialized, so any performance gain is likely to be small. In either case, the private and reduction clauses of this directive are mandatory; without them, the compiler will assume no loop-carried dependencies and results may be incorrect.
Just wanted to verify what the precedence order is on compiler flags for the intel compilers is.
is the precedence that the last flag specified on the command line the one that wins?
I simply want to generate a binary that optimization level 3 "-O3" but that also includes debug symbols. "-g"
Will "-g -O3" do the trick?
Thanks
Rene
I currently have Microsoft Visual Studio 2008 installed with Intel FORTRAN 11.1 and have projects with that setup. I am setting up Microsoft Visual Studio 2013 with Visual FORTRAN Composer XE 2013. The FORTRAN installer seems to indicate that it will add the new FORTRAN to Visual Studio 2008 which I do not want. How do I keep my old configuration for Visual Studio 2008 and only add the new FORTRAN to Visual Studio 2013?
Any assistance would be greatly appreciated.
Dear Sir/Madam,
I would like to know whether can I extract data from f90sql using java? If yes what should i need to do please suggest me. Thanks in advance.
Regards,
Neha
with below command to build part of scipy failed:
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\amd64\link.exe" /DLL /LIBPATH:S:\sc\EEsofTools\Windows\vs2012\win32_64\python\2.7.3\win32_64\release\python\PCbuild\amd64 /LIBPATH:S:\sc\EEsofTools\Windows\vs2012\win32_64\python\2.7.3\win32_64\release\python\libs /LIBPATH:"C:\Program Files (x86)\Intel\Composer XE 2015\compiler\lib\intel64" /LIBPATH:S:\sc\EEsofTools\Windows\vs2012\win32_64\scipy\scipy-0.11.0\build\temp.win-amd64-2.7 dfftpack.lib fftpack.lib /EXPORT:init_fftpack build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\scipy\fftpack\_fftpackmodule.obj build\temp.win-amd64-2.7\Release\scipy\fftpack\src\zfft.obj build\temp.win-amd64-2.7\Release\scipy\fftpack\src\drfft.obj build\temp.win-amd64-2.7\Release\scipy\fftpack\src\zrfft.obj build\temp.win-amd64-2.7\Release\scipy\fftpack\src\zfftnd.obj build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\scipy\fftpack\src\dct.obj build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\scipy\fftpack\src\dst.obj build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\fortranobject.obj /OUT:build\lib.win-amd64-2.7\scipy\fftpack\_fftpack.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\scipy\fftpack\_fftpack.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\scipy\fftpack\_fftpack.pyd.manifest
Error Message:
_fftpackmodule.obj : warning LNK4197: export 'init_fftpack' specified multiple times; using first specificatio
n
Creating library build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\scipy\fftpack\_fftpack.lib and ob
ject build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\scipy\fftpack\_fftpack.exp
zfft.obj : error LNK2019: unresolved external symbol zfftf_ referenced in function zfft
zfft.obj : error LNK2019: unresolved external symbol zfftb_ referenced in function zfft
zfft.obj : error LNK2019: unresolved external symbol zffti_ referenced in function get_cache_id_zfft
zfft.obj : error LNK2019: unresolved external symbol cfftf_ referenced in function cfft
zfft.obj : error LNK2019: unresolved external symbol cfftb_ referenced in function cfft
zfft.obj : error LNK2019: unresolved external symbol cffti_ referenced in function get_cache_id_cfft
drfft.obj : error LNK2019: unresolved external symbol dfftf_ referenced in function drfft
drfft.obj : error LNK2019: unresolved external symbol dfftb_ referenced in function drfft
drfft.obj : error LNK2019: unresolved external symbol dffti_ referenced in function get_cache_id_drfft
drfft.obj : error LNK2019: unresolved external symbol rfftf_ referenced in function rfft
drfft.obj : error LNK2019: unresolved external symbol rfftb_ referenced in function rfft
drfft.obj : error LNK2019: unresolved external symbol rffti_ referenced in function get_cache_id_rfft
dct.obj : error LNK2019: unresolved external symbol costi_ referenced in function get_cache_id_dct1
dct.obj : error LNK2019: unresolved external symbol cost_ referenced in function dct1
dct.obj : error LNK2019: unresolved external symbol cosqi_ referenced in function get_cache_id_dct2
dct.obj : error LNK2019: unresolved external symbol cosqb_ referenced in function dct2
dct.obj : error LNK2019: unresolved external symbol cosqf_ referenced in function dct3
dct.obj : error LNK2019: unresolved external symbol dcosti_ referenced in function get_cache_id_ddct1
dct.obj : error LNK2019: unresolved external symbol dcost_ referenced in function ddct1
dct.obj : error LNK2019: unresolved external symbol dcosqi_ referenced in function get_cache_id_ddct2
dct.obj : error LNK2019: unresolved external symbol dcosqb_ referenced in function ddct2
dct.obj : error LNK2019: unresolved external symbol dcosqf_ referenced in function ddct3
dst.obj : error LNK2019: unresolved external symbol sinti_ referenced in function get_cache_id_dst1
dst.obj : error LNK2019: unresolved external symbol sint_ referenced in function dst1
dst.obj : error LNK2019: unresolved external symbol sinqi_ referenced in function get_cache_id_dst2
dst.obj : error LNK2019: unresolved external symbol sinqb_ referenced in function dst2
dst.obj : error LNK2019: unresolved external symbol sinqf_ referenced in function dst3
dst.obj : error LNK2019: unresolved external symbol dsinti_ referenced in function get_cache_id_ddst1
dst.obj : error LNK2019: unresolved external symbol dsint_ referenced in function ddst1
dst.obj : error LNK2019: unresolved external symbol dsinqi_ referenced in function get_cache_id_ddst2
dst.obj : error LNK2019: unresolved external symbol dsinqb_ referenced in function ddst2
dst.obj : error LNK2019: unresolved external symbol dsinqf_ referenced in function ddst3
build\lib.win-amd64-2.7\scipy\fftpack\_fftpack.pyd : fatal error LNK1120: 32 unresolved externals
How to solve it?
Thanks for your suggestion.
I use command to build numpy first:
python %MYPWD%/%NUMPY_VER%/setup.py config --compiler=msvc build_clib --compiler=msvc build_ext
the site.cfg content is:
[mkl]
library_dirs = C:\Program Files (x86)\Intel\Composer XE 2015\mkl\lib\intel64
include_dirs = C:\Program Files (x86)\Intel\Composer XE 2015\mkl\include
mkl_libs = mkl_rt
lapack_libs =
Then I build scipy with command:
python %MYPWD%/%SCIPY_VER%/setup.py config --compiler=msvc build_clib --compiler=msvc build_ext
It failed with message:
_fftpackmodule.obj : warning LNK4197: export 'init_fftpack' specified multiple times; using first specificatio
n
Creating library build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\scipy\fftpack\_fftpack.lib and ob
ject build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\scipy\fftpack\_fftpack.exp
zfft.obj : error LNK2019: unresolved external symbol zfftf_ referenced in function zfft
zfft.obj : error LNK2019: unresolved external symbol zfftb_ referenced in function zfft
zfft.obj : error LNK2019: unresolved external symbol zffti_ referenced in function get_cache_id_zfft
zfft.obj : error LNK2019: unresolved external symbol cfftf_ referenced in function cfft
zfft.obj : error LNK2019: unresolved external symbol cfftb_ referenced in function cfft
zfft.obj : error LNK2019: unresolved external symbol cffti_ referenced in function get_cache_id_cfft
drfft.obj : error LNK2019: unresolved external symbol dfftf_ referenced in function drfft
drfft.obj : error LNK2019: unresolved external symbol dfftb_ referenced in function drfft
drfft.obj : error LNK2019: unresolved external symbol dffti_ referenced in function get_cache_id_drfft
drfft.obj : error LNK2019: unresolved external symbol rfftf_ referenced in function rfft
drfft.obj : error LNK2019: unresolved external symbol rfftb_ referenced in function rfft
drfft.obj : error LNK2019: unresolved external symbol rffti_ referenced in function get_cache_id_rfft
dct.obj : error LNK2019: unresolved external symbol costi_ referenced in function get_cache_id_dct1
dct.obj : error LNK2019: unresolved external symbol cost_ referenced in function dct1
dct.obj : error LNK2019: unresolved external symbol cosqi_ referenced in function get_cache_id_dct2
dct.obj : error LNK2019: unresolved external symbol cosqb_ referenced in function dct2
dct.obj : error LNK2019: unresolved external symbol cosqf_ referenced in function dct3
dct.obj : error LNK2019: unresolved external symbol dcosti_ referenced in function get_cache_id_ddct1
dct.obj : error LNK2019: unresolved external symbol dcost_ referenced in function ddct1
dct.obj : error LNK2019: unresolved external symbol dcosqi_ referenced in function get_cache_id_ddct2
dct.obj : error LNK2019: unresolved external symbol dcosqb_ referenced in function ddct2
dct.obj : error LNK2019: unresolved external symbol dcosqf_ referenced in function ddct3
dst.obj : error LNK2019: unresolved external symbol sinti_ referenced in function get_cache_id_dst1
dst.obj : error LNK2019: unresolved external symbol sint_ referenced in function dst1
dst.obj : error LNK2019: unresolved external symbol sinqi_ referenced in function get_cache_id_dst2
dst.obj : error LNK2019: unresolved external symbol sinqb_ referenced in function dst2
dst.obj : error LNK2019: unresolved external symbol sinqf_ referenced in function dst3
dst.obj : error LNK2019: unresolved external symbol dsinti_ referenced in function get_cache_id_ddst1
dst.obj : error LNK2019: unresolved external symbol dsint_ referenced in function ddst1
dst.obj : error LNK2019: unresolved external symbol dsinqi_ referenced in function get_cache_id_ddst2
dst.obj : error LNK2019: unresolved external symbol dsinqb_ referenced in function ddst2
dst.obj : error LNK2019: unresolved external symbol dsinqf_ referenced in function ddst3
build\lib.win-amd64-2.7\scipy\fftpack\_fftpack.pyd : fatal error LNK1120: 32 unresolved externals
Please give me your suggestion if you have experience about this. Thanks
Hi
the problem is that How can i increase a (Fortran) allocated array size in a program?
in program like this:
... real(8), allocatable, dimension(:) :: x ... ! programs body N=100 allocate(x(N)) ... N=150 allocate(x(N)) ! but this is an error
there is two approach
First: using move_alloc
Second: using x=[x,(x(1),i=1,j-size(x))]
but x can be a class type array in bellow program you can see usage of two approaches in two loops.
I compare every approach for time cost and see second takes more time.
as Steve point that: in 2nd approach because x is used on both sides of the assignment, the compiler has to create a temporary for the array constructor before assigning to the left side, thus two copies. I don't see any good way to avoid a copy as it's very unlikely that the space after the existing array is unallocated. You can avoid making two copies, though, with suitable use of MOVE_ALLOC and initializing only the expanded elements.
!$ cat program realloc use iso_fortran_env, only : real64 implicit none integer :: i,N,j integer, parameter :: wp=real64 type math real(wp) :: x1 real(wp) :: y1 end type type(math), allocatable, dimension(:) :: h, temp N=10 allocate(h(N)) h(:)%x1 = 1. h(:)%y1 = 2. do j=N, 100000 ! this loop takes 110 s (using GNU FORTRAN)
allocate(temp(j)) temp(1:size(h)) = h call move_alloc(temp, h) h(:)%x1 = 1. h(:)%y1 = 2. !print *,"size(h)=",size(h) end do do j=N, 100000 ! this loop takes 160 s (using GNU FORTRAN) h = [h,(h(1),i=1,j-size(h))] h(:)%x1 = 1. h(:)%y1 = 2. !print *,"size(h)=",size(h) end do end program
so question: Intel(R) Visual Fortran Compiler XE 13.1.0.149 can run second approach but the dimension does not increase without any error.
and second approach is not really suitable? is really move_alloc the best way? does it works using pointer and somethings?
Thanks
Hi everyone,
I've received a program that seems to work correctly on windows 7 (code block+fortran)
I've ran it on windows xp (vitrual machine), i've got these errors.
1) forrt1: severe 29: file not found, unit 50
I've made some changes in the OPEN instruction, then I've got that new error message
2)forrt1: severe 24: end -of-file during read, unit 50
I've tried to use debugger and now the error message i get is " user break point from code at 0*7c90120e"
I've n idea how to fix it; can anyone help me.
I've installed a virtual windows xp machine on my windows 7. And i work with developer studio. My code was written in f90.
Thank u
Steve, Colleagues:
For an OpenMP parallel-do loop, I would like an array to be either private or shared, depending on a determination that includes an assessment of its size and the computational work required to determine its values. If the amount of work involved is large, I want to determine the array contents before I drop into the parallelized loop. In other circumstances, it's better to have a private copy of the array, and do the work in each loop iteration. Is there a way to make OpenMP clauses conditional? I could duplicate the code of the entire loop in two if-clauses, the branching depending on the assessment of the array in question, but it seems like poor craftsmanship.
David
I am using Fortran Compiler XE 15.0.1.148 .
When I compile and run the following simple program in Debug mode, it runs fine without any errors or warnings. However, it crashes if I compile it in optimized Release mode. I can prevent it from crashing if I disable the /Qopenmp option. My guess is that the problem has something to do with having a derived type variable declared as private in OpenMP loop.
program test_derived_type implicit none type T integer,allocatable:: a(:) end type T type(T):: b integer i, s s = 0 !$OMP parallel do default(none), schedule(dynamic), & !$OMP& private(i,b), reduction(+:s) do i = 1, 100 print*, i allocate( b%a(i) ) b%a = 1 s = s + sum(b%a) deallocate(b%a) end do ! i !$OMP end parallel do write(*,*) 's =', s stop end program test_derived_type
I moved some source code to a folder on my desktop, and did a project build using those.
It did the build OK, but after searching for an hour, I could not find out where it put the output files.
I am referring to the compiled obj files, the project file VFPROJ, EXE and the SLN file, and buildlog.
It tells me where they are, but I cant find them anywhere using Windows Explorer.
None of those files are anywhere near where I stored the source code.
It TELLS me that they are at D:\users\desktop, but that is NOT where my desktop is -
My desktop is under my USER NAME under users. So it appears that the location is
where I cant reference it.
The reason I need to find that is : I need to put the input data file where the default directory is,
and apparently that is not accessible to me. apparently it is accessible to VS, but thats not any help here.
Apparently that users\desktop is a BOGUS location, how would I get to it?
When using VS2013 Update 4, for Fortran source files compiled with -debug:minimal we lost the ability to set breakpoints or have the source file automatically opened in the IDE with Break All. The breakpoints appear as hollow circles with a warning sign, and the tooltip reads "The breakpoint will not currently be hit. Unexpected symbol reader error while processing hello.exe". The Modules window shows "Symbols loaded." in the Symbol Status column for hello.exe.
We're using Compiler 15 Update 1.
To reproduce, attach to the following .exe, built with ifort -debug:minimal hello.f90
program hello print *, "Press Enter to continue..." read (*, *) print *, "Hello World!" end
There are no issues when using -debug:full, but that generates different code when combined with optimizations (-Ox).
The -debug:minimal code can be debugged with VS2010 SP1, both for setting up breakpoints and associating the source with the current code location when breaking the execution.
I have a Fortran application with an embedded OpenGL window. I need to call DwmEnableComposition to turn off Aero so that the buttons refresh correctly but I can't work out how to do it. I've added Dwmapi.lib to the linker line but still get
unresolved external symbol dwmiscompositionenabled referenced in function WinMain
My interface is
integer(LRESULT) function DwmEnableComposition(c) bind(c)
import
integer(UINT), value :: c
end function DwmEnableComposition
and my calling sequence is
lret = DwmIsCompositionEnabled(compositionEnabled)
if (compositionEnabled) then
DWM_EC_DISABLECOMPOSITION = 0
lret = DwmEnableComposition(DWM_EC_DISABLECOMPOSITION)
else
compositionEnabled = .false.
end if
Any ideas greatly appreciated.
Dear developers,
I observed a bug under Win7(64-bit) with Intel-12.1.2 Fortran-compiler :
In a write-stmt the Intel-compiler uses the stack, where it is not necessary, and then (certainly) aborts with a stack overflow, if the stack is too small.
Here are example stmts:
real, allocatable :: realarray(:,:)
ndim=500000
allocate( realarray(ndim,3) )
realarray = 0.0
open(100, form='unformatted')
write(100) realarray( :, 2 ) ! --> this works
write(100) realarray( :ndim, 2 ) ! --> this should be exacly the same, but results in a stack overflow
write(100) realarray( :ndim-100, 2 ) ! --> results also in a stack overflow
I remember darkly, that this kind of bug already appeared with the good old COMPAQ-Ftn-compiler.
Note, that this bug with the 2d-array does not occur for a 1d-array.
Greetings Michael R.