Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
496a1092
Commit
496a1092
authored
10 months ago
by
Mulas, Giacomo
Browse files
Options
Downloads
Patches
Plain Diff
update env variable compilation flags to allow for optional ilp64 interfaces
parent
61b07d95
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/include/types.h
+10
-0
10 additions, 0 deletions
src/include/types.h
src/make.inc
+48
-7
48 additions, 7 deletions
src/make.inc
with
58 additions
and
7 deletions
src/include/types.h
+
10
−
0
View file @
496a1092
...
...
@@ -27,9 +27,15 @@ typedef __complex__ double dcomplex;
#ifdef USE_LAPACK
#ifdef USE_MKL
#ifdef USE_ILP64
#ifndef MKL_INT
#define MKL_INT int64_t
#endif // MKL_INT
#else
#ifndef MKL_INT
#define MKL_INT int32_t
#endif // MKL_INT
#endif
#include
<mkl_lapacke.h>
#else
#include
<lapacke.h>
...
...
@@ -44,7 +50,11 @@ typedef __complex__ double dcomplex;
#ifdef lapack_int
#define np_int lapack_int
#else
#ifdef USE_ILP64
#define np_int int64_t
#else
#define np_int int32_t
#endif // USE_ILP64
#endif // lapack_int
#endif // np_int
...
...
This diff is collapsed.
Click to expand it.
src/make.inc
+
48
−
7
View file @
496a1092
...
...
@@ -48,32 +48,47 @@ endif
# define (outside) USE_LAPACK for lapacke support, LAPACK_ILP64 for ilp64 interface, MKL_ILP64 the same if using MKL implementation
ifdef
USE_LAPACK
# define (outside) USE_ILP64 for long long int support in lapack/mkl/magma interfaces
ifdef
USE_ILP64
ifndef
LAPACK_ILP64
override
LAPACK_ILP64
=
1
endif
#LAPACK_ILP64
endif
# define (outside) USE_MKL to use the MKL implementation of lapacke
ifdef
USE_MKL
# define (outside) USE_ILP64 for long long int support in lapack/mkl/magma interfaces
ifdef
USE_ILP64
ifndef
MKL_ILP64
override
MKL_ILP64
=
1
endif
#MKL_ILP64
endif
ifndef
LAPACK_INCLUDE
# this is for the MKL implementation
override
LAPACK_INCLUDE
=
$
(
MKLROOT
)
/
include
endif
endif
#LAPACK_INCLUDE
ifndef
LAPACK_LDFLAGS
# this is for the MKL implementation
# define (outside) USE_ILP64 for long long int support in lapack/mkl/magma interfaces
ifdef
USE_ILP64
override
LAPACK_LDFLAGS
=-
L
$
(
MKLROOT
)
/
lib
-
Wl
,
--
no
-
as
-
needed
-
lmkl_intel_ilp64
-
lmkl_gnu_thread
-
lmkl_core
-
lgomp
-
lpthread
-
lm
-
ldl
else
override
LAPACK_LDFLAGS
=-
L
$
(
MKLROOT
)
/
lib
-
Wl
,
--
no
-
as
-
needed
-
lmkl_intel_lp64
-
lmkl_gnu_thread
-
lmkl_core
-
lgomp
-
lpthread
-
lm
-
ldl
endif
endif
LAPACK_LDFLAGS
# the next else refers to USE_MKL
else
else
#this is for when USE_MKL is _not_ defined
ifndef
LAPACK_INCLUDE
# this is for standard "vanilla" lapacke64
override
LAPACK_INCLUDE
=/
usr
/
include
endif
endif
# LAPACK_INCLUDE
ifndef
LAPACK_LDFLAGS
ifdef
USE_ILP64
# this is for standard "vanilla" lapacke64
override
LAPACK_LDFLAGS
=-
llapacke64
else
override
LAPACK_LDFLAGS
=-
llapacke
endif
endif
LAPACK_LDFLAGS
# the next endif is for USE_MKL
endif
#the next endif is for USE_LAPACK
...
...
@@ -81,7 +96,11 @@ endif
# define (outside) USE_MAGMA for magma support
ifdef
USE_MAGMA
ifdef
MAGMA_LIB
MAGMA_LDFLAGS
=
-
L
$MAGMA_LIB
-
lmagma
-
lcudart
else
MAGMA_LDFLAGS
=
-
lmagma
-
lcudart
endif
#the next endif is for USE_MAGMA
endif
...
...
@@ -92,25 +111,47 @@ ifdef USE_OPENMP
override
CXXFLAGS
+=
-
fopenmp
# closes USE_OPENMP
endif
ifdef
USE_ILP64
override
CXXFLAGS
+=
-
DUSE_ILP64
endif
ifdef
USE_LAPACK
override
CXXFLAGS
+=
-
DUSE_LAPACK
-
DLAPACK_ILP64
override
CXXFLAGS
+=
-
DUSE_LAPACK
ifdef
USE_ILP64
override
CXXFLAGS
+=
-
DLAPACK_ILP64
endif
# closes USE_LAPACK
endif
ifdef
USE_MKL
override
CXXFLAGS
+=
-
DMKL_ILP64
-
DUSE_MKL
-
I
$
(
MKLROOT
)
/
include
override
CXXFLAGS
+=
-
DUSE_MKL
-
I
$
(
MKLROOT
)
/
include
ifdef
USE_ILP64
override
CXXFLAGS
+=
-
DMKL_ILP64
endif
# closes USE_MKL
endif
ifdef
USE_OPENMP
override
CXXFLAGS
+=
-
fopenmp
# closes USE_OPENMP
endif
# closes USE_LAPACK
endif
ifdef
USE_MAGMA
override
CXXFLAGS
+=
-
DUSE_MAGMA
ifdef
MAGMA_INCLUDE
override
CXXFLAGS
+=
-
I
$MAGMA_INCLUDE
endif
ifdef
USE_ILP64
override
CXXFLAGS
+=
-
DMAGMA_ILP64
endif
# closes USE_MAGMA
endif
# closes CXXFLAGS
endif
# HDF5_LIB defines the default path to the HDF5 libraries to use
# CXXLDFLAGS defines the default linker flags to use for C++ codes
ifndef
CXXLDFLAGS
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment