Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sbalzarini Lab
S
Software
P
Parallel Computing
OpenFPM
openfpm_vcluster
Commits
9562a44f
Commit
9562a44f
authored
Jul 09, 2017
by
incardon
Browse files
Fixed documentation
parent
09caef4a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Makefile.am
View file @
9562a44f
...
...
@@ -19,6 +19,6 @@ util/Vcluster_log.hpp
.cu.o
:
$(NVCC)
$(NVCCFLAGS)
-o
$@
-c
$<
test
:
vcluster
source
$(HOME)
/openfpm_vars
&&
cd
..
&&
mpirun
-np
3 ./src/vcluster
&&
mpirun
-np
4 ./src/vcluster
test
:
vcluster
_test
source
$(HOME)
/openfpm_vars
&&
cd
..
&&
mpirun
-np
3 ./src/vcluster
_test
&&
mpirun
-np
4 ./src/vcluster
_test
src/VCluster/VCluster_base.hpp
View file @
9562a44f
...
...
@@ -143,9 +143,9 @@ class Vcluster_base
// Single objects
//! number of processes
int
size
;
int
m_
size
;
//! actual rank
int
rank
;
int
m_
rank
;
//! number of processing unit per process
int
numPE
=
1
;
...
...
@@ -238,15 +238,15 @@ public:
// Get the total number of process
// and the rank of this process
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
size
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
m_
size
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
m_
rank
);
#ifdef SE_CLASS2
process_v_cl
=
rank
;
#endif
// create and fill map scatter with one
map_scatter
.
resize
(
size
);
map_scatter
.
resize
(
m_
size
);
for
(
size_t
i
=
0
;
i
<
map_scatter
.
size
()
;
i
++
)
{
...
...
@@ -254,7 +254,7 @@ public:
}
// open the log file
log
.
openLog
(
rank
);
log
.
openLog
(
m_
rank
);
// Initialize bar_req
bar_req
=
MPI_Request
();
...
...
@@ -324,18 +324,55 @@ public:
return
MPI_COMM_WORLD
;
}
//! Get the total number of processing units
/*! \brief Get the total number of processors
*
* \return the total number of processors
*
*/
size_t
getProcessingUnits
()
{
return
size
*
numPE
;
return
m_size
*
numPE
;
}
/*! \brief Get the total number of processors
*
* It is the same as getProcessingUnits()
*
* \see getProcessingUnits()
*
* \return the total number of processors
*
*/
size_t
size
()
{
return
this
->
m_size
*
numPE
;
}
//! Get the process unit id
/*! \brief Get the process unit id
*
* \return the process ID
*
*/
size_t
getProcessUnitID
()
{
return
rank
;
return
m_
rank
;
}
/*! \brief Get the process unit id
*
* It is the same as getProcessUnitID()
*
* \see getProcessUnitID()
*
* \return the process ID
*
*/
size_t
rank
()
{
return
m_rank
;
}
/*! \brief Sum the numbers across all processors and get the result
*
* \param num to reduce, input and output
...
...
@@ -410,15 +447,16 @@ public:
* * 1 message of size 48 byte to processor 7
* * 1 message of size 70 byte to processor 8
*
* \param n_send number of send for this processor [4]
*
* \param prc list of processor with which it should communicate
* [1,1,6,7,8]
*
* \param
sz the array contain the size of the message for each processor
*
(zeros must not be presents) [100,100,50,48,70]
* \param
data data to send for each processors in contain a pointer to some type T
*
this type T must have a method size() that return the size of the data-structure
*
* \param ptr array that contain the pointers to the message to send
* \param prc_recv processor that receive data
*
* \param recv_sz for each processor indicate the size of the data received
*
* \param msg_alloc This is a call-back with the purpose of allocate space
* for the incoming message and give back a valid pointer, supposing that this call-back has been triggered by
...
...
@@ -438,7 +476,13 @@ public:
* \param opt options, NONE (ignored in this moment)
*
*/
template
<
typename
T
>
void
sendrecvMultipleMessagesNBX
(
openfpm
::
vector
<
size_t
>
&
prc
,
openfpm
::
vector
<
T
>
&
data
,
openfpm
::
vector
<
size_t
>
prc_recv
,
openfpm
::
vector
<
size_t
>
&
recv_sz
,
void
*
(
*
msg_alloc
)(
size_t
,
size_t
,
size_t
,
size_t
,
size_t
,
void
*
),
void
*
ptr_arg
,
long
int
opt
=
NONE
)
template
<
typename
T
>
void
sendrecvMultipleMessagesNBX
(
openfpm
::
vector
<
size_t
>
&
prc
,
openfpm
::
vector
<
T
>
&
data
,
openfpm
::
vector
<
size_t
>
prc_recv
,
openfpm
::
vector
<
size_t
>
&
recv_sz
,
void
*
(
*
msg_alloc
)(
size_t
,
size_t
,
size_t
,
size_t
,
size_t
,
void
*
),
void
*
ptr_arg
,
long
int
opt
=
NONE
)
{
// Allocate the buffers
...
...
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