/[MITgcm]/MITgcm/eesupp/src/gsl_ieee_env.c
ViewVC logotype

Contents of /MITgcm/eesupp/src/gsl_ieee_env.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Dec 22 00:36:51 2005 UTC (18 years, 6 months ago) by ce107
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint58u_post, checkpoint58w_post, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint58q_post, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59h, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint58d_post, checkpoint58c_post, checkpoint58a_post, checkpoint58i_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint58b_post, checkpoint58m_post
File MIME type: text/plain
Introduce runtime floating point control into MITgcm using the GSL.
main.F calls fgsl_ieee_env_setup (), a wrapper around gsl_ieee_env_setup ()
from the GNU Scientific Library which reads in the environment
variable GSL_IEEE_MODE and sets the environment accordingly. For
more information look at:
http://www.gnu.org/software/gsl/manual/gsl-ref_39.html#SEC515
Please read this carefully to avoid running into trouble with exceptions
due to denormals and underflows.
gsl_ieee_env.c provides fgsl_ieee_env_setup () in multiple forms that
should be recognized by any fortran compiler.
Currently needs to have declared GSLINC and GSLLIB in the optfile
for the include and library linking strings needed to use GSL.
For example on most Linux boxen
GSLINC=''
GSLLIB='-lgsl -lgslcblas'
as the required files exist in /usr/include and /usr/lib.

1 /*
2 * A cross-platform way of providing access to gsl_ieee_env_setup
3 * from Fortran on any system MITgcm runs on currently.
4 */
5
6 #ifdef USE_GSL_IEEE
7 #include <gsl/gsl_math.h>
8 #include <gsl/gsl_ieee_utils.h>
9
10 void fgsl_ieee_env_setup ()
11 {
12 gsl_ieee_env_setup ();
13 }
14
15 void fgsl_ieee_env_setup_ ()
16 {
17 gsl_ieee_env_setup ();
18 }
19
20 void fgsl_ieee_env_setup__ ()
21 {
22 gsl_ieee_env_setup ();
23 }
24
25 void FGSL_IEEE_ENV_SETUP ()
26 {
27 gsl_ieee_env_setup ();
28 }
29 #endif

  ViewVC Help
Powered by ViewVC 1.1.22