Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sten Delos
Gadget4
Commits
f1622ff9
Commit
f1622ff9
authored
Oct 08, 2020
by
Volker Springel
Browse files
some clean up of outcommented old lines
parent
16e5bffe
Changes
17
Hide whitespace changes
Inline
Side-by-side
src/data/macros.h
View file @
f1622ff9
...
...
@@ -44,13 +44,4 @@
fclose(fd__); \
}
/*! \brief A wrapper for the printf() function
*
* This macro has the same functionalities of the standard printf()
* function. However, data is written to the standard output only for
* the task with rank 0
*
* \param fmt string that contains format arguments
*/
#endif
src/data/simparticles.h
View file @
f1622ff9
...
...
@@ -317,23 +317,20 @@ class simparticles : public intposconvert, public setcomm
*/
void
dump_particles
(
void
)
{
/*
FILE
*
fd
;
char
buffer
[
200
];
sprintf
(
buffer
,
"particles_%d.dat"
,
ThisTask
);
if
((
fd
=
fopen
(
buffer
,
"w"
)))
{
my_
fwrite(&NumPart, 1, sizeof(int), fd);
fwrite
(
&
NumPart
,
1
,
sizeof
(
int
),
fd
);
for
(
int
i
=
0
;
i
<
NumPart
;
i
++
)
my_
fwrite(&P[i].IntPos[0], 3, sizeof(MyIntPosType), fd);
fwrite
(
&
P
[
i
].
IntPos
[
0
],
3
,
sizeof
(
MyIntPosType
),
fd
);
for
(
int
i
=
0
;
i
<
NumPart
;
i
++
)
my_
fwrite(&P[i].Vel[0], 3, sizeof(MyFloat), fd);
fwrite
(
&
P
[
i
].
Vel
[
0
],
3
,
sizeof
(
MyFloat
),
fd
);
for
(
int
i
=
0
;
i
<
NumPart
;
i
++
)
my_
fwrite(&P[i].ID, 1, sizeof(
int
), fd);
fwrite
(
&
P
[
i
].
ID
,
1
,
sizeof
(
MyIDStorage
),
fd
);
fclose
(
fd
);
}
*/
}
/** \brief Print information relative to a particle / cell to standard output.
...
...
src/domain/domain_balance.cc
View file @
f1622ff9
...
...
@@ -717,33 +717,11 @@ void domain<simparticles>::domain_init_sum_cost(void)
#if defined(LIGHTCONE) && defined(LIGHTCONE_PARTICLES)
/*
template <>
double domain<lcparticles>::domain_grav_tot_costfactor(int i)
{
return 1.0;
}
template <>
double domain<lcparticles>::domain_hydro_tot_costfactor(int i)
{
return 0;
}
*/
/*
template <>
void domain<lcparticles>::domain_combine_multipledomains(void)
{
}
*/
template
<
>
void
domain
<
lcparticles
>::
domain_init_sum_cost
(
void
)
{
for
(
int
i
=
0
;
i
<
TIMEBINS
;
i
++
)
{
// domain_bintolevel[i] = -1;
// domain_refbin[i] = -1;
domain_to_be_balanced
[
i
]
=
0
;
domain_grav_weight
[
i
]
=
1
;
domain_hydro_weight
[
i
]
=
1
;
...
...
src/domain/domain_exchange.cc
View file @
f1622ff9
...
...
@@ -54,10 +54,6 @@ void domain<partset>::domain_resize_storage(int count_get_total, int count_get_s
int
maxpartsphNew
=
max_sphload
/
(
1.0
-
2
*
ALLOC_TOLERANCE
);
if
(
option_flag
==
2
)
{
/*
if(maxpartsphNew > NgbTree.MaxPart)
ngb_treemodifylength(maxpartsphNew - NgbTree.MaxPart);
*/
Terminate
(
"need to reactivate this"
);
}
Tp
->
reallocate_memory_maxpartsph
(
maxpartsphNew
);
...
...
@@ -80,9 +76,6 @@ void domain<partset>::domain_countToGo(int *toGoDM, int *toGoSph)
{
int
no
=
n_to_no
(
n
);
// FIXME: Why is this check to stay on local domain disabled?
// if(TaskOfLeaf[no] != ThisTask)
if
(
Tp
->
P
[
n
].
getType
()
==
0
)
toGoSph
[
TaskOfLeaf
[
no
]]
++
;
else
...
...
src/domain/domain_toplevel.cc
View file @
f1622ff9
...
...
@@ -83,13 +83,8 @@ void domain<partset>::domain_do_local_refine(int n, int *list)
allreduce_sum
<
double
>
(
worklist
,
8
*
n
,
Communicator
);
allreduce_sum
<
long
long
>
(
countlist
,
8
*
n
,
Communicator
);
/*
MPI_Allreduce(MPI_IN_PLACE, worklist, 8 * n, MPI_DOUBLE, MPI_SUM, Communicator);
MPI_Allreduce(MPI_IN_PLACE, countlist, 8 * n, MPI_LONG_LONG, MPI_SUM, Communicator);
*/
/* store the results in the corresponding top nodes */
for
(
int
k
=
0
;
k
<
n
;
k
++
)
{
int
i
=
list
[
k
];
...
...
src/io/io.h
View file @
f1622ff9
...
...
@@ -271,14 +271,4 @@ class IO_Def : public io_streamcount, public setcomm
#define FLAG_ZELDOVICH_ICS 1
#define FLAG_SECOND_ORDER_ICS 2
/* functions visible in the whole code */
/*
void test_io_bandwidth(void);
void dump_particles(void);
*/
#endif
src/lightcone/lightcone_massmap_io.h
View file @
f1622ff9
...
...
@@ -62,10 +62,6 @@ class lightcone_massmap_io : public IO_Def
lightcone
*
LightCone
;
int
selected_bnd
;
/*
* special input/output functions for certain fields
*/
};
#endif
...
...
src/mergertree/io_halotrees.cc
View file @
f1622ff9
...
...
@@ -121,18 +121,6 @@ halotrees_io::halotrees_io(mergertree *MergerTree_ptr, MPI_Comm comm, int format
init_field
(
"TRIX"
,
"TreeIndex"
,
MEM_INT
,
FILE_INT
,
SKIP_ON_READ
,
1
,
A_H
,
&
MergerTree
->
Halos
[
0
].
TreeIndex
,
NULL
,
TREEHALOS
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
true
);
/* we don't need to store the links in terms of the global subhalo numbers for full timeslices */
/*
init_field("UGRN", "UniqueGroupNr", MEM_INT64, FILE_INT64, SKIP_ON_READ, 1, A_H, &MergerTree->Halos[0].UniqueGroupNr, NULL,
TREEHALOS, 0, 0, 0, 0, 0, 0, 0);
init_field("DESC", "DescSubhaloNr", MEM_INT64, FILE_INT64, SKIP_ON_READ, 1, A_H, &MergerTree->Halos[0].DescSubhaloNr, NULL,
TREEHALOS, 0, 0, 0, 0, 0, 0, 0);
init_field("NEXT", "NextProgSubhaloNr", MEM_INT64, FILE_INT64, SKIP_ON_READ, 1, A_H, &MergerTree->Halos[0].NextProgSubhaloNr, NULL,
TREEHALOS, 0, 0, 0, 0, 0, 0, 0);
init_field("FRST", "FirstProgSubhaloNr", MEM_INT64, FILE_INT64, SKIP_ON_READ, 1, A_H, &MergerTree->Halos[0].FirstProgSubhaloNr, NULL,
TREEHALOS, 0, 0, 0, 0, 0, 0, 0);
*/
/**** output times */
init_field
(
"REDS"
,
"Redshift"
,
MEM_DOUBLE
,
FILE_DOUBLE
,
SKIP_ON_READ
,
1
,
A_CT
,
&
MergerTree
->
CatTimes
[
0
].
Redshift
,
NULL
,
TREETIMES
,
0
,
...
...
src/mergertree/mergertree.h
View file @
f1622ff9
...
...
@@ -565,10 +565,5 @@ class mergertree : public setcomm
void
halotrees_select_interior_min_newtreeid
(
int
mode
,
tlink
*
treehalos
,
long
long
totnsubs
);
};
/* In the following structure, we accumulate the main result of this routine, namely for each previous
* subhalo (identified through PrevSubhaloNr), the number of the descendant subhalo (DescSubhaloNr) in
* the present, newly calculated subhalo catalogue. MaxScore is a helper variable that gives the score
* of the presently associated descendant. If there is no descendant, DescSubhaloNr has the value -1 (check). */
#endif
#endif
src/mpi_utils/generic_comm.h
View file @
f1622ff9
...
...
@@ -217,11 +217,6 @@ class generic_comm
sprintf
(
callorigin
,
"%s|%d|"
,
file
,
line
);
/*
mpi_printf("GENERIC: file %s, line %d: MinSpace = %g MB NTopleaves = %d ExportSpace = %g MB\n", file, line,
MinSpace / (1024.0 * 1024.0), D->NTopleaves, ExportSpace / (1024.0 * 1024.0));
*/
if
(
ExportSpace
<
MinSpace
)
{
Mem
.
dump_memory_table
();
...
...
@@ -248,8 +243,7 @@ class generic_comm
Thread
.
PartList
=
(
data_partlist
*
)
Mem
.
mymalloc_movable_g
(
&
Thread
.
PartList
,
"PartList"
,
ExportSpace
);
/* note: the NodeList array will be attached to the end of this buffer, growing backwards */
/* Thread[i].NodeList = (data_nodelist *) (((char *) Thread[i].PartList) + InitialSpace);
*/
Thread
.
Ngblist
=
(
int
*
)
Mem
.
mymalloc_movable_g
(
&
Thread
.
Ngblist
,
"Ngblist"
,
Tp
->
NumPart
*
sizeof
(
int
));
Thread
.
Shmranklist
=
(
int
*
)
Mem
.
mymalloc_movable_g
(
&
Thread
.
Shmranklist
,
"Shmranklist"
,
Tp
->
NumPart
*
sizeof
(
int
));
Thread
.
Exportflag
=
Exportflag
;
...
...
src/mpi_utils/healthtest.cc
View file @
f1622ff9
...
...
@@ -154,18 +154,11 @@ double sim::measure_cpu_performance(MPI_Comm Communicator)
MPI_Barrier
(
Communicator
);
/*
mpi_printf(
"\n\nHEALTHTEST: We are stopping because the performance variation=%g of the CPUs lies above the prescribed tolerance "
"MAX_VARIATION_TOLERANCE=%g, possibly indicating a machine problem. (sum=%g)\n",
variation, MAX_VARIATION_TOLERANCE, sum);
*/
// only issue a warning for now instead of terminating the code
warn
(
"
\n\n
HEALTHTEST: We issue a warning because the performance variation=%g of the CPUs lies above the prescribed tolerance "
"MAX_VARIATION_TOLERANCE=%g, possibly indicating a machine problem. (sum=%g)
\n
"
,
variation
,
MAX_VARIATION_TOLERANCE
,
sum
);
// endrun(); // only issue a warning for now
}
return
sum
;
...
...
src/mpi_utils/sizelimited_sendrecv.cc
View file @
f1622ff9
...
...
@@ -50,13 +50,7 @@ int myMPI_Sendrecv(void *sendb, size_t sendcount, MPI_Datatype sendtype, int des
if
(
sendcount
>
count_limit
)
{
send_now
=
count_limit
;
/*
if(iter == 0)
{
printf("Imposing size limit on MPI_Sendrecv() on task=%d (send of size=%lld)\n", ThisTask, (long long) sendcount *
size_sendtype); myflush(stdout);
}
*/
iter
++
;
}
else
...
...
src/sort/cxxsort.h
View file @
f1622ff9
...
...
@@ -49,9 +49,6 @@ double mycxxsort(T *begin, T *end, Tcomp comp)
Mem
.
myfree
(
buf
);
// FIXME: verification, temporary
// if (!std::is_sorted(begin,end,comp)) Terminate ("sort error!");
return
Logs
.
timediff
(
t0
,
Logs
.
second
());
}
...
...
src/subfind/subfind_history.cc
View file @
f1622ff9
...
...
@@ -295,17 +295,6 @@ void fof<partset>::subfind_hbt_single_group(domain<partset> *SubDomain, domain<p
*/
mycxxsort
(
all_candidates
,
all_candidates
+
totcand
,
subfind_hbt_compare_subcand_summedprevlen
);
if
(
maxlen_candidate
.
SubhaloNr
!=
all_candidates
[
totcand
-
1
].
SubhaloNr
)
{
/*
printf(
"SUBFIND_HBT: Made a different decision on largest on task=%d: select one with len=%lld over len=%lld because "
"sumprevlen=%lld is bigger than %lld\n",
ThisTask, (long long)all_candidates[totcand - 1].len, (long long)maxlen_candidate.len,
(long long)all_candidates[totcand - 1].summedprevlen, (long long)maxlen_candidate.summedprevlen);
*/
}
totcand
--
;
for
(
int
k
=
0
;
k
<
NumPartGroup
;
k
++
)
if
(
Tp
->
PS
[
IndexList
[
k
]].
SubhaloNr
==
all_candidates
[
totcand
].
SubhaloNr
)
...
...
src/time_integration/timestep_treebased.cc
View file @
f1622ff9
...
...
@@ -115,24 +115,6 @@ inline int sph::sph_treetimestep_evaluate_particle_node_opening_criterion(pinfo
if
(
right
[
2
]
<
0
||
left
[
2
]
>
0
)
return
NODE_DISCARD
;
/*
double ctr[3];
Tp->intpos_to_pos(nop->center.da, ctr);
MyIntPosType halflen = ((MyIntPosType)1) << ((BITS_FOR_POSITIONS - 1) - nop->level);
vector<MyReal> dxyz;
Tp->nearest_image_intpos_to_pos(nop->center.da, pdat.searchcenter, dxyz.da);
double r2 = dxyz.r2();
printf("level=%d center=(%g|%g|%g) dist=%g lenhalf=%g dt*vsig=%g \n ", nop->level, ctr[0], ctr[1], ctr[2], sqrt(r2),
halflen * Tp->FacIntToCoord,
SphP->CurrentMaxTiStep * vsig);
*/
return
NODE_OPEN
;
}
...
...
src/tree/tree.cc
View file @
f1622ff9
...
...
@@ -100,12 +100,7 @@ int tree<node, partset, point_data, foreign_point_data>::treebuild(int ninsert,
if
(
newvalue
<
oldvalue
)
{
treefree
();
/*
D->mpi_printf("TREE: max_numnodes=%d MaxNodes=%d D->NTopnodes=%d\n", max_numnodes, MaxNodes,
D->NTopnodes);
D->mpi_printf("TREE: Decreasing TreeAllocFactor, new value=%g, old value=%g\n", newvalue,
oldvalue);
*/
All
.
TreeAllocFactor
=
newvalue
;
flag
=
-
1
;
treeallocate
(
Tp
->
NumPart
,
Tp
,
D
);
...
...
@@ -1189,11 +1184,6 @@ void tree<node, partset, point_data, foreign_point_data>::tree_fetch_foreign_nod
nop
->
nextnode
=
pfirst
;
nop
->
nextnode_shmrank
=
Shmem
.
Island_ThisTask
;
// if(nop->cannot_be_opened_locally == 0) // don't remove this: acts a barrier to prevent
// the compiler from
// Terminate("bummer"); // reordering the store operation on
// 'cannot_be_opened_locally'
nop
->
cannot_be_opened_locally
.
store
(
0
,
std
::
memory_order_release
);
sum_NumForeignNodes
+=
n_nodes
;
...
...
src/tree/tree.h
View file @
f1622ff9
...
...
@@ -164,9 +164,6 @@ class tree
int
TreeInfoHandle
;
/** Number of tree nodes allocated (and counted in NumNodes) but actually
* unused (can happen with NUM_THREADS > 1 && TAKE_NSLOTS_IN_ONE_GO > 1) */
double
Buildtime
;
int
NumOnFetchStack
;
...
...
Write
Preview
Supports
Markdown
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