Difference between revisions of "Machine issues & portability"

From Geos-chem
Jump to: navigation, search
m
 
(126 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== IFORT Compiler ==
+
#REDIRECT [[GEOS-Chem_basics#Fortran resources]]
 
+
=== 26-Mar-2008 ===
+
 
+
Harvard users need to make the same fix
+
 
+
=== 07-Jan-2008 ===
+
 
+
The IFORT compiler has an error that can cause the GEOS-Chem to appear that it is running out of memory when it actually isn't.  The symptom that we have noticed is that it seems to choke right when the TPCORE is called.  This may tend to happen more often IFORT v9 or v10 on Linux Boxes, but it can also happen on Altix/Itanium systems. 
+
 
+
The workaround for this bug is as follows:
+
 
+
1. First try adding this to your .cshrc file:
+
  limit stacksize unlimited
+
 
+
This will tell the operating system to assign the maximum possible memory to the stack.
+
 
+
2. If GEOS-Chem still crashes with the same error, then you may need to set the stacksize variable to a large positive # instead of unlimited.  This is a known issue with one of the libraries that the IFORT compiler uses.
+
 
+
Try adding this code to your .cshrc file as well:
+
 
+
  #---------------------------------------------------------------------------
+
  # Due to a limitation in the Intel IFORT v9.x compilers, you must do the
+
  # following in order to avoid potential memory problems with OpenMP:
+
  #
+
  # (1) Explicitly set the "stacksize" limit to 2097152 kbytes
+
  #      instead of to "unlimited".
+
  #
+
  # (2) Explicitly set the KMP_STACKSIZE environment variable
+
  #      to 209715200 bytes.
+
  #
+
  # For more information see the Intel IFORT release notes:
+
  #  http://archimede.mat.ulaval.ca/intel/fc/9.1.036/doc/Release_Notes.htm
+
  #
+
  # This usually has to be done when running GEOS-5 on Altix or Titan.
+
  #
+
  # (bmy, 8/16/07)
+
  #---------------------------------------------------------------------------
+
  limit  stacksize    2097152 kbytes
+
  setenv KMP_STACKSIZE 209715200
+
 
+
The 2097152 is the maximum allowable stacksize on the Harvard Altix/Itanium system.  This may be different on your system.  You can find out the maximum stacksize on your machine by typing "limit" at the Unix prompt.  On your machine the number may vary.  Then just cut-n-paste this number and replace the "2097152 kbytes" in the text above and put that into your .cshrc or .bashrc. 
+
 
+
 
+
3. If you are using the IFORT 10.x compilers, then you might also need to tell the compiler to put automatic arrays into heap memory instead of on the stack. 
+
 
+
From Mike Seymour (seymour@atmosp.physics.utoronto.ca)
+
 
+
<blockquote>
+
I found this Intel page regarding stack sizes and ifort >=8.0:
+
 
+
http://www.intel.com/support/performancetools/fortran/sb/cs-007790.htm
+
 
+
It suggests for ifort 10.0 to use the heap for temporary storage with -heap-arrays <size>, where arrays known at compile-time to be larger than <size> are  allocated on the heap instead of the stack.
+
 
+
However, setting <size> to be 1000 does not change things. I don't know if smaller values will have an effect, or if there will be performance issues.
+
</blockquote>
+
 
+
== PGI Compiler ==
+
 
+
=== 02-Jul-2007 ===
+
 
+
From Win Trivitayanurak (win@cmu.edu):
+
 
+
<blockquote>
+
In short, TRIM and ADJUSTL or ADJUSTR do not work together properly when compiled with Portland Group Fortran.  I propose removing TRIM inside the subroutine StrSqueeze.  This is not urgent and relevant to only the few PGI users.
+
</blockquote>
+
 
+
So if you are using the PGI compiler, then you will have to modify the code in routine STRSQUEEZE "charpak_mod.f" such that the statements
+
 
+
STR = ADJUSTR( TRIM( STR ) )
+
STR = ADJUSTL( TRIM( STR ) )
+
 
+
are now replaced with
+
 
+
STR = ADJUSTR( STR )
+
STR = ADJUSTL( STR )
+
 
+
and this will solve the problem.  We will incorporate this into a future release of GEOS-Chem.
+
 
+
== SGI-MIPS Compiler ==
+
 
+
== Sun Studio Compiler ==
+

Latest revision as of 21:54, 10 January 2019