Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
O
openfpm_vcluster
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_vcluster
Commits
0b0d5b3a
Commit
0b0d5b3a
authored
Nov 15, 2018
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing detection of multiple GPU on one node
parent
40018f31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
src/VCluster/VCluster_base.hpp
src/VCluster/VCluster_base.hpp
+16
-4
No files found.
src/VCluster/VCluster_base.hpp
View file @
0b0d5b3a
...
...
@@ -23,6 +23,7 @@
#include "data_type/aggregate.hpp"
#if defined(CUDA_GPU) && defined(__NVCC__)
#include "util/cuda/moderngpu/launch_box.hxx"
#include "util/cuda/ofp_context.hxx"
#endif
#ifdef HAVE_PETSC
...
...
@@ -143,7 +144,7 @@ class Vcluster_base
std
::
vector
<
int
>
post_exe
;
//! standard context for mgpu (if cuda is detected otherwise is unused)
mgpu
::
standard
_context_t
*
context
;
mgpu
::
ofp
_context_t
*
context
;
// Object array
...
...
@@ -183,6 +184,9 @@ class Vcluster_base
//! disable operator=
Vcluster_base
&
operator
=
(
const
Vcluster_base
&
)
{
return
*
this
;};
//! rank within the node
int
shmrank
;
//! disable copy constructor
Vcluster_base
(
const
Vcluster_base
&
)
:
NBX_cnt
(
0
)
...
...
@@ -249,8 +253,16 @@ public:
// Check if MPI is already initialized
if
(
!
already_initialised
)
{
MPI_Init
(
argc
,
argv
);
// We try to get the local processors rank
MPI_Comm
shmcomm
;
MPI_Comm_split_type
(
MPI_COMM_WORLD
,
MPI_COMM_TYPE_SHARED
,
0
,
MPI_INFO_NULL
,
&
shmcomm
);
MPI_Comm_size
(
shmcomm
,
&
shmrank
);
MPI_Comm_free
(
&
shmcomm
);
}
// Get the total number of process
...
...
@@ -280,7 +292,7 @@ public:
#if defined(CUDA_GPU) && defined(__NVCC__)
context
=
new
mgpu
::
standard_context_t
(
false
);
context
=
new
mgpu
::
ofp_context_t
(
false
,
shmrank
);
#endif
}
...
...
@@ -343,7 +355,7 @@ public:
* \param iw ignore warning
*
*/
mgpu
::
standard
_context_t
&
getmgpuContext
(
bool
iw
=
true
)
mgpu
::
ofp
_context_t
&
getmgpuContext
(
bool
iw
=
true
)
{
if
(
context
==
NULL
&&
iw
==
true
)
{
...
...
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