Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
H
handyG
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
McMule
handyG
Commits
7c9d6ade
Commit
7c9d6ade
authored
Aug 22, 2019
by
ulrich_y
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added --quad to configure
parent
7170d56e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
2 deletions
+47
-2
configure
configure
+39
-0
src/globals.f90
src/globals.f90
+8
-2
No files found.
configure
View file @
7c9d6ade
...
...
@@ -32,6 +32,9 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
--moduledir=DIR Fortran module files (compiler specific)
--quad uses quadruple precision (128 bit) as the
working precision. This is not compatible with
the GiNaC interface.
Fine tuning of the installation directories:
...
...
@@ -74,6 +77,7 @@ HAVE_GINAC=false
HAVE_MCC
=
false
CONF_BITS
=
CONF_QUAD
=
false
CONF_FFLAGS
=
$FFLAGS
CONF_CFLAGS
=
$CFLAGS
CONF_CXXFLAGS
=
$CXXFLAGS
...
...
@@ -116,6 +120,8 @@ for arg in "$@" ; do
CONF_BITS
=
"-m32"
;;
--64
)
CONF_BITS
=
"-m64"
;;
--quad
)
CONF_QUAD
=
true
;;
--coverage
)
COVERAGE
=
true
;;
--help
)
...
...
@@ -491,6 +497,39 @@ fi
CONF_LD
=
${
LD
:-
$CONF_FC
}
if
$CONF_QUAD
;
then
if
$HAVE_GINAC
;
then
echo
"GiNaC testing is not supported for quad-precision!"
1>&3
exit
1
fi
echo
-n
"does
$CONF_FC
support quad-precision... "
1>&3
rm
-fr
$test
*
tee
$test
.f90
<<
_EOF_
1>&2
program test
real(selected_real_kind(30,32)) a, b
a = 2D0**(52/2+2)
b = a + 1/a
if( a .eq. b ) stop 1
end
_EOF_
$CONF_FC
$CONF_FFLAGS
-o
$test
$test
.f90 1>&2
./
$test
1>&2
&&
{
echo
"yes"
1>&3
eval
addflag FFLAGS
-DKINDREAL
=
16
-DKINDINT
=
8
}
||
{
echo
"no"
1>&3
exit
1
}
fi
if
$HAVE_GINAC
;
then
eval
addflag CXXFLAGS
"-std=c++11"
if
[[
!
-z
"
$CONF_PKGCONFIG
"
]]
;
then
...
...
src/globals.f90
View file @
7c9d6ade
...
...
@@ -2,9 +2,15 @@
MODULE
globals
implicit
none
#ifndef KINDREAL
#define KINDREAL selected_real_kind(15,32)
#endif
#ifndef KINDINT
#define KINDINT 4
#endif
integer
,
parameter
::
prec
=
selected_real_kind
(
15
,
32
)
integer
,
parameter
::
ikin
=
4
integer
,
parameter
::
prec
=
KINDREAL
integer
,
parameter
::
ikin
=
KINDINT
real
(
kind
=
prec
),
parameter
::
zero
=
10._prec
**
(
-
precision
(
1._prec
))
! values smaller than this count as zero
real
(
kind
=
prec
),
parameter
::
pi
=
3.1415926535897932384626433832795028841971693993751_prec
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment