Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
base
Commits
9430cb9d
Commit
9430cb9d
authored
4 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: Experimenting with GPU rules
parent
fe6c0f08
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config/common/buildSettings.mk
+64
-58
64 additions, 58 deletions
config/common/buildSettings.mk
with
64 additions
and
58 deletions
config/common/buildSettings.mk
+
64
−
58
View file @
9430cb9d
...
...
@@ -52,70 +52,76 @@ ARCHLIBS =
#####################################################################
ifeq
($(SYSTYPE), Darwin)
# Commands
CC
?=
cc
CXX
?=
c++
RANLIB
?=
ranlib
# Commands
CC
?=
cc
CXX
?=
c++
# Compiler flags
ARCHCXXFLAGS
+=
-arch
x86_64
-Wall
-pedantic
-fPIC
ARCHCFLAGS
+=
$(
ARCHCXXFLAGS
)
-std
=
c99
ARCHLDFLAGS
+=
-Wl
,-search_paths_first
ARCHLIBS
+=
-llapack
-lblas
-lz
-lm
endif
# Compiler flags
ARCHCXXFLAGS
+=
-arch
x86_64
-Wall
-pedantic
ARCHCFLAGS
+=
$(
ARCHCXXFLAGS
)
-std
=
c99
ARCHLDFLAGS
+=
-Wl
,-search_paths_first
ARCHLIBS
+=
-llapack
-lblas
-lz
-lm
#####################################################################
#
# Linux specific sys vars and ext libs
#
#####################################################################
ifeq
($(SYSTYPE), Linux)
# CUDA library
CUDAVER
:=
$(
or
$(
CUDAVER
)
,7.5
)
CUDA_INSTALLATION
=
/Developer/NVIDIA/CUDA-
${
CUDAVER
}
GENCODE_FLAGS
=
$(
shell
${
FSLDIR
}
/config/common/supportedGencodes.sh
${
CUDA_INSTALLATION
})
LIB_CUDA
=
${
CUDA_INSTALLATION
}
/lib
INC_CUDA
=
${
CUDA_INSTALLATION
}
/include
NVCC
=
${
CUDA_INSTALLATION
}
/bin/nvcc
#Project specific variables
EDDYBUILDPARAMETERS
=
"cuda=1 CUDAVER=7.5"
"cpu=1"
FDT_COMPILE_GPU
=
0
PTX2_COMPILE_GPU
=
0
endif
# if Darwin
# Commands
CC
?=
gcc
CXX
?=
c++
# Compiler flags
ARCHCFLAGS
+=
-fexpensive-optimizations
\
-Wall
-pedantic
-Wno-long-long
-fPIC
ARCHCXXFLAGS
+=
$(
ARCHCFLAGS
)
ARCHLDFLAGS
+=
-Wl
,-rpath,
'$$ORIGIN/../lib'
ARCHLIBS
+=
-lopenblas
-lz
-lm
endif
# if Linux
#####################################################################
#
# Linux specific sys vars and ext libs
# Makefile auto-detects gcc version for Linux
# Linux specific sys vars and ext libs
#
#####################################################################
ifeq
($(SYSTYPE), Linux)
# Commands
CC
?=
gcc
CXX
?=
c++
RANLIB
?=
echo
# Compiler flags
ARCHCFLAGS
+=
-fexpensive-optimizations
\
-Wall
-pedantic
-Wno-long-long
ARCHCXXFLAGS
+=
$(
ARCHCFLAGS
)
ARCHLDFLAGS
+=
-Wl
,-rpath,
'$$ORIGIN/../lib'
ARCHLIBS
+=
-lopenblas
-lz
-lm
# CUDA development environment
CUDAVER
:=
$(
or
$(
CUDAVER
)
,9.1
)
#$(info $$CUDAVER is [${CUDAVER}])
CUDA_INSTALLATION
=
/opt/cuda-
${
CUDAVER
}
ifdef
SINGULARITY_NAME
CUDA_INSTALLATION
=
/usr/local/cuda-
${
CUDAVER
}
endif
ifeq
($(SINGULARITY_NAME), Centos6_Build)
CXX11
=
scl
enable
devtoolset-2
--
c++
NVCC11
=
scl
enable
devtoolset-2
--
${
CUDA_INSTALLATION
}
/bin/nvcc
# CUDA library
ifneq
($(shell which nvcc), )
NVCC
=
nvcc
CUDAVER
=
$(
shell nvcc
--version
|
grep
-Po
"release
\K
[0-9
\.
]+"
)
GENCODE_FLAGS
=
$(
shell
${
FSLDIR
}
/config/common/supportedGencodes.sh
${
CUDAVER
})
CUDADIR
=
${
FSLDIR
}
CUDACXXFLAGS
=
-I
${
CUDADIR
}
/include
\
${
GENCODE_FLAGS
}
\
--compiler-options
\
"-fexpensive-optimizations -Wall -Wno-long-long -fPIC"
\
-DARMA_ALLOW_FAKE_GCC
CUDALDFLAGS
=
-L
${
CUDADIR
}
/lib
-lcuda
-lcurand
-lcudart
$(info
"GPU enable"
)
ifeq
($(SYSTYPE), Darwin)
#Project specific variables
EDDYBUILDPARAMETERS
=
"cuda=1 CUDAVER=7.5"
"cpu=1"
FDT_COMPILE_GPU
=
0
PTX2_COMPILE_GPU
=
0
endif
# if Darwin
ifeq
($(SYSTYPE), Linux)
# Project specific variables
PARALLELFLAGS
=
-fopenmp
EDDYBUILDPARAMETERS
=
"cuda=1 CUDAVER=8.0"
"cuda=1 CUDAVER=9.1"
"cpu=1"
FDT_COMPILE_GPU
=
1
PTX2_COMPILE_GPU
=
1
endif
# if Linux
else
$(info
"GPU disable"
)
FDT_COMPILE_GPU
=
0
PTX2_COMPILE_GPU
=
0
endif
GENCODE_FLAGS
=
$(
shell
${
FSLDIR
}
/config/common/supportedGencodes.sh
${
CUDA_INSTALLATION
})
LIB_CUDA
=
${
CUDA_INSTALLATION
}
/lib64
INC_CUDA
=
${
CUDA_INSTALLATION
}
/include
NVCC
=
${
CUDA_INSTALLATION
}
/bin/nvcc
# Project specific variables
PARALLELFLAGS
=
-fopenmp
EDDYBUILDPARAMETERS
=
"cuda=1 CUDAVER=8.0"
"cuda=1 CUDAVER=9.1"
"cpu=1"
fdt_MASTERBUILD
=
COMPILE_GPU
=
1
ptx2_MASTERBUILD
=
COMPILE_GPU
=
1
endif
# if Linux
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