Welcome, Guest
Username: Password: Remember me

TOPIC: Memory with user subroutine

Memory with user subroutine 9 years 3 months ago #17959

  • Proust_Nicolas
  • Proust_Nicolas's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 136
  • Thank you received: 2
Hello,

I have built some user subroutines (time and space varying conditions) and I have meet some memory mistake due to memory exceed.

I have separated my own program (allocate an array and read text values) from Telemac just to test it compiled in Fortran. I have a mistake when I allocate a variable : error 41, "The Intel Fortran RTL attempted to exceed its available virtual memory while dynamically allocating space" (geco.mines.edu/guide/Run-Time_Error_Messages.html).

After I have tested with only one array, in my computer I can allocate about 240 000 000 total values without error.

So here is my question, how the memory is it managed in Telemac? Because I think the main code should exceed this total memory value available?

I know this "limit" of 240 000 000 values seems very large but in my case with a big model and long time varying conditions and many parameters I exceed it...

Regards
Nicolas
The administrator has disabled public write access.

Memory with user subroutine 9 years 3 months ago #17961

  • jmhervouet
  • jmhervouet's Avatar
Hello,

There is an issue with 32 bits and 64 bits, I am not sure but it seems that your maximum here is only a problem of addressing with 32 bits integers, so it would be a 32 bits limitation. If you print in Fortran HUGE(1) it will give you this maximum address.

Then you should not allocate virtual memory that is actually on a disk, it slows down a lot the programs.

These two points cannot be managed at Telemac level, it all depends on the machine and the compiler tuning.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Memory with user subroutine 9 years 3 months ago #17964

  • Proust_Nicolas
  • Proust_Nicolas's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 136
  • Thank you received: 2
Hello Jean-Michel,

Here is the value I have for HUGE(1) in my computer : 2 147 483 647 but it doesn't match with the limit I see at 240 000 000 values.

I don't really understand your remark : "Then you should not allocate virtual memory that is actually on a disk, it slows down a lot the programs."
Here is what I do in my program :
! Variables
double precision,dimension(:,:,:),allocatable::tableau
integer ligne,colonne,troisiemedim,ALLOC
! Program
ligne=60000000
colonne=2
troisiemedim=1
ALLOC=0
allocate(tableau(ligne,colonne,troisiemedim),stat=ALLOC)
if(ALLOC/=0) then
write(*,*)'erreur allocation memoire ',ALLOC
stop
endif
Do you advise to use another way to allocate an array?

Regards
Nicolas
The administrator has disabled public write access.

Memory with user subroutine 9 years 3 months ago #17967

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I just saw the message of your computer, when there is not enough real memory with fast access the computer takes virtual memory on a disk, so it is always reading and writing on this disk and it slows down computations. However I do not know where this is decided, maybe in some compiler parameter or even when configuring the machine.

Regards,

JMH
The administrator has disabled public write access.

Memory with user subroutine 9 years 3 months ago #17973

  • Proust_Nicolas
  • Proust_Nicolas's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 136
  • Thank you received: 2
Ok I will have a look to compiler parameters or the machine configuration.
I will also try to optimize the size of memory I need to allocate to avoid the problem at the beginning.

Regards
Nicolas
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.