Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_pdata
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
argupta
openfpm_pdata
Commits
3b2b0b3c
Commit
3b2b0b3c
authored
Dec 23, 2018
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing example to ork without NVCC
parent
7834af62
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
87 additions
and
13 deletions
+87
-13
CMakeLists.txt
CMakeLists.txt
+3
-1
example/Numerics/PS-CMA-ES/main.cpp
example/Numerics/PS-CMA-ES/main.cpp
+16
-0
example/Vector/3_molecular_dynamic_gpu_opt/Makefile
example/Vector/3_molecular_dynamic_gpu_opt/Makefile
+9
-1
example/Vector/7_SPH_dlb_gpu/Makefile
example/Vector/7_SPH_dlb_gpu/Makefile
+15
-2
example/Vector/7_SPH_dlb_gpu/main.cu
example/Vector/7_SPH_dlb_gpu/main.cu
+10
-0
example/Vector/7_SPH_dlb_gpu_opt/Makefile
example/Vector/7_SPH_dlb_gpu_opt/Makefile
+16
-2
example/Vector/7_SPH_dlb_gpu_opt/main.cu
example/Vector/7_SPH_dlb_gpu_opt/main.cu
+10
-0
install
install
+7
-6
script/conf_PETSC
script/conf_PETSC
+1
-1
No files found.
CMakeLists.txt
View file @
3b2b0b3c
...
...
@@ -115,6 +115,8 @@ endif()
if
(
MPI_FOUND
)
set
(
DEFINE_HAVE_MPI
"#define HAVE_MPI"
)
file
(
WRITE mpi_include_dirs
${
MPI_C_INCLUDE_DIRS
}
)
file
(
WRITE mpi_libs
${
MPI_C_LIBRARIES
}
)
else
()
file
(
WRITE error_code
"200"
)
message
(
FATAL_ERROR
"MPI is required in order to install OpenFPM"
)
...
...
@@ -153,7 +155,7 @@ else()
message
(
FATAL_ERROR
"LibHilbert is required in order to install OpenFPM"
)
endif
()
if
(
SUITESPARSE_FOUND
)
if
(
SUITESPARSE_FOUND
AND SuiteSparse_UMFPACK_FOUND
)
set
(
DEFINE_HAVE_SUITESPARSE
"#define HAVE_SUITESPARSE"
)
endif
()
...
...
example/Numerics/PS-CMA-ES/main.cpp
View file @
3b2b0b3c
...
...
@@ -143,6 +143,20 @@
//! [ps_cma_es_inclusion]
// This example need EIGEN, if we do not have NOP the full example
#include "config.h"
#ifndef HAVE_EIGEN
int
main
(
int
argc
,
char
*
argv
[])
{
return
0
;
}
#else
#define EIGEN_USE_LAPACKE
#include "Vector/vector_dist.hpp"
#include "DMatrix/EMatrix.hpp"
...
...
@@ -1313,3 +1327,5 @@ int main(int argc, char* argv[])
*
*/
}
#endif
example/Vector/3_molecular_dynamic_gpu_opt/Makefile
View file @
3b2b0b3c
include
../../example.mk
CUDA_CC
=
ifeq
(, $(shell which nvcc))
CUDA_CC
=
mpic++
-x
c++
$(INCLUDE_PATH)
INCLUDE_PATH_NVCC
=
else
CUDA_CC
=
nvcc
endif
CC_SCOREP
=
scorep
--nocompiler
--cuda
--mpp
=
mpi nvcc
CC
=
nvcc
#
${CC_SCOREP}
CC
=
$(CUDA_CC)
#
${CC_SCOREP}
CC_MPI
=
mpic++
LDIR
=
...
...
example/Vector/7_SPH_dlb_gpu/Makefile
View file @
3b2b0b3c
include
../../example.mk
### This is a trick to avoid "Command not found if you no not have NVCC compiler". In practice the normal C++ compiler is used
### internally the example disable with the preprocessor its code if not compiled with nvcc
CUDA_CC
=
CUDA_CC_LINK
=
ifeq
(, $(shell which nvcc))
CUDA_CC
=
mpic++
-x
c++
$(INCLUDE_PATH)
INCLUDE_PATH_NVCC
=
CUDA_CC_LINK
=
mpic++
else
CUDA_CC
=
nvcc
CUDA_CC_LINK
=
nvcc
endif
CC
=
mpic++
LDIR
=
...
...
@@ -12,13 +25,13 @@ sph_dlb_test: OPT += -DTEST_RUN
sph_dlb_test
:
sph_dlb
%.o
:
%.cu
nvcc
-O3
$(OPT)
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
$(CUDA_CC)
-O3
$(OPT)
-g
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
%.o
:
%.cpp
$(CC)
-O3
$(OPT)
-g
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
sph_dlb
:
$(OBJ)
$(C
C
)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
$(C
UDA_CC_LINK
)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
all
:
sph_dlb
...
...
example/Vector/7_SPH_dlb_gpu/main.cu
View file @
3b2b0b3c
...
...
@@ -43,6 +43,8 @@
*
*/
#ifdef __NVCC__
#include "Vector/vector_dist.hpp"
#include <math.h>
#include "Draw/DrawParticles.hpp"
...
...
@@ -991,3 +993,11 @@ int main(int argc, char* argv[])
openfpm_finalize
();
}
#else
int
main
(
int
argc
,
char
*
argv
[])
{
return
0
;
}
#endif
example/Vector/7_SPH_dlb_gpu_opt/Makefile
View file @
3b2b0b3c
include
../../example.mk
### This is a trick to avoid "Command not found if you no not have NVCC compiler". In practice the normal C++ compiler is used
### internally the example disable with the preprocessor its code if not compiled with nvcc
CUDA_CC
=
CUDA_CC_LINK
=
ifeq
(, $(shell which nvcc))
CUDA_CC
=
mpic++
-x
c++
$(INCLUDE_PATH)
INCLUDE_PATH_NVCC
=
CUDA_CC_LINK
=
mpic++
else
CUDA_CC
=
nvcc
CUDA_CC_LINK
=
nvcc
endif
CC
=
mpic++
LDIR
=
...
...
@@ -12,13 +26,13 @@ sph_dlb_test: OPT += -DTEST_RUN
sph_dlb_test
:
sph_dlb
%.o
:
%.cu
nvcc
-O3
$(OPT)
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
$(CUDA_CC)
-O3
$(OPT)
-g
-c
-isystem
=
/home/i-bird/MPI/include
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH_NVCC)
%.o
:
%.cpp
$(CC)
-O3
$(OPT)
-g
-c
--std
=
c++11
-o
$@
$<
$(INCLUDE_PATH)
sph_dlb
:
$(OBJ)
$(C
C
)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
$(C
UDA_CC_LINK
)
-o
$@
$^
$(CFLAGS)
$(LIBS_PATH)
$(LIBS)
all
:
sph_dlb
...
...
example/Vector/7_SPH_dlb_gpu_opt/main.cu
View file @
3b2b0b3c
...
...
@@ -37,6 +37,8 @@
*
*/
#ifdef __NVCC__
#include "Vector/vector_dist.hpp"
#include <math.h>
#include "Draw/DrawParticles.hpp"
...
...
@@ -940,3 +942,11 @@ int main(int argc, char* argv[])
openfpm_finalize
();
}
#else
int
main
(
int
argc
,
char
*
argv
[])
{
return
0
;
}
#endif
install
View file @
3b2b0b3c
...
...
@@ -425,15 +425,15 @@ elif [ -d "$i_dir/HDF5/lib64" ]; then
fi
echo
"INCLUDE_PATH=-Wno-deprecated-declarations
$openmp_flags
-I. -I
$install_base
/openfpm_numerics/include -I
$install_base
/openfpm_pdata/include/config -I
$install_base
/openfpm_pdata/include -I
$install_base
/openfpm_data/include -I
$install_base
/openfpm_vcluster/include -I
$install_base
/openfpm_io/include -I
$install_base
/openfpm_devices/include -I
$i_dir
/METIS/include -I
$i_dir
/PARMETIS/include -I
$i_dir
/BOOST/include -I
$i_dir
/HDF5/include -I
$i_dir
/LIBHILBERT/include
$lin_alg_inc
"
>
example.mk
echo
"LIBS_PATH=
$openmp_flags
-L
$install_base
/openfpm_devices/lib -L
$install_base
/openfpm_pdata/lib -L
$install_base
/openfpm_vcluster/lib -L
$i_dir
/METIS/lib -L
$i_dir
/PARMETIS/lib -L
$i_dir
/BOOST/lib -L
$hdf5_lib
-L
$i_dir
/LIBHILBERT/lib
$lin_alg_dir
"
>>
example.mk
echo
"LIBS_PATH=
$openmp_flags
-L
$install_base
/openfpm_devices/lib -L
$install_base
/openfpm_pdata/lib -L
$install_base
/openfpm_vcluster/lib -L
$i_dir
/METIS/lib -L
$i_dir
/PARMETIS/lib -L
$i_dir
/BOOST/lib -L
$hdf5_lib
-L
$i_dir
/LIBHILBERT/lib
$lin_alg_dir
"
>>
example.mk
if
[
x
"
$gpu_support
"
==
x
"1"
]
;
then
echo
"LIBS=-lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert
$(
cat
cuda_lib
)
$lin_alg_lib
"
>>
example.mk
echo
"LIBS=-lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert
$(
cat
cuda_lib
)
$lin_alg_lib
$(
cat
mpi_libs
)
-ldl
"
>>
example.mk
echo
"LIBS_SE2=-lvcluster -lofpmmemory_se2 -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert
$(
cat
cuda_lib
)
$lin_alg_lib
"
>>
example.mk
else
echo
"LIBS=-lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert
$lin_alg_lib
"
>>
example.mk
echo
"LIBS=-lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert
$lin_alg_lib
$(
cat
mpi_libs
)
-ldl
"
>>
example.mk
echo
"LIBS_SE2=-lvcluster -lofpmmemory_se2 -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert
$lin_alg_lib
"
>>
example.mk
fi
echo
"INCLUDE_PATH_NVCC=-Xcompiler="
-Wno-deprecated-declarations
"
$(
cat
openmp_flags
)
-Xcudafe
\"
--display_error_number --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111
\"
--expt-extended-lambda -I. -I
$install_base
/openfpm_numerics/include -I
$install_base
/openfpm_pdata/include/config -I
$install_base
/openfpm_pdata/include -I
$install_base
/openfpm_data/include -I
$install_base
/openfpm_vcluster/include -I
$install_base
/openfpm_io/include -I
$install_base
/openfpm_devices/include -I
$i_dir
/METIS/include -I
$i_dir
/PARMETIS/include -I
$i_dir
/BOOST/include -I
$i_dir
/HDF5/include -I
$i_dir
/LIBHILBERT/include
$lin_alg_inc
"
>>
example.mk
echo
"INCLUDE_PATH_NVCC=-Xcompiler="
-Wno-deprecated-declarations
"
$(
cat
openmp_flags
)
-Xcudafe
\"
--display_error_number --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111
\"
--expt-extended-lambda -I. -I
$install_base
/openfpm_numerics/include -I
$install_base
/openfpm_pdata/include/config -I
$install_base
/openfpm_pdata/include -I
$install_base
/openfpm_data/include -I
$install_base
/openfpm_vcluster/include -I
$install_base
/openfpm_io/include -I
$install_base
/openfpm_devices/include -I
$i_dir
/METIS/include -I
$i_dir
/PARMETIS/include -I
$i_dir
/BOOST/include -I
$i_dir
/HDF5/include -I
$i_dir
/LIBHILBERT/include
$lin_alg_inc
-I
$(
cat
mpi_include_dirs
)
"
>>
example.mk
cp
example.mk src/example.mk
cp
example.mk example/example.mk
...
...
@@ -534,7 +534,8 @@ else
installation_report
=
"
$installation_report
\0
33[91;1mOPENBLAS
\0
33[0m Installed:
\0
33[1m NO
\0
33[0m
\n
"
fi
if
[
-d
"
$i_dir
/SUITESPARSE"
]
;
then
if
[
-d
"
$i_dir
/SUITESPARSE"
-a
-f
"
$i_dir
/SUITESPARSE/include/umfpack.h"
]
;
then
installation_report
=
"
$installation_report
\0
33[92;1mSUITESPARSE
\0
33[0m Installed:
\0
33[1m
$i_dir
/SUITESPARSE
\0
33[0m
\n
"
bash_library
=
"
$bash_library
:
$i_dir
/SUITESPARSE/lib"
else
...
...
@@ -576,8 +577,8 @@ fi
echo
""
echo
-e
"
\0
33[1m source
$HOME
/openfpm_vars
\0
33[0m"
echo
""
echo
-e
"
\0
33[91;1m if you have in your .bashrc or .bash_profile old openfpm setting, please remove it
\0
33[0m"
echo
""
echo
-e
"Remember to do:
\0
33[91;5;1m make install
\0
33[0m"
echo
""
if
[
x
"
$inst_lin_alg
"
==
"y"
-a
x
"
$lin_alg_installed
"
==
x
""
]
;
then
conf_err
=
1
...
...
script/conf_PETSC
View file @
3b2b0b3c
...
...
@@ -14,7 +14,7 @@ function conf_PETSC()
lin_alg_inc
=
"
$lin_alg_inc
-I
$i_dir
/OPENBLAS/include"
configure_blas_option
=
"--with-blas=
$i_dir
/OPENBLAS/"
fi
if
[
-d
"
$
i_dir
/SUITESPARSE
"
]
;
then
if
[
-d
"
$
1
/SUITESPARSE"
-a
-f
"
$1
/SUITESPARSE/include/umfpack.h
"
]
;
then
lin_alg_dir
=
"
$lin_alg_dir
-L
$i_dir
/SUITESPARSE/lib"
lin_alg_inc
=
"
$lin_alg_inc
-I
$i_dir
/SUITESPARSE/include"
lin_alg_lib
=
"
$lin_alg_lib
-lumfpack -lamd -lbtf -lcamd -lccolamd -lcholmod -lcolamd -lcxsparse -lklu -ldl -lrbio -lspqr -lsuitesparseconfig"
...
...
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