Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
de0dd7ba
There was an error fetching the commit references. Please try again later.
Commit
de0dd7ba
authored
15 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Working on CUDA compilation.
parent
530d7bd0
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
configure.ac
+20
-10
20 additions, 10 deletions
configure.ac
src/core/Makefile.am
+5
-9
5 additions, 9 deletions
src/core/Makefile.am
with
25 additions
and
19 deletions
configure.ac
+
20
−
10
View file @
de0dd7ba
...
@@ -13,10 +13,13 @@ dnl ----------- check for progs -------------
...
@@ -13,10 +13,13 @@ dnl ----------- check for progs -------------
dnl -----------------------------------------
dnl -----------------------------------------
AC_PROG_CXX
AC_PROG_CXX
dnl reset CXXFLAGS
CXXFLAGS=""
AC_PROG_AWK
AC_PROG_AWK
AC_LANG_SAVE
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_LANG_CPLUSPLUS
dnl -----------------------------------------
dnl -----------------------------------------
dnl ----------- check for icpc --------------
dnl ----------- check for icpc --------------
dnl -----------------------------------------
dnl -----------------------------------------
...
@@ -52,11 +55,10 @@ AC_ARG_WITH(cuda_headers,
...
@@ -52,11 +55,10 @@ AC_ARG_WITH(cuda_headers,
AC_ARG_WITH(cuda_libdir,
AC_ARG_WITH(cuda_libdir,
AS_HELP_STRING([--with-cuda-libdir],
AS_HELP_STRING([--with-cuda-libdir],
[says where the CUDA libraries can be found, default is /usr/local/cuda/lib]),
[says where the CUDA libraries can be found, default is /usr/local/cuda/lib]),
CUDA_LIBS=$withval)
CUDA_LIBS=$withval)
working_nvcc="no"
if test x$with_cuda = xyes;
if test x$with_cuda = xyes;
then
then
STORE_CXXFLAGS=$CXXFLAGS
STORE_CXXFLAGS=$CXXFLAGS
STORE_CPPFLAGS=$CPPFLAGS
STORE_CPPFLAGS=$CPPFLAGS
STORE_LDFLAGS=$LDFLAGS
STORE_LDFLAGS=$LDFLAGS
...
@@ -100,11 +102,12 @@ then
...
@@ -100,11 +102,12 @@ then
rm -f conftest.cu conftest.o conftest.what conftest.ever
rm -f conftest.cu conftest.o conftest.what conftest.ever
AC_MSG_RESULT([$working_nvcc])
AC_MSG_RESULT([$working_nvcc])
fi
fi
AM_CONDITIONAL([WORKING_NVCC], [test "x$working_nvcc" = "xyes"])
if test x$HAVE_CUDA = xyes; # TODO: && test x$working_nvcc = xyes;
if test x$HAVE_CUDA = xyes; # TODO: && test x$working_nvcc = xyes;
then
then
CUDA_LDFLAGS="$CUDA_LDFLAGS -lcudart"
CUDA_LDFLAGS="$CUDA_LDFLAGS -lcudart"
CC="nvcc"
CXX="nvcc"
else
else
CUDA_LDFLAGS=""
CUDA_LDFLAGS=""
CUDA_CXXFLAGS=""
CUDA_CXXFLAGS=""
...
@@ -113,10 +116,10 @@ then
...
@@ -113,10 +116,10 @@ then
CPPFLAGS=$STORE_CPPFLAGS
CPPFLAGS=$STORE_CPPFLAGS
LDFLAGS=$STORE_LDFLAGS
LDFLAGS=$STORE_LDFLAGS
fi
fi
AM_CONDITIONAL([working_nvcc], [test "x$working_nvcc" = "xyes"])
CXXFLAGS="$CXXFLAGS $CUDA_CXXFLAGS"
CPPFLAGS="$CPPFLAGS $CUDA_CPPFLAGS"
LDFLAGS="$LDFLAGS $CUDA_LDFLAGS"
dnl -----------------------------------------
dnl -----------------------------------------
dnl ----------- check for debug--------------
dnl ----------- check for debug--------------
...
@@ -124,7 +127,10 @@ dnl -----------------------------------------
...
@@ -124,7 +127,10 @@ dnl -----------------------------------------
AC_ARG_ENABLE(debug,[ --enable-debug=[no/yes] turn on debugging [default=no]] )
AC_ARG_ENABLE(debug,[ --enable-debug=[no/yes] turn on debugging [default=no]] )
if test x"$enable_debug" = xyes; then
if test x"$enable_debug" = xyes; then
DBGCXXFLAGS="-O0 -DDEBUG"
DBGCXXFLAGS="-O0 -DDEBUG"
DBGCXXFLAGS="$DBGCXXFLAGS -g3 -Wall -W -ansi -Wno-unused"
if test x$CXX != xnvcc;
then
DBGCXXFLAGS="$DBGCXXFLAGS -g3 -Wall -W -ansi -Wno-unused"
fi
DBGSTATUS="yes"
DBGSTATUS="yes"
else
else
...
@@ -287,7 +293,6 @@ else
...
@@ -287,7 +293,6 @@ else
fi
fi
AC_LANG_RESTORE
AC_LANG_RESTORE
CXXFLAGS="$CXXFLAGS -I../../src -I../../src/debug -I../src/debug"
AM_CONDITIONAL([BUILD_MPI],[test x"$MPISTATUS" = xyes] )
AM_CONDITIONAL([BUILD_MPI],[test x"$MPISTATUS" = xyes] )
AM_CONDITIONAL([BUILD_DBG],[test x"$DBGSTATUS" = xyes] )
AM_CONDITIONAL([BUILD_DBG],[test x"$DBGSTATUS" = xyes] )
...
@@ -406,6 +411,11 @@ echo "#define CONFIG_DESCRIPTION_FILE \"$prefix/share/mdiff-tools/mdiff-err-norm
...
@@ -406,6 +411,11 @@ echo "#define CONFIG_DESCRIPTION_FILE \"$prefix/share/mdiff-tools/mdiff-err-norm
CXXFLAGS="$CXXFLAGS $OPENMPFLAGS $CUDA_CXXFLAGS -I../src/debug -I../src/core -I../src/diff -I../../src -I../../../src"
CXXFLAGS="$CXXFLAGS $OPENMPFLAGS $CUDA_CXXFLAGS -I../src/debug -I../src/core -I../src/diff -I../../src -I../../../src"
CXXFLAGS="$CXXFLAGS -I../../src -I../../src/debug -I../src/debug"
CPPFLAGS="$CPPFLAGS $CUDA_CPPFLAGS"
LDFLAGS="$LDFLAGS $CUDA_LDFLAGS"
AC_OUTPUT(Makefile \
AC_OUTPUT(Makefile \
src/core/Makefile \
src/core/Makefile \
...
@@ -429,7 +439,7 @@ echo "*"
...
@@ -429,7 +439,7 @@ echo "*"
echo "* Compiler:" $CXX
echo "* Compiler:" $CXX
echo "* Preprocessor:" $CPP
echo "* Preprocessor:" $CPP
echo "* Compiler flags:" $CXXFLAGS
echo "* Compiler flags:" $CXXFLAGS
echo "* Preprocessor
g
lags:" $CPPFLAGS
echo "* Preprocessor
f
lags:" $CPPFLAGS
echo "* Linker flags: " $LDFLAGS
echo "* Linker flags: " $LDFLAGS
echo "* Debug flags: " $DBGCXXFLAGS
echo "* Debug flags: " $DBGCXXFLAGS
echo "* Optimising flags: " $OPTIMISECXXFLAGS
echo "* Optimising flags: " $OPTIMISECXXFLAGS
...
...
This diff is collapsed.
Click to expand it.
src/core/Makefile.am
+
5
−
9
View file @
de0dd7ba
...
@@ -62,26 +62,26 @@ libmcoreinclude_HEADERS = $(headers)
...
@@ -62,26 +62,26 @@ libmcoreinclude_HEADERS = $(headers)
noinst_LTLIBRARIES
=
libtnlcore-0.1.la
noinst_LTLIBRARIES
=
libtnlcore-0.1.la
libtnlcore_0_1_la_SOURCES
=
$(
sources
)
$(
headers
)
debug.h
libtnlcore_0_1_la_SOURCES
=
$(
sources
)
$(
headers
)
debug.h
libtnlcore_0_1_la_CXXFLAGS
=
$(
CXXFLAGS
)
$(
OPTIMSECXXFLAGS
)
libtnlcore_0_1_la_CXXFLAGS
=
$(
OPTIMSECXXFLAGS
)
if
BUILD_MPI
if
BUILD_MPI
noinst_LTLIBRARIES
+=
libtnlcore-mpi-0.1.la
noinst_LTLIBRARIES
+=
libtnlcore-mpi-0.1.la
libtnlcore_mpi_0_1_la_SOURCES
=
$(
sources
)
$(
headers
)
debug.h
libtnlcore_mpi_0_1_la_SOURCES
=
$(
sources
)
$(
headers
)
debug.h
libtnlcore_mpi_0_1_la_CXXFLAGS
=
$(
CXXFLAGS
)
$(
MPICXXFLAGS
)
$(
OPTIMSECXXFLAGS
)
libtnlcore_mpi_0_1_la_CXXFLAGS
=
$(
MPICXXFLAGS
)
$(
OPTIMSECXXFLAGS
)
libtnlcore_mpi_0_1_la_LDFLAGS
=
$(
LDFLAGS
)
$(
MPILDFLAGS
)
libtnlcore_mpi_0_1_la_LDFLAGS
=
$(
LDFLAGS
)
$(
MPILDFLAGS
)
endif
endif
if
BUILD_DBG
if
BUILD_DBG
noinst_LTLIBRARIES
+=
libtnlcore-dbg-0.1.la
noinst_LTLIBRARIES
+=
libtnlcore-dbg-0.1.la
libtnlcore_dbg_0_1_la_SOURCES
=
$(
sources
)
$(
headers
)
debug.h
libtnlcore_dbg_0_1_la_SOURCES
=
$(
sources
)
$(
headers
)
debug.h
libtnlcore_dbg_0_1_la_CXXFLAGS
=
$(
CXXFLAGS
)
$(
DBGCXXFLAGS
)
libtnlcore_dbg_0_1_la_CXXFLAGS
=
$(
DBGCXXFLAGS
)
libtnlcore_dbg_0_1_la_LDFLAGS
=
$(
LDFLAGS
)
$(
DBGLDFLAGS
)
libtnlcore_dbg_0_1_la_LDFLAGS
=
$(
LDFLAGS
)
$(
DBGLDFLAGS
)
endif
endif
if
BUILD_MPI_DBG
if
BUILD_MPI_DBG
noinst_LTLIBRARIES
+=
libtnlcore-mpi-dbg-0.1.la
noinst_LTLIBRARIES
+=
libtnlcore-mpi-dbg-0.1.la
libtnlcore_mpi_dbg_0_1_la_SOURCES
=
$(
sources
)
$(
headers
)
debug.h
libtnlcore_mpi_dbg_0_1_la_SOURCES
=
$(
sources
)
$(
headers
)
debug.h
libtnlcore_mpi_dbg_0_1_la_CXXFLAGS
=
$(
CXXFLAGS
)
$(
MPICXXFLAGS
)
$(
DBGCXXFLAGS
)
libtnlcore_mpi_dbg_0_1_la_CXXFLAGS
=
$(
MPICXXFLAGS
)
$(
DBGCXXFLAGS
)
libtnlcore_mpi_dbg_0_1_la_LDFLAGS
=
$(
LDFLAGS
)
$(
MPICXXFLAGS
)
$(
DBGLDFLAGS
)
libtnlcore_mpi_dbg_0_1_la_LDFLAGS
=
$(
LDFLAGS
)
$(
MPICXXFLAGS
)
$(
DBGLDFLAGS
)
endif
endif
...
@@ -89,16 +89,12 @@ libcore_tests_sources = tnlStringTester.cpp \
...
@@ -89,16 +89,12 @@ libcore_tests_sources = tnlStringTester.cpp \
tnlStringTester.h
\
tnlStringTester.h
\
tnlObjectTester.cpp
\
tnlObjectTester.cpp
\
tnlObjectTester.h
\
tnlObjectTester.h
\
tnlLongVectorCUDATester.c
pp
\
tnlLongVectorCUDATester.c
u
\
tnlLongVectorCUDATester.h
tnlLongVectorCUDATester.h
#libcore_tests_objects = tnlLongVectorCUDATester.cpp
check_LTLIBRARIES
=
libcore-tests.la
check_LTLIBRARIES
=
libcore-tests.la
libcore_tests_la_SOURCES
=
$(
libcore_tests_sources
)
libcore_tests_la_SOURCES
=
$(
libcore_tests_sources
)
#$(libcore_tests_la_OBJECTS) : $(libcore_tests_objects)
if
BUILD_DBG
if
BUILD_DBG
noinst_LTLIBRARIES
+=
libcore-tests-dbg.la
noinst_LTLIBRARIES
+=
libcore-tests-dbg.la
...
...
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