#include "config_F90.h"
#include "options.h"
#include "defaults.h"
Go to the source code of this file.
|
| !Copyright (C) 2003-2006 M. Marques |
|
either | or (at your option) !! any later version. !! !! This program is distributed in the hope that it will be useful |
|
!The assertions are ignored if the code is compiled in not debug | mode (NDEBUG ! is defined). Otherwise it is merely a logical assertion that |
|
!In one should normally use the | SAFE_ (DE) ALLOCATE macros below |
|
!Some versions of GCC have a bug in the | sizeof () function such that the compiler crashes with a ICE ! when passing a polymorphic variable to the function and explicit array bounds are given. ! The workaround is not to pass the bounds to sizeof. Otherwise we could just use SAFE_ALLOCATE_TYPE. ! the TOSTRING macro converts a macro into a string ! do not use the STRINGIFY macro ! Whenever a procedure is not called too many times |
|
|
A | Castro |
|
A A | Rubio |
|
A A G Bertsch !This program is free | software |
|
you can redistribute it and or modify !it under the terms of the GNU General Public License as published by !the Free Software | Foundation |
|
either | version |
|
either !but WITHOUT ANY | WARRANTY |
|
without even the implied warranty of !MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the !GNU General Public License for more details !You should have received a copy of the GNU General Public License !along with this | program |
|
if | not |
|
if write to the Free Software | !Foundation |
|
if write to the Free Software | Inc |
|
if write to the Free Software Franklin | Street |
|
if write to the Free Software Franklin Fifth | Floor |
|
if write to the Free Software Franklin Fifth | Boston |
|
if write to the Free Software Franklin Fifth | MA |
|
if write to the Free Software Franklin Fifth USA !If the compiler accepts long Fortran | lines |
|
if write to the Free Software Franklin Fifth USA !If the compiler accepts long Fortran it is better to use that | !capacity |
|
if write to the Free Software Franklin Fifth USA !If the compiler accepts long Fortran it is better to use that and build all the preprocessor definitions in one line In !this | way |
|
!If the compiler accepts line number | markers |
|
!If the compiler accepts line number then CARDINAL and ACARDINAL !will put them | Otherwise |
|
!The assertions are ignored if the code is compiled in not debug when | fails |
|
!The assertions are ignored if the code is compiled in not debug when !prints out the assertion | string |
|
!The assertions are ignored if the code is compiled in not debug when !prints out the assertion the | file |
|
!In | octopus |
|
!in the | code |
|
!Some versions of GCC have a bug in the one should start it !and finish it with the PUSH_SUB and POP_SUB | macros |
|
◆ _newline_
#define _newline_ \newline |
◆ _anl_
◆ CARDINAL
◆ ACARDINAL
◆ ASSERT
Value:
#define ACARDINAL
Definition: global.h:51
#define CARDINAL
Definition: global.h:50
if not
Definition: global.h:14
◆ FC_SIZEOF
◆ SAFE_ALLOCATE_PROFILE
#define SAFE_ALLOCATE_PROFILE |
( |
|
x | ) |
|
Value: if(not_in_openmp() .and. iand(prof_vars%
mode, PROFILING_MEMORY).ne.0 .or. global_alloc_err.ne.0) ACARDINAL \
if(iand(prof_vars%
mode, PROFILING_MEMORY).ne.0) ACARDINAL \
#define FC_SIZEOF(x)
Definition: global.h:75
!The assertions are ignored if the code is compiled in not debug mode(NDEBUG ! is defined). Otherwise it is merely a logical assertion that
if(it==(*map) ->end())
Definition: iihash_low.cc:52
void const double * x
Definition: spline_low.cc:50
◆ SAFE_ALLOCATE
#define SAFE_ALLOCATE |
( |
|
x | ) |
|
Value:
#define SAFE_ALLOCATE_PROFILE(x)
Definition: global.h:124
◆ SAFE_ALLOCATE_TYPE
#define SAFE_ALLOCATE_TYPE |
( |
|
type, |
|
|
|
x |
|
) |
| |
◆ SAFE_ALLOCATE_TYPE_ARRAY
#define SAFE_ALLOCATE_TYPE_ARRAY |
( |
|
type, |
|
|
|
x, |
|
|
|
bounds |
|
) |
| |
Value:
if(not_in_openmp() .and. iand(prof_vars%
mode, PROFILING_MEMORY).ne.0 .or. global_alloc_err.ne.0) ACARDINAL \
if(iand(prof_vars%
mode, PROFILING_MEMORY).ne.0) ACARDINAL \
◆ SAFE_ALLOCATE_SOURCE_P
#define SAFE_ALLOCATE_SOURCE_P |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value: if(associated(
y)) then; CARDINAL \
end if; \
CARDINAL
else
Definition: iihash_low.cc:54
void const double const double * y
Definition: spline_low.cc:51
◆ SAFE_ALLOCATE_SOURCE_A
#define SAFE_ALLOCATE_SOURCE_A |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value: if(allocated(
y)) then; CARDINAL \
end if; \
CARDINAL
◆ SAFE_ALLOCATE_SOURCE
#define SAFE_ALLOCATE_SOURCE |
( |
|
x, |
|
|
|
y |
|
) |
| |
◆ MY_DEALLOCATE
#define MY_DEALLOCATE |
( |
|
x | ) |
|
Value:
CARDINAL \
deallocate(
x, stat=global_alloc_err, errmsg=global_alloc_errmsg);
CARDINAL \
if(not_in_openmp() .and. iand(prof_vars%
mode, PROFILING_MEMORY).ne.0) ACARDINAL \
write(stderr,'(
a)') global_alloc_errmsg;
CARDINAL \
double const double * a
Definition: spline_low.cc:120
◆ SAFE_DEALLOCATE_P
#define SAFE_DEALLOCATE_P |
( |
|
x | ) |
|
◆ SAFE_DEALLOCATE_A
#define SAFE_DEALLOCATE_A |
( |
|
x | ) |
|
◆ SAFE_TOL
#define SAFE_TOL |
( |
|
x, |
|
|
|
tol |
|
) |
| sign(max(abs(x),tol),x) |
◆ STRINGIFY
#define STRINGIFY |
( |
|
x | ) |
#x |
◆ TOSTRING
◆ PUSH_SUB
#define PUSH_SUB |
( |
|
routine | ) |
|
Value: if(debug%trace .
or. debug%instrument) then;
if(not_in_openmp()) then; CARDINAL \
endif; endif; \
CARDINAL
either or(at your option) !! any later version. !! !! This program is distributed in the hope that it will be useful
◆ POP_SUB
#define POP_SUB |
( |
|
routine | ) |
|
Value: if(debug%trace .
or. debug%instrument) then;
if(not_in_openmp()) then; CARDINAL \
endif; endif; \
CARDINAL
◆ PUSH_SUB_WITH_PROFILE
#define PUSH_SUB_WITH_PROFILE |
( |
|
routine | ) |
|
Value:
#define PUSH_SUB(routine)
Definition: global.h:218
◆ POP_SUB_WITH_PROFILE
#define POP_SUB_WITH_PROFILE |
( |
|
routine | ) |
|
Value:
#define POP_SUB(routine)
Definition: global.h:223
◆ !Copyright()
◆ or()
either or |
( |
at your |
option | ) |
|
◆ mode()
!The assertions are ignored if the code is compiled in not debug mode |
( |
NDEBUG ! is |
defined | ) |
|
◆ SAFE_()
!In one should normally use the SAFE_ |
( |
DE |
| ) |
|
◆ sizeof()
!Some versions of GCC have a bug in the sizeof |
( |
| ) |
|
◆ Castro
◆ Rubio
◆ software
◆ Foundation
you can redistribute it and or modify !it under the terms of the GNU General Public License as published by !the Free Software Foundation |
◆ version
◆ WARRANTY
either !but WITHOUT ANY WARRANTY |
◆ program
without even the implied warranty of !MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the !GNU General Public License for more details !You should have received a copy of the GNU General Public License !along with this program |
◆ not
◆ !Foundation
◆ Inc
if write to the Free Software Inc |
◆ Street
if write to the Free Software Franklin Street |
◆ Floor
if write to the Free Software Franklin Fifth Floor |
◆ Boston
if write to the Free Software Franklin Fifth Boston |
◆ MA
if write to the Free Software Franklin Fifth MA |
◆ lines
if write to the Free Software Franklin Fifth USA !If the compiler accepts long Fortran lines |
◆ !capacity
if write to the Free Software Franklin Fifth USA !If the compiler accepts long Fortran it is better to use that !capacity |
◆ way
if write to the Free Software Franklin Fifth USA !If the compiler accepts long Fortran it is better to use that and build all the preprocessor definitions in one line In !this way |
◆ markers
!If the compiler accepts line number markers |
◆ Otherwise
!If the compiler accepts line number then CARDINAL and ACARDINAL !will put them Otherwise |
◆ fails
!The assertions are ignored if the code is compiled in not debug when fails |
◆ string
!The assertions are ignored if the code is compiled in not debug when !prints out the assertion string |
◆ file
!In one should normally use the which emit !a helpful error if the allocation or deallocation fails They also take care of !calling the memory profiler The MY_DEALLOCATE macro is only used in this file |
◆ octopus
◆ code
◆ macros
!Some versions of GCC have a bug in the one should start it !and finish it with the PUSH_SUB and POP_SUB macros |