![]() I know that the main program does not seem to do anything constructive, but the point is that I don't think that the loop should be limited by the memory, but rather it should be a function of run-time. So my question is: how can I safely use pointers while maintaining the same sort of interface and functionality? This doesn't seem to be the appropriate way to use pointers (which I need in derived data types). I usually cancel before my computer crashes, so I'm not sure of the behavior after it reaches the maximum. Using CTR-ALT-DLT, and opening "performance", the physical memory increases rapidly when running in gfortran, and doesn't seem to move for the compaq compiler. However, changing the loop from 10**4 to 10**5 causes a serious memory problem with gfortran. If (first_entry) nullify(res) first_entry =. If (associated(this%x)) deallocate(this%x) If (first_entry) nullify(this%x) first_entry =. Here is an example code, which should work "out of the box" with one warning from a gfortran compiler: "POINTER valued function appears on RHS of assignment", and no warnings from the other compiler. I am trying to get an idea of best practices with using pointers in Fortran 90 (which I must use). This may be a specific question, but I think it pertains to how memory is handled with these two compilers (Compaq visual Fortran Optimizing Compiler Version 6.5 and minGW). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |