Indent more conventionally
This commit is contained in:
parent
2c5a4620ca
commit
00a28c990c
@ -76,13 +76,13 @@ Atrip::Output Atrip::run(Atrip::Input<F> const& in) {
|
|||||||
LOG(0,"Atrip") << "ngcards: " << ngcards << "\n";
|
LOG(0,"Atrip") << "ngcards: " << ngcards << "\n";
|
||||||
if (clusterInfo.ranksPerNode > ngcards) {
|
if (clusterInfo.ranksPerNode > ngcards) {
|
||||||
std::cerr << "ATRIP: You are running on more ranks per node than the number of graphic cards\n"
|
std::cerr << "ATRIP: You are running on more ranks per node than the number of graphic cards\n"
|
||||||
<< "You have " << ngcards << " cards at your disposal\n";
|
<< "You have " << ngcards << " cards at your disposal\n";
|
||||||
throw "";
|
throw "";
|
||||||
}
|
}
|
||||||
if (clusterInfo.ranksPerNode < ngcards) {
|
if (clusterInfo.ranksPerNode < ngcards) {
|
||||||
std::cerr << "You have " << ngcards << " cards at your disposal\n"
|
std::cerr << "You have " << ngcards << " cards at your disposal\n"
|
||||||
<< "You will be only using " << clusterInfo.ranksPerNode
|
<< "You will be only using " << clusterInfo.ranksPerNode
|
||||||
<< ", i.e., the nubmer of ranks.\n";
|
<< ", i.e., the nubmer of ranks.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -106,23 +106,23 @@ Atrip::Output Atrip::run(Atrip::Input<F> const& in) {
|
|||||||
cuDeviceTotalMem(&memory.total, dev);
|
cuDeviceTotalMem(&memory.total, dev);
|
||||||
|
|
||||||
printf("\n"
|
printf("\n"
|
||||||
"CUDA CARD RANK %d\n"
|
"CUDA CARD RANK %d\n"
|
||||||
"=================\n"
|
"=================\n"
|
||||||
"\tnumber: %1$d\n"
|
"\tnumber: %1$d\n"
|
||||||
"\tname: %s\n"
|
"\tname: %s\n"
|
||||||
"\tMem. clock rate (KHz): %d\n"
|
"\tMem. clock rate (KHz): %d\n"
|
||||||
"\tShared Mem Per Block (KB): %f\n"
|
"\tShared Mem Per Block (KB): %f\n"
|
||||||
"\tAvail. Free/Total mem (GB): %f/%f\n"
|
"\tAvail. Free/Total mem (GB): %f/%f\n"
|
||||||
"\tFree memory (GB): %f\n"
|
"\tFree memory (GB): %f\n"
|
||||||
"\n",
|
"\n",
|
||||||
Atrip::rank,
|
Atrip::rank,
|
||||||
name,
|
name,
|
||||||
prop.clockRate,
|
prop.clockRate,
|
||||||
prop.sharedMemPerBlock / 1024.0,
|
prop.sharedMemPerBlock / 1024.0,
|
||||||
memory.avail.free / 1024.0 / 1024.0 / 1024.0 ,
|
memory.avail.free / 1024.0 / 1024.0 / 1024.0 ,
|
||||||
memory.avail.total / 1024.0 / 1024.0 / 1024.0,
|
memory.avail.total / 1024.0 / 1024.0 / 1024.0,
|
||||||
memory.total / 1024.0 / 1024.0 / 1024.0
|
memory.total / 1024.0 / 1024.0 / 1024.0
|
||||||
);
|
);
|
||||||
std::free((void*)name);
|
std::free((void*)name);
|
||||||
}
|
}
|
||||||
MPI_Barrier(universe);
|
MPI_Barrier(universe);
|
||||||
@ -249,19 +249,18 @@ Atrip::Output Atrip::run(Atrip::Input<F> const& in) {
|
|||||||
const size_t nIterations = tuplesList.size();
|
const size_t nIterations = tuplesList.size();
|
||||||
{
|
{
|
||||||
LOG(0,"Atrip") << "#iterations: "
|
LOG(0,"Atrip") << "#iterations: "
|
||||||
<< nIterations
|
<< nIterations
|
||||||
<< "/"
|
<< "/"
|
||||||
<< nIterations * np
|
<< nIterations * np
|
||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
const size_t
|
const size_t
|
||||||
iterationMod = (in.percentageMod > 0)
|
iterationMod = (in.percentageMod > 0)
|
||||||
? nIterations * in.percentageMod / 100.0
|
? nIterations * in.percentageMod / 100.0
|
||||||
: in.iterationMod
|
: in.iterationMod
|
||||||
|
, iteration1Percent = nIterations * 0.01
|
||||||
, iteration1Percent = nIterations * 0.01
|
;
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -293,20 +292,20 @@ Atrip::Output Atrip::run(Atrip::Input<F> const& in) {
|
|||||||
|
|
||||||
WITH_CHRONO("oneshot-db:comm:allgather",
|
WITH_CHRONO("oneshot-db:comm:allgather",
|
||||||
WITH_CHRONO("db:comm:allgather",
|
WITH_CHRONO("db:comm:allgather",
|
||||||
MPI_Allgather( ldb.data()
|
MPI_Allgather(ldb.data(),
|
||||||
// , ldb.size() * sizeof(typename Slice<F>::LocalDatabaseElement)
|
/* ldb.size() * sizeof(typename
|
||||||
, ldb.size()
|
Slice<F>::LocalDatabaseElement) */
|
||||||
, MPI_LDB_ELEMENT
|
ldb.size(),
|
||||||
, db.data()
|
MPI_LDB_ELEMENT,
|
||||||
// , ldb.size() * sizeof(typename Slice<F>::LocalDatabaseElement)
|
db.data(),
|
||||||
, ldb.size()
|
/* ldb.size() * sizeof(typename
|
||||||
, MPI_LDB_ELEMENT
|
Slice<F>::LocalDatabaseElement), */
|
||||||
, c);
|
ldb.size(),
|
||||||
|
MPI_LDB_ELEMENT,
|
||||||
|
c);
|
||||||
))
|
))
|
||||||
|
|
||||||
WITH_CHRONO("db:comm:type:free",
|
WITH_CHRONO("db:comm:type:free", MPI_Type_free(&MPI_LDB_ELEMENT);)
|
||||||
MPI_Type_free(&MPI_LDB_ELEMENT);
|
|
||||||
)
|
|
||||||
|
|
||||||
return db;
|
return db;
|
||||||
};
|
};
|
||||||
@ -575,30 +574,30 @@ Atrip::Output Atrip::run(Atrip::Input<F> const& in) {
|
|||||||
)))
|
)))
|
||||||
WITH_CHRONO("oneshot-doubles",
|
WITH_CHRONO("oneshot-doubles",
|
||||||
WITH_CHRONO("doubles",
|
WITH_CHRONO("doubles",
|
||||||
doublesContribution<F>( abc, (size_t)No, (size_t)Nv
|
doublesContribution<F>(abc, (size_t)No, (size_t)Nv,
|
||||||
// -- VABCI
|
// -- VABCI
|
||||||
, abph.unwrapSlice(Slice<F>::AB, abc)
|
abph.unwrapSlice(Slice<F>::AB, abc),
|
||||||
, abph.unwrapSlice(Slice<F>::AC, abc)
|
abph.unwrapSlice(Slice<F>::AC, abc),
|
||||||
, abph.unwrapSlice(Slice<F>::BC, abc)
|
abph.unwrapSlice(Slice<F>::BC, abc),
|
||||||
, abph.unwrapSlice(Slice<F>::BA, abc)
|
abph.unwrapSlice(Slice<F>::BA, abc),
|
||||||
, abph.unwrapSlice(Slice<F>::CA, abc)
|
abph.unwrapSlice(Slice<F>::CA, abc),
|
||||||
, abph.unwrapSlice(Slice<F>::CB, abc)
|
abph.unwrapSlice(Slice<F>::CB, abc),
|
||||||
// -- VHHHA
|
// -- VHHHA,
|
||||||
, hhha.unwrapSlice(Slice<F>::A, abc)
|
hhha.unwrapSlice(Slice<F>::A, abc),
|
||||||
, hhha.unwrapSlice(Slice<F>::B, abc)
|
hhha.unwrapSlice(Slice<F>::B, abc),
|
||||||
, hhha.unwrapSlice(Slice<F>::C, abc)
|
hhha.unwrapSlice(Slice<F>::C, abc),
|
||||||
// -- TA
|
// -- TA,
|
||||||
, taphh.unwrapSlice(Slice<F>::A, abc)
|
taphh.unwrapSlice(Slice<F>::A, abc),
|
||||||
, taphh.unwrapSlice(Slice<F>::B, abc)
|
taphh.unwrapSlice(Slice<F>::B, abc),
|
||||||
, taphh.unwrapSlice(Slice<F>::C, abc)
|
taphh.unwrapSlice(Slice<F>::C, abc),
|
||||||
// -- TABIJ
|
// -- TABIJ
|
||||||
, tabhh.unwrapSlice(Slice<F>::AB, abc)
|
tabhh.unwrapSlice(Slice<F>::AB, abc),
|
||||||
, tabhh.unwrapSlice(Slice<F>::AC, abc)
|
tabhh.unwrapSlice(Slice<F>::AC, abc),
|
||||||
, tabhh.unwrapSlice(Slice<F>::BC, abc)
|
tabhh.unwrapSlice(Slice<F>::BC, abc),
|
||||||
// -- TIJK
|
// -- TIJK
|
||||||
, (DataFieldType<F>*)Tijk
|
(DataFieldType<F>*)Tijk,
|
||||||
);
|
);
|
||||||
WITH_RANK << iteration << "-th doubles done\n";
|
WITH_RANK << iteration << "-th doubles done\n";
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -618,16 +617,19 @@ Atrip::Output Atrip::run(Atrip::Input<F> const& in) {
|
|||||||
)
|
)
|
||||||
WITH_CHRONO("singles",
|
WITH_CHRONO("singles",
|
||||||
#if defined(HAVE_CUDA)
|
#if defined(HAVE_CUDA)
|
||||||
singlesContribution<F><<<1,1>>>( No, Nv, abc[0], abc[1], abc[2]
|
singlesContribution<F><<<1,1>>>(No, Nv, abc[0], abc[1], abc[2],
|
||||||
, (DataFieldType<F>*)Tai
|
(DataFieldType<F>*)Tai
|
||||||
#else
|
#else
|
||||||
singlesContribution<F>( No, Nv, abc[0], abc[1], abc[2]
|
singlesContribution<F>(No, Nv, abc[0], abc[1], abc[2],
|
||||||
, Tai.data()
|
Tai.data(),
|
||||||
#endif
|
#endif
|
||||||
, (DataFieldType<F>*)abhh.unwrapSlice(Slice<F>::AB, abc)
|
(DataFieldType<F>*)abhh.unwrapSlice(Slice<F>::AB,
|
||||||
, (DataFieldType<F>*)abhh.unwrapSlice(Slice<F>::AC, abc)
|
abc),
|
||||||
, (DataFieldType<F>*)abhh.unwrapSlice(Slice<F>::BC, abc)
|
(DataFieldType<F>*)abhh.unwrapSlice(Slice<F>::AC,
|
||||||
, (DataFieldType<F>*)Zijk);
|
abc),
|
||||||
|
(DataFieldType<F>*)abhh.unwrapSlice(Slice<F>::BC,
|
||||||
|
abc),
|
||||||
|
(DataFieldType<F>*)Zijk);
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user