Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BioEM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MPIBP-Hummer
BioEM
Commits
1e449080
Commit
1e449080
authored
Apr 9, 2014
by
David Rohr
Browse files
Options
Downloads
Patches
Plain Diff
Update CMake File, cleanup, add WITH_CUDA and WITH_OPENMP defines, add fftw3 float lib
parent
58122acc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+40
-12
40 additions, 12 deletions
CMakeLists.txt
main.cpp
+2
-0
2 additions, 0 deletions
main.cpp
with
42 additions
and
12 deletions
CMakeLists.txt
100644 → 100755
+
40
−
12
View file @
1e449080
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.6
)
PROJECT
(
BioEM
)
SET
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
/cmake/Modules/"
)
SET
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
"
)
FIND_PACKAGE
(
CUDA
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-O3 -march=native -fopenmp -fweb -mfpmath=sse -frename-registers -minline-all-stringops -ftracer -funroll-loops -fpeel-loops -fprefetch-loop-arrays -ffast-math -ggdb"
)
FIND_PACKAGE
(
PkgConfig REQUIRED
)
PKG_CHECK_MODULES
(
FFTW fftw3 REQUIRED
)
INCLUDE_DIRECTORIES
(
${
FFTW_INCLUDE_DIRS
}
)
FIND_PACKAGE
(
Boost 1.54 REQUIRED
)
INCLUDE_DIRECTORIES
(
${
Boost_INCLUDE_DIRS
}
)
FIND_PACKAGE
(
OpenMP
)
IF
(
OPENMP_FOUND
)
SET
(
CMAKE_CXX_FLAGS
${
OpenMP_CXX_FLAGS
}
)
ADD_DEFINITIONS
(
-DWITH_OPENMP
)
ENDIF
()
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-O3 -march=native -fopenmp -fweb -mfpmath=sse -frename-registers -minline-all-stringops -ftracer -funroll-loops -fpeel-loops -fprefetch-loop-arrays -ffast-math -ggdb"
)
SET
(
CUDA_NVCC_FLAGS
"
${
CUDA_NVCC_FLAGS
}
;-gencode arch=compute_35,code=sm_35;--use_fast_math;-ftz=true;-O4;-Xptxas -O4"
)
INCLUDE_DIRECTORIES
(
include $HOME/usr/include
)
IF
(
CUDA_FOUND
)
ADD_DEFINITIONS
(
-DWITH_CUDA
)
CUDA_ADD_EXECUTABLE
(
bioEM bioem.cpp main.cpp map.cpp model.cpp param.cpp cmodules/timer.cpp bioem_cuda.cu
)
ELSE
()
ADD_EXECUTABLE
(
bioEM bioem.cpp main.cpp map.cpp model.cpp param.cpp cmodules/timer.cpp
)
ENDIF
()
TARGET_LINK_LIBRARIES
(
bioEM -L
${
FFTW_LIBDIR
}
-lfftw3 -lfftw3f
)
TARGET_LINK_LIBRARIES
(
bioEM -L
${
Boost_LIBRARY_DIRS
}
-lboost_program_options
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++0x -Wall -Wno-vla -Wno-unused-result -pedantic"
)
TARGET_LINK_LIBRARIES
(
bioEM -lfftw3 -fopenmp -lboost_program_options
)
message
(
STATUS
"FFTW library:
${
FFTW_LIBDIR
}
"
)
message
(
STATUS
"Boost directory:
${
Boost_LIBRARY_DIRS
}
"
)
message
(
STATUS
"FFTW includedir:
${
FFTW_INCLUDEDIR
}
"
)
#get_cmake_property(_variableNames VARIABLES)
#foreach (_variableName ${_variableNames})
#message(STATUS "${_variableName}=${${_variableName}}")
#endforeach()
This diff is collapsed.
Click to expand it.
main.cpp
100644 → 100755
+
2
−
0
View file @
1e449080
...
...
@@ -32,11 +32,13 @@ int main(int argc, char* argv[])
HighResTimer
timer
;
bioem
*
bio
;
#ifdef WITH_CUDA
if
(
getenv
(
"GPU"
)
&&
atoi
(
getenv
(
"GPU"
)))
{
bio
=
bioem_cuda_create
();
}
else
#endif
{
bio
=
new
bioem
;
}
...
...
...
...
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
sign in
to comment