From 95e2214d962d0dbbbd8713f8fdfd3cc3ac426f8d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 3 Feb 2021 20:28:40 -0500 Subject: [PATCH] more typecasts to double to avoid 32-bit int overflows when computing memory usage --- src/BODY/compute_body_local.cpp | 2 +- src/GRANULAR/pair_gran_hooke_history.cpp | 2 +- src/GRANULAR/pair_granular.cpp | 2 +- src/KOKKOS/fix_neigh_history_kokkos.cpp | 2 +- src/KOKKOS/pppm_kokkos.cpp | 2 +- src/KSPACE/pair_lj_cut_tip4p_long.cpp | 2 +- src/KSPACE/pair_lj_long_tip4p_long.cpp | 2 +- src/KSPACE/pair_tip4p_long.cpp | 2 +- src/KSPACE/pppm.cpp | 2 +- src/KSPACE/pppm_dipole.cpp | 2 +- src/KSPACE/pppm_disp.cpp | 2 +- src/MANYBODY/fix_qeq_comb.cpp | 2 +- src/MANYBODY/pair_comb.cpp | 2 +- src/MANYBODY/pair_comb3.cpp | 2 +- src/MANYBODY/pair_eam.cpp | 2 +- src/MANYBODY/pair_eim.cpp | 2 +- src/MC/fix_atom_swap.cpp | 2 +- src/MC/fix_bond_create.cpp | 2 +- src/MC/fix_bond_swap.cpp | 2 +- src/MC/fix_gcmc.cpp | 2 +- src/MC/fix_widom.cpp | 2 +- src/MISC/fix_gld.cpp | 2 +- src/MISC/fix_orient_bcc.cpp | 2 +- src/MISC/fix_orient_fcc.cpp | 2 +- src/MLIAP/compute_mliap.cpp | 2 +- src/MOLECULE/fix_cmap.cpp | 2 +- src/MOLECULE/pair_lj_cut_tip4p_cut.cpp | 2 +- src/MOLECULE/pair_tip4p_cut.cpp | 2 +- src/PERI/compute_damage_atom.cpp | 2 +- src/PERI/compute_dilatation_atom.cpp | 2 +- src/PERI/compute_plasticity_atom.cpp | 2 +- src/PERI/pair_peri_pmb.cpp | 2 +- src/POEMS/fix_poems.cpp | 2 +- src/REPLICA/fix_hyper_global.cpp | 2 +- src/REPLICA/fix_hyper_local.cpp | 2 +- src/REPLICA/verlet_split.cpp | 2 +- src/RIGID/compute_rigid_local.cpp | 2 +- src/RIGID/fix_rigid.cpp | 2 +- src/RIGID/fix_rigid_small.cpp | 2 +- src/RIGID/fix_shake.cpp | 2 +- src/SNAP/compute_sna_atom.cpp | 2 +- src/SNAP/compute_snad_atom.cpp | 2 +- src/SNAP/compute_snap.cpp | 2 +- src/SNAP/compute_snav_atom.cpp | 2 +- src/USER-ATC/fix_atc.cpp | 2 +- src/USER-AWPMD/pair_awpmd_cut.cpp | 2 +- src/USER-DPD/compute_dpd_atom.cpp | 2 +- src/USER-EFF/compute_ke_atom_eff.cpp | 2 +- src/USER-EFF/compute_temp_deform_eff.cpp | 2 +- src/USER-EFF/compute_temp_region_eff.cpp | 2 +- src/USER-EFF/pair_eff_cut.cpp | 2 +- src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp | 2 +- src/USER-FEP/pair_tip4p_long_soft.cpp | 2 +- src/USER-LB/fix_lb_rigid_pc_sphere.cpp | 2 +- src/USER-MESODPD/compute_edpd_temp_atom.cpp | 2 +- src/USER-MESODPD/compute_tdpd_cc_atom.cpp | 2 +- src/USER-MESONT/compute_mesont.cpp | 2 +- src/USER-MISC/compute_ackland_atom.cpp | 2 +- src/USER-MISC/compute_cnp_atom.cpp | 2 +- src/USER-MISC/compute_hma.cpp | 2 +- src/USER-MISC/compute_temp_rotate.cpp | 2 +- src/USER-MISC/fix_ffl.cpp | 2 +- src/USER-MISC/fix_gle.cpp | 2 +- src/USER-MISC/fix_orient_eco.cpp | 2 +- src/USER-MISC/fix_propel_self.cpp | 2 +- src/USER-MISC/fix_srp.cpp | 2 +- src/USER-MISC/fix_ti_spring.cpp | 2 +- src/USER-MISC/pair_list.cpp | 2 +- src/USER-MISC/pair_local_density.cpp | 2 +- src/USER-PHONON/fix_phonon.cpp | 2 +- src/USER-PTM/compute_ptm_atom.cpp | 2 +- src/USER-REACTION/fix_bond_react.cpp | 2 +- src/USER-REAXC/compute_spec_atom.cpp | 2 +- src/USER-REAXC/fix_reaxc.cpp | 2 +- src/USER-SDPD/fix_meso_move.cpp | 2 +- src/USER-SMD/compute_smd_contact_radius.cpp | 2 +- src/USER-SMD/compute_smd_damage.cpp | 2 +- src/USER-SMD/compute_smd_hourglass_error.cpp | 2 +- src/USER-SMD/compute_smd_internal_energy.cpp | 2 +- src/USER-SMD/compute_smd_plastic_strain.cpp | 2 +- src/USER-SMD/compute_smd_plastic_strain_rate.cpp | 2 +- src/USER-SMD/compute_smd_rho.cpp | 2 +- src/USER-SMD/compute_smd_tlsph_defgrad.cpp | 2 +- src/USER-SMD/compute_smd_tlsph_dt.cpp | 2 +- src/USER-SMD/compute_smd_tlsph_num_neighs.cpp | 2 +- src/USER-SMD/compute_smd_tlsph_shape.cpp | 2 +- src/USER-SMD/compute_smd_tlsph_strain.cpp | 2 +- src/USER-SMD/compute_smd_tlsph_strain_rate.cpp | 2 +- src/USER-SMD/compute_smd_tlsph_stress.cpp | 2 +- src/USER-SMD/compute_smd_triangle_vertices.cpp | 2 +- src/USER-SMD/compute_smd_ulsph_effm.cpp | 2 +- src/USER-SMD/compute_smd_ulsph_num_neighs.cpp | 2 +- src/USER-SMD/compute_smd_ulsph_strain.cpp | 2 +- src/USER-SMD/compute_smd_ulsph_strain_rate.cpp | 2 +- src/USER-SMD/compute_smd_ulsph_stress.cpp | 2 +- src/USER-SMD/compute_smd_vol.cpp | 2 +- src/USER-SMTBQ/pair_smtbq.cpp | 2 +- src/USER-SPH/compute_sph_e_atom.cpp | 2 +- src/USER-SPH/compute_sph_rho_atom.cpp | 2 +- src/USER-SPH/compute_sph_t_atom.cpp | 2 +- src/VORONOI/compute_voronoi_atom.cpp | 2 +- src/angle.cpp | 2 +- src/angle_hybrid.cpp | 2 +- src/bond.cpp | 2 +- src/bond_hybrid.cpp | 2 +- src/compute_aggregate_atom.cpp | 2 +- src/compute_angle_local.cpp | 2 +- src/compute_bond_local.cpp | 2 +- src/compute_centro_atom.cpp | 2 +- src/compute_centroid_stress_atom.cpp | 2 +- src/compute_chunk_spread_atom.cpp | 2 +- src/compute_cluster_atom.cpp | 2 +- src/compute_cna_atom.cpp | 2 +- src/compute_contact_atom.cpp | 2 +- src/compute_coord_atom.cpp | 2 +- src/compute_dihedral_local.cpp | 2 +- src/compute_displace_atom.cpp | 2 +- src/compute_erotate_sphere_atom.cpp | 2 +- src/compute_fragment_atom.cpp | 2 +- src/compute_global_atom.cpp | 2 +- src/compute_hexorder_atom.cpp | 2 +- src/compute_improper_local.cpp | 2 +- src/compute_ke_atom.cpp | 2 +- src/compute_orientorder_atom.cpp | 2 +- src/compute_pair_local.cpp | 2 +- src/compute_pe_atom.cpp | 2 +- src/compute_property_atom.cpp | 2 +- src/compute_property_local.cpp | 2 +- src/compute_reduce.cpp | 2 +- src/compute_stress_atom.cpp | 2 +- src/compute_temp_profile.cpp | 2 +- src/dihedral.cpp | 2 +- src/dihedral_hybrid.cpp | 2 +- src/fix_ave_chunk.cpp | 2 +- src/fix_move.cpp | 2 +- src/fix_neigh_history.cpp | 2 +- src/fix_read_restart.cpp | 2 +- src/fix_respa.cpp | 2 +- src/fix_spring_self.cpp | 2 +- src/fix_store_force.cpp | 2 +- src/fix_store_state.cpp | 2 +- src/improper.cpp | 2 +- src/improper_hybrid.cpp | 2 +- src/my_pool_chunk.cpp | 2 +- src/pair.cpp | 2 +- src/pair_coul_streitz.cpp | 2 +- src/pair_hybrid.cpp | 2 +- 147 files changed, 147 insertions(+), 147 deletions(-) diff --git a/src/BODY/compute_body_local.cpp b/src/BODY/compute_body_local.cpp index 62d079b322..e393566b2f 100644 --- a/src/BODY/compute_body_local.cpp +++ b/src/BODY/compute_body_local.cpp @@ -226,6 +226,6 @@ void ComputeBodyLocal::reallocate(int n) double ComputeBodyLocal::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 7b7586d355..4deb828d76 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -793,6 +793,6 @@ void PairGranHookeHistory::unpack_forward_comm(int n, int first, double *buf) double PairGranHookeHistory::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 215926e23e..cc210138eb 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -1759,7 +1759,7 @@ void PairGranular::unpack_forward_comm(int n, int first, double *buf) double PairGranular::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/KOKKOS/fix_neigh_history_kokkos.cpp b/src/KOKKOS/fix_neigh_history_kokkos.cpp index fd625c6718..0f57b67a0e 100644 --- a/src/KOKKOS/fix_neigh_history_kokkos.cpp +++ b/src/KOKKOS/fix_neigh_history_kokkos.cpp @@ -243,7 +243,7 @@ void FixNeighHistoryKokkos::post_neighbor_item(const int &ii) const template double FixNeighHistoryKokkos::memory_usage() { - double bytes = d_firstflag.extent(0)*d_firstflag.extent(1)*sizeof(int); + double bytes = (double)d_firstflag.extent(0)*d_firstflag.extent(1)*sizeof(int); bytes += (double)d_firstvalue.extent(0)*d_firstvalue.extent(1)*sizeof(double); bytes += (double)2*k_npartner.extent(0)*sizeof(int); bytes += (double)2*k_partner.extent(0)*k_partner.extent(1)*sizeof(int); diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index cdf973ce28..9dc2416dcc 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -2873,7 +2873,7 @@ int PPPMKokkos::timing_3d(int n, double &time3d) template double PPPMKokkos::memory_usage() { - double bytes = nmax*3 * sizeof(double); + double bytes = (double)nmax*3 * sizeof(double); int nbrick = (nxhi_out-nxlo_out+1) * (nyhi_out-nylo_out+1) * (nzhi_out-nzlo_out+1); bytes += (double)4 * nbrick * sizeof(FFT_SCALAR); diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.cpp b/src/KSPACE/pair_lj_cut_tip4p_long.cpp index 1f200143ea..7ab2d5d5a1 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_cut_tip4p_long.cpp @@ -603,7 +603,7 @@ void *PairLJCutTIP4PLong::extract(const char *str, int &dim) double PairLJCutTIP4PLong::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index 54a8f1e16a..568e6ca37c 100644 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -1636,7 +1636,7 @@ void *PairLJLongTIP4PLong::extract(const char *str, int &dim) double PairLJLongTIP4PLong::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/KSPACE/pair_tip4p_long.cpp b/src/KSPACE/pair_tip4p_long.cpp index 9c5a0dccfc..8d5a8a824a 100644 --- a/src/KSPACE/pair_tip4p_long.cpp +++ b/src/KSPACE/pair_tip4p_long.cpp @@ -523,7 +523,7 @@ void *PairTIP4PLong::extract(const char *str, int &dim) double PairTIP4PLong::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 938ddf436e..2419627642 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -3057,7 +3057,7 @@ int PPPM::timing_3d(int n, double &time3d) double PPPM::memory_usage() { - double bytes = nmax*3 * sizeof(double); + double bytes = (double)nmax*3 * sizeof(double); int nbrick = (nxhi_out-nxlo_out+1) * (nyhi_out-nylo_out+1) * (nzhi_out-nzlo_out+1); diff --git a/src/KSPACE/pppm_dipole.cpp b/src/KSPACE/pppm_dipole.cpp index e4fa001664..80a87a1d61 100644 --- a/src/KSPACE/pppm_dipole.cpp +++ b/src/KSPACE/pppm_dipole.cpp @@ -2507,7 +2507,7 @@ int PPPMDipole::timing_3d(int n, double &time3d) double PPPMDipole::memory_usage() { - double bytes = nmax*3 * sizeof(double); + double bytes = (double)nmax*3 * sizeof(double); int nbrick = (nxhi_out-nxlo_out+1) * (nyhi_out-nylo_out+1) * (nzhi_out-nzlo_out+1); diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 4c58de8481..28aa68ff14 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -8298,7 +8298,7 @@ int PPPMDisp::timing_3d(int n, double &time3d) double PPPMDisp::memory_usage() { - double bytes = nmax*3 * sizeof(double); + double bytes = (double)nmax*3 * sizeof(double); int mixing = 1; int diff = 3; //depends on differentiation diff --git a/src/MANYBODY/fix_qeq_comb.cpp b/src/MANYBODY/fix_qeq_comb.cpp index 1241d9905c..7c2d18fc13 100644 --- a/src/MANYBODY/fix_qeq_comb.cpp +++ b/src/MANYBODY/fix_qeq_comb.cpp @@ -284,7 +284,7 @@ void FixQEQComb::post_force_respa(int vflag, int ilevel, int /*iloop*/) double FixQEQComb::memory_usage() { - double bytes = atom->nmax*3 * sizeof(double); + double bytes = (double)atom->nmax*3 * sizeof(double); return bytes; } /* ---------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_comb.cpp b/src/MANYBODY/pair_comb.cpp index 7292726292..2d93c6783e 100644 --- a/src/MANYBODY/pair_comb.cpp +++ b/src/MANYBODY/pair_comb.cpp @@ -2098,7 +2098,7 @@ void PairComb::Short_neigh() double PairComb::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)nmax * sizeof(int); bytes += (double)nmax * sizeof(int *); diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index aa2afe5d20..d7814737ea 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -3850,7 +3850,7 @@ void PairComb3::unpack_reverse_comm(int n, int *list, double *buf) double PairComb3::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)nmax * sizeof(int); bytes += (double)nmax * 8.0 * sizeof(double); diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index d509768572..03098904c8 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -913,7 +913,7 @@ void PairEAM::unpack_reverse_comm(int n, int *list, double *buf) double PairEAM::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/MANYBODY/pair_eim.cpp b/src/MANYBODY/pair_eim.cpp index c56a07fb71..b82a410791 100644 --- a/src/MANYBODY/pair_eim.cpp +++ b/src/MANYBODY/pair_eim.cpp @@ -1044,7 +1044,7 @@ void PairEIM::unpack_reverse_comm(int n, int *list, double *buf) double PairEIM::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/MC/fix_atom_swap.cpp b/src/MC/fix_atom_swap.cpp index e2fb7c3f73..16bb8b1aeb 100644 --- a/src/MC/fix_atom_swap.cpp +++ b/src/MC/fix_atom_swap.cpp @@ -753,7 +753,7 @@ double FixAtomSwap::compute_vector(int n) double FixAtomSwap::memory_usage() { - double bytes = atom_swap_nmax * sizeof(int); + double bytes = (double)atom_swap_nmax * sizeof(int); return bytes; } diff --git a/src/MC/fix_bond_create.cpp b/src/MC/fix_bond_create.cpp index b33e213759..bcf7a7a843 100644 --- a/src/MC/fix_bond_create.cpp +++ b/src/MC/fix_bond_create.cpp @@ -1427,7 +1427,7 @@ double FixBondCreate::compute_vector(int n) double FixBondCreate::memory_usage() { int nmax = atom->nmax; - double bytes = nmax * sizeof(int); + double bytes = (double)nmax * sizeof(int); bytes = 2*nmax * sizeof(tagint); bytes += (double)nmax * sizeof(double); return bytes; diff --git a/src/MC/fix_bond_swap.cpp b/src/MC/fix_bond_swap.cpp index eedf609a23..51334d6149 100644 --- a/src/MC/fix_bond_swap.cpp +++ b/src/MC/fix_bond_swap.cpp @@ -727,6 +727,6 @@ double FixBondSwap::compute_vector(int n) double FixBondSwap::memory_usage() { - double bytes = nmax * sizeof(int); + double bytes = (double)nmax * sizeof(int); return bytes; } diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 79cfd09f96..0c61838f65 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -2515,7 +2515,7 @@ double FixGCMC::compute_vector(int n) double FixGCMC::memory_usage() { - double bytes = gcmc_nmax * sizeof(int); + double bytes = (double)gcmc_nmax * sizeof(int); return bytes; } diff --git a/src/MC/fix_widom.cpp b/src/MC/fix_widom.cpp index c06573ab1a..1b0af1ebfb 100644 --- a/src/MC/fix_widom.cpp +++ b/src/MC/fix_widom.cpp @@ -1177,7 +1177,7 @@ double FixWidom::compute_vector(int n) double FixWidom::memory_usage() { - double bytes = widom_nmax * sizeof(int); + double bytes = (double)widom_nmax * sizeof(int); return bytes; } diff --git a/src/MISC/fix_gld.cpp b/src/MISC/fix_gld.cpp index d78dd67bdb..3f6c3da258 100644 --- a/src/MISC/fix_gld.cpp +++ b/src/MISC/fix_gld.cpp @@ -487,7 +487,7 @@ void FixGLD::reset_dt() double FixGLD::memory_usage() { - double bytes = atom->nmax*3*prony_terms*sizeof(double); + double bytes = (double)atom->nmax*3*prony_terms*sizeof(double); return bytes; } diff --git a/src/MISC/fix_orient_bcc.cpp b/src/MISC/fix_orient_bcc.cpp index 85734b0a6c..c9ae5d632b 100644 --- a/src/MISC/fix_orient_bcc.cpp +++ b/src/MISC/fix_orient_bcc.cpp @@ -596,7 +596,7 @@ int FixOrientBCC::compare(const void *pi, const void *pj) double FixOrientBCC::memory_usage() { - double bytes = nmax * sizeof(Nbr); + double bytes = (double)nmax * sizeof(Nbr); bytes += (double)2*nmax * sizeof(double); return bytes; } diff --git a/src/MISC/fix_orient_fcc.cpp b/src/MISC/fix_orient_fcc.cpp index b46232c710..71b38b5258 100644 --- a/src/MISC/fix_orient_fcc.cpp +++ b/src/MISC/fix_orient_fcc.cpp @@ -594,7 +594,7 @@ int FixOrientFCC::compare(const void *pi, const void *pj) double FixOrientFCC::memory_usage() { - double bytes = nmax * sizeof(Nbr); + double bytes = (double)nmax * sizeof(Nbr); bytes += (double)2*nmax * sizeof(double); return bytes; } diff --git a/src/MLIAP/compute_mliap.cpp b/src/MLIAP/compute_mliap.cpp index 5b2d97d251..f119a64a49 100644 --- a/src/MLIAP/compute_mliap.cpp +++ b/src/MLIAP/compute_mliap.cpp @@ -357,7 +357,7 @@ void ComputeMLIAP::compute_array() double ComputeMLIAP::memory_usage() { - double bytes = size_array_rows*size_array_cols * + double bytes = (double)size_array_rows*size_array_cols * sizeof(double); // mliaparray bytes += (double)size_array_rows*size_array_cols * sizeof(double); // mliaparrayall diff --git a/src/MOLECULE/fix_cmap.cpp b/src/MOLECULE/fix_cmap.cpp index b594c4770d..6966b5ac11 100644 --- a/src/MOLECULE/fix_cmap.cpp +++ b/src/MOLECULE/fix_cmap.cpp @@ -1440,7 +1440,7 @@ int FixCMAP::unpack_exchange(int nlocal, double *buf) double FixCMAP::memory_usage() { int nmax = atom->nmax; - double bytes = nmax * sizeof(int); // num_crossterm + double bytes = (double)nmax * sizeof(int); // num_crossterm bytes += (double)nmax*CMAPMAX * sizeof(int); // crossterm_type bytes += (double)5*nmax*CMAPMAX * sizeof(int); // crossterm_atom 12345 bytes += (double)maxcrossterm*6 * sizeof(int); // crosstermlist diff --git a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp index 32b5332484..2bca4857a1 100644 --- a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp +++ b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp @@ -748,7 +748,7 @@ void *PairLJCutTIP4PCut::extract(const char *str, int &dim) double PairLJCutTIP4PCut::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/MOLECULE/pair_tip4p_cut.cpp b/src/MOLECULE/pair_tip4p_cut.cpp index 82055aa55b..f208c17efd 100644 --- a/src/MOLECULE/pair_tip4p_cut.cpp +++ b/src/MOLECULE/pair_tip4p_cut.cpp @@ -550,7 +550,7 @@ void PairTIP4PCut::compute_newsite(double *xO, double *xH1, double PairTIP4PCut::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/PERI/compute_damage_atom.cpp b/src/PERI/compute_damage_atom.cpp index 6b5d2556e8..17b0374e0a 100644 --- a/src/PERI/compute_damage_atom.cpp +++ b/src/PERI/compute_damage_atom.cpp @@ -120,6 +120,6 @@ void ComputeDamageAtom::compute_peratom() double ComputeDamageAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/PERI/compute_dilatation_atom.cpp b/src/PERI/compute_dilatation_atom.cpp index 53c3bcef30..9ea03acd04 100644 --- a/src/PERI/compute_dilatation_atom.cpp +++ b/src/PERI/compute_dilatation_atom.cpp @@ -117,6 +117,6 @@ void ComputeDilatationAtom::compute_peratom() double ComputeDilatationAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/PERI/compute_plasticity_atom.cpp b/src/PERI/compute_plasticity_atom.cpp index cac746c089..829f10e327 100644 --- a/src/PERI/compute_plasticity_atom.cpp +++ b/src/PERI/compute_plasticity_atom.cpp @@ -103,6 +103,6 @@ void ComputePlasticityAtom::compute_peratom() double ComputePlasticityAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/PERI/pair_peri_pmb.cpp b/src/PERI/pair_peri_pmb.cpp index 1173648400..aeb977c999 100644 --- a/src/PERI/pair_peri_pmb.cpp +++ b/src/PERI/pair_peri_pmb.cpp @@ -493,6 +493,6 @@ double PairPeriPMB::single(int i, int j, int itype, int jtype, double rsq, double PairPeriPMB::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 4379fa6bec..21fb4bc05e 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -1525,7 +1525,7 @@ void FixPOEMS::copy_arrays(int i, int j, int /* delflag */) double FixPOEMS::memory_usage() { int nmax = atom->nmax; - double bytes = nmax * sizeof(int); + double bytes = (double)nmax * sizeof(int); bytes += (double)nmax*MAXBODY * sizeof(int); bytes += (double)nmax*3 * sizeof(double); return bytes; diff --git a/src/REPLICA/fix_hyper_global.cpp b/src/REPLICA/fix_hyper_global.cpp index d29aa36e31..48dc0bed02 100644 --- a/src/REPLICA/fix_hyper_global.cpp +++ b/src/REPLICA/fix_hyper_global.cpp @@ -559,6 +559,6 @@ double FixHyperGlobal::query(int i) double FixHyperGlobal::memory_usage() { - double bytes = maxbond * sizeof(OneBond); // blist + double bytes = (double)maxbond * sizeof(OneBond); // blist return bytes; } diff --git a/src/REPLICA/fix_hyper_local.cpp b/src/REPLICA/fix_hyper_local.cpp index 5bca43fbe5..14a6c6089f 100644 --- a/src/REPLICA/fix_hyper_local.cpp +++ b/src/REPLICA/fix_hyper_local.cpp @@ -1731,7 +1731,7 @@ double FixHyperLocal::query(int i) double FixHyperLocal::memory_usage() { - double bytes = maxbond * sizeof(OneBond); // blist + double bytes = (double)maxbond * sizeof(OneBond); // blist bytes = maxbond * sizeof(double); // per-bond bias coeffs bytes += (double)3*maxlocal * sizeof(int); // numbond,maxhalf,eligible bytes += (double)maxlocal * sizeof(double); // maxhalfstrain diff --git a/src/REPLICA/verlet_split.cpp b/src/REPLICA/verlet_split.cpp index 384a8fd8dd..506d074eca 100644 --- a/src/REPLICA/verlet_split.cpp +++ b/src/REPLICA/verlet_split.cpp @@ -582,6 +582,6 @@ void VerletSplit::k2r_comm() double VerletSplit::memory_usage() { - double bytes = maxatom*3 * sizeof(double); + double bytes = (double)maxatom*3 * sizeof(double); return bytes; } diff --git a/src/RIGID/compute_rigid_local.cpp b/src/RIGID/compute_rigid_local.cpp index 823970d594..0a40062055 100644 --- a/src/RIGID/compute_rigid_local.cpp +++ b/src/RIGID/compute_rigid_local.cpp @@ -315,6 +315,6 @@ void ComputeRigidLocal::reallocate(int n) double ComputeRigidLocal::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index b46cb1667f..a90782199e 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -2452,7 +2452,7 @@ void FixRigid::write_restart_file(const char *file) double FixRigid::memory_usage() { int nmax = atom->nmax; - double bytes = nmax * sizeof(int); + double bytes = (double)nmax * sizeof(int); bytes += (double)nmax * sizeof(imageint); bytes += (double)nmax*3 * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); // vatom diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index 6a26de6083..a316d9fbdf 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -3567,7 +3567,7 @@ double FixRigidSmall::compute_scalar() double FixRigidSmall::memory_usage() { int nmax = atom->nmax; - double bytes = nmax*2 * sizeof(int); + double bytes = (double)nmax*2 * sizeof(int); bytes += (double)nmax * sizeof(imageint); bytes += (double)nmax*3 * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); // vatom diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 2af6ed8440..7ce3f9ddf2 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -2678,7 +2678,7 @@ int FixShake::angletype_findset(int i, tagint n1, tagint n2, int setflag) double FixShake::memory_usage() { int nmax = atom->nmax; - double bytes = nmax * sizeof(int); + double bytes = (double)nmax * sizeof(int); bytes += (double)nmax*4 * sizeof(int); bytes += (double)nmax*3 * sizeof(int); bytes += (double)nmax*3 * sizeof(double); diff --git a/src/SNAP/compute_sna_atom.cpp b/src/SNAP/compute_sna_atom.cpp index 8e26d44f61..47679fd8cc 100644 --- a/src/SNAP/compute_sna_atom.cpp +++ b/src/SNAP/compute_sna_atom.cpp @@ -306,7 +306,7 @@ void ComputeSNAAtom::compute_peratom() double ComputeSNAAtom::memory_usage() { - double bytes = nmax*size_peratom_cols * sizeof(double); // sna + double bytes = (double)nmax*size_peratom_cols * sizeof(double); // sna bytes += snaptr->memory_usage(); // SNA object return bytes; diff --git a/src/SNAP/compute_snad_atom.cpp b/src/SNAP/compute_snad_atom.cpp index b9ab2f54ae..0e2a74eea0 100644 --- a/src/SNAP/compute_snad_atom.cpp +++ b/src/SNAP/compute_snad_atom.cpp @@ -406,7 +406,7 @@ void ComputeSNADAtom::unpack_reverse_comm(int n, int *list, double *buf) double ComputeSNADAtom::memory_usage() { - double bytes = nmax*size_peratom_cols * sizeof(double); // snad + double bytes = (double)nmax*size_peratom_cols * sizeof(double); // snad bytes += snaptr->memory_usage(); // SNA object return bytes; diff --git a/src/SNAP/compute_snap.cpp b/src/SNAP/compute_snap.cpp index ee37b24198..d7655dba5f 100644 --- a/src/SNAP/compute_snap.cpp +++ b/src/SNAP/compute_snap.cpp @@ -529,7 +529,7 @@ void ComputeSnap::dbdotr_compute() double ComputeSnap::memory_usage() { - double bytes = size_array_rows*size_array_cols * + double bytes = (double)size_array_rows*size_array_cols * sizeof(double); // snap bytes += (double)size_array_rows*size_array_cols * sizeof(double); // snapall diff --git a/src/SNAP/compute_snav_atom.cpp b/src/SNAP/compute_snav_atom.cpp index 42a54e6cb1..4a6fa3c717 100644 --- a/src/SNAP/compute_snav_atom.cpp +++ b/src/SNAP/compute_snav_atom.cpp @@ -415,7 +415,7 @@ void ComputeSNAVAtom::unpack_reverse_comm(int n, int *list, double *buf) double ComputeSNAVAtom::memory_usage() { - double bytes = nmax*size_peratom_cols * sizeof(double); // snav + double bytes = (double)nmax*size_peratom_cols * sizeof(double); // snav bytes += snaptr->memory_usage(); // SNA object return bytes; diff --git a/src/USER-ATC/fix_atc.cpp b/src/USER-ATC/fix_atc.cpp index 82fbfcc958..90ba43b0e8 100644 --- a/src/USER-ATC/fix_atc.cpp +++ b/src/USER-ATC/fix_atc.cpp @@ -627,7 +627,7 @@ void FixATC::min_pre_exchange() double FixATC::memory_usage() { - double bytes = (double) atc_->memory_usage() * sizeof(double); + double bytes = atc_->memory_usage() * sizeof(double); return bytes; } diff --git a/src/USER-AWPMD/pair_awpmd_cut.cpp b/src/USER-AWPMD/pair_awpmd_cut.cpp index b46bf75181..3d4e1f12a7 100644 --- a/src/USER-AWPMD/pair_awpmd_cut.cpp +++ b/src/USER-AWPMD/pair_awpmd_cut.cpp @@ -734,7 +734,7 @@ void PairAWPMDCut::min_x_set(int /* ignore */) double PairAWPMDCut::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/USER-DPD/compute_dpd_atom.cpp b/src/USER-DPD/compute_dpd_atom.cpp index 8b203b4c0b..9053d8af31 100644 --- a/src/USER-DPD/compute_dpd_atom.cpp +++ b/src/USER-DPD/compute_dpd_atom.cpp @@ -97,6 +97,6 @@ void ComputeDpdAtom::compute_peratom() double ComputeDpdAtom::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); return bytes; } diff --git a/src/USER-EFF/compute_ke_atom_eff.cpp b/src/USER-EFF/compute_ke_atom_eff.cpp index e8ddba137e..c2342c4b5b 100644 --- a/src/USER-EFF/compute_ke_atom_eff.cpp +++ b/src/USER-EFF/compute_ke_atom_eff.cpp @@ -110,6 +110,6 @@ void ComputeKEAtomEff::compute_peratom() double ComputeKEAtomEff::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-EFF/compute_temp_deform_eff.cpp b/src/USER-EFF/compute_temp_deform_eff.cpp index 8baea0ac95..620a7eba21 100644 --- a/src/USER-EFF/compute_temp_deform_eff.cpp +++ b/src/USER-EFF/compute_temp_deform_eff.cpp @@ -319,6 +319,6 @@ void ComputeTempDeformEff::restore_bias_all() double ComputeTempDeformEff::memory_usage() { - double bytes = maxbias * sizeof(double); + double bytes = (double)maxbias * sizeof(double); return bytes; } diff --git a/src/USER-EFF/compute_temp_region_eff.cpp b/src/USER-EFF/compute_temp_region_eff.cpp index 645281d45a..1ca62f39d3 100644 --- a/src/USER-EFF/compute_temp_region_eff.cpp +++ b/src/USER-EFF/compute_temp_region_eff.cpp @@ -291,6 +291,6 @@ void ComputeTempRegionEff::restore_bias_all() double ComputeTempRegionEff::memory_usage() { - double bytes = maxbias * sizeof(double); + double bytes = (double)maxbias * sizeof(double); return bytes; } diff --git a/src/USER-EFF/pair_eff_cut.cpp b/src/USER-EFF/pair_eff_cut.cpp index f39c1d31af..2413a30635 100644 --- a/src/USER-EFF/pair_eff_cut.cpp +++ b/src/USER-EFF/pair_eff_cut.cpp @@ -1078,7 +1078,7 @@ void PairEffCut::min_x_set(int /*ignore*/) double PairEffCut::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp b/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp index c06bd69c48..f397328f9c 100644 --- a/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp @@ -588,7 +588,7 @@ void *PairLJCutTIP4PLongSoft::extract(const char *str, int &dim) double PairLJCutTIP4PLongSoft::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/USER-FEP/pair_tip4p_long_soft.cpp b/src/USER-FEP/pair_tip4p_long_soft.cpp index 47b9fe0a93..caecb36d99 100644 --- a/src/USER-FEP/pair_tip4p_long_soft.cpp +++ b/src/USER-FEP/pair_tip4p_long_soft.cpp @@ -510,7 +510,7 @@ void *PairTIP4PLongSoft::extract(const char *str, int &dim) double PairTIP4PLongSoft::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * nmax * sizeof(double); return bytes; diff --git a/src/USER-LB/fix_lb_rigid_pc_sphere.cpp b/src/USER-LB/fix_lb_rigid_pc_sphere.cpp index b139d8e6f2..9481c0d0f2 100644 --- a/src/USER-LB/fix_lb_rigid_pc_sphere.cpp +++ b/src/USER-LB/fix_lb_rigid_pc_sphere.cpp @@ -1430,7 +1430,7 @@ int FixLbRigidPCSphere::dof(int igroup) double FixLbRigidPCSphere::memory_usage() { int nmax = atom->nmax; - double bytes = nmax * sizeof(int); + double bytes = (double)nmax * sizeof(int); bytes += (double)nmax*3 * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); diff --git a/src/USER-MESODPD/compute_edpd_temp_atom.cpp b/src/USER-MESODPD/compute_edpd_temp_atom.cpp index e7ab79d550..383b5676c1 100644 --- a/src/USER-MESODPD/compute_edpd_temp_atom.cpp +++ b/src/USER-MESODPD/compute_edpd_temp_atom.cpp @@ -91,6 +91,6 @@ void ComputeEDPDTempAtom::compute_peratom() double ComputeEDPDTempAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-MESODPD/compute_tdpd_cc_atom.cpp b/src/USER-MESODPD/compute_tdpd_cc_atom.cpp index e4f015db3e..d616dfca4d 100644 --- a/src/USER-MESODPD/compute_tdpd_cc_atom.cpp +++ b/src/USER-MESODPD/compute_tdpd_cc_atom.cpp @@ -94,6 +94,6 @@ void ComputeTDPDCCAtom::compute_peratom() double ComputeTDPDCCAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-MESONT/compute_mesont.cpp b/src/USER-MESONT/compute_mesont.cpp index e78747697e..a20ed32f26 100644 --- a/src/USER-MESONT/compute_mesont.cpp +++ b/src/USER-MESONT/compute_mesont.cpp @@ -151,6 +151,6 @@ void ComputeMesoNT::unpack_reverse_comm(int n, int *list, double *buf) { ------------------------------------------------------------------------- */ double ComputeMesoNT::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-MISC/compute_ackland_atom.cpp b/src/USER-MISC/compute_ackland_atom.cpp index 6bebbc2c64..d4c5317c5c 100644 --- a/src/USER-MISC/compute_ackland_atom.cpp +++ b/src/USER-MISC/compute_ackland_atom.cpp @@ -462,6 +462,6 @@ void ComputeAcklandAtom::select2(int k, int n, double *arr, int *iarr) double ComputeAcklandAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-MISC/compute_cnp_atom.cpp b/src/USER-MISC/compute_cnp_atom.cpp index c927d8e520..337bf271c4 100644 --- a/src/USER-MISC/compute_cnp_atom.cpp +++ b/src/USER-MISC/compute_cnp_atom.cpp @@ -323,7 +323,7 @@ void ComputeCNPAtom::compute_peratom() double ComputeCNPAtom::memory_usage() { - double bytes = nmax * sizeof(int); + double bytes = (double)nmax * sizeof(int); bytes += (double)nmax * MAXNEAR * sizeof(int); bytes += (double)nmax * sizeof(double); return bytes; diff --git a/src/USER-MISC/compute_hma.cpp b/src/USER-MISC/compute_hma.cpp index a67f4952a9..8220abebc4 100644 --- a/src/USER-MISC/compute_hma.cpp +++ b/src/USER-MISC/compute_hma.cpp @@ -497,6 +497,6 @@ void ComputeHMA::set_arrays(int i) double ComputeHMA::memory_usage() { - double bytes = nmax * 3 * sizeof(double); + double bytes = (double)nmax * 3 * sizeof(double); return bytes; } diff --git a/src/USER-MISC/compute_temp_rotate.cpp b/src/USER-MISC/compute_temp_rotate.cpp index da37a5639b..99cda02b74 100644 --- a/src/USER-MISC/compute_temp_rotate.cpp +++ b/src/USER-MISC/compute_temp_rotate.cpp @@ -294,6 +294,6 @@ void ComputeTempRotate::restore_bias_all() double ComputeTempRotate::memory_usage() { - double bytes = maxbias * sizeof(double); + double bytes = (double)maxbias * sizeof(double); return bytes; } diff --git a/src/USER-MISC/fix_ffl.cpp b/src/USER-MISC/fix_ffl.cpp index 061d5f4559..d07e211021 100644 --- a/src/USER-MISC/fix_ffl.cpp +++ b/src/USER-MISC/fix_ffl.cpp @@ -455,7 +455,7 @@ void FixFFL::reset_dt() { ------------------------------------------------------------------------- */ double FixFFL::memory_usage() { - double bytes = atom->nmax*(3*2)*sizeof(double); + double bytes = (double)atom->nmax*(3*2)*sizeof(double); return bytes; } diff --git a/src/USER-MISC/fix_gle.cpp b/src/USER-MISC/fix_gle.cpp index e091c3d80e..1f0fd70012 100644 --- a/src/USER-MISC/fix_gle.cpp +++ b/src/USER-MISC/fix_gle.cpp @@ -762,7 +762,7 @@ void FixGLE::reset_dt() double FixGLE::memory_usage() { - double bytes = atom->nmax*(3*ns+2*3*(ns+1))*sizeof(double); + double bytes = (double)atom->nmax*(3*ns+2*3*(ns+1))*sizeof(double); return bytes; } diff --git a/src/USER-MISC/fix_orient_eco.cpp b/src/USER-MISC/fix_orient_eco.cpp index 0594e9c5b4..1aab846597 100644 --- a/src/USER-MISC/fix_orient_eco.cpp +++ b/src/USER-MISC/fix_orient_eco.cpp @@ -474,7 +474,7 @@ void FixOrientECO::unpack_forward_comm(int n, int first, double *buf) { ------------------------------------------------------------------------- */ double FixOrientECO::memory_usage() { - double bytes = nmax * sizeof(Nbr); + double bytes = (double)nmax * sizeof(Nbr); bytes += (double)2 * nmax * sizeof(double); return bytes; } diff --git a/src/USER-MISC/fix_propel_self.cpp b/src/USER-MISC/fix_propel_self.cpp index a1e69ad179..0affa24ffe 100644 --- a/src/USER-MISC/fix_propel_self.cpp +++ b/src/USER-MISC/fix_propel_self.cpp @@ -130,7 +130,7 @@ int FixPropelSelf::setmask() double FixPropelSelf::memory_usage() { // magnitude + thermostat_orient + mode + n_types_filter + apply_to_type - double bytes = sizeof(double) + 3*sizeof(int) + sizeof(int*); + double bytes = (double)sizeof(double) + 3*sizeof(int) + sizeof(int*); bytes += (double)sizeof(int)*atom->ntypes*n_types_filter; return bytes; diff --git a/src/USER-MISC/fix_srp.cpp b/src/USER-MISC/fix_srp.cpp index 254a66f2f2..eb57da30e9 100644 --- a/src/USER-MISC/fix_srp.cpp +++ b/src/USER-MISC/fix_srp.cpp @@ -379,7 +379,7 @@ void FixSRP::pre_exchange() double FixSRP::memory_usage() { - double bytes = atom->nmax*2 * sizeof(double); + double bytes = (double)atom->nmax*2 * sizeof(double); return bytes; } diff --git a/src/USER-MISC/fix_ti_spring.cpp b/src/USER-MISC/fix_ti_spring.cpp index 5aac36a47b..ce30497295 100644 --- a/src/USER-MISC/fix_ti_spring.cpp +++ b/src/USER-MISC/fix_ti_spring.cpp @@ -261,7 +261,7 @@ double FixTISpring::compute_vector(int n) double FixTISpring::memory_usage() { - double bytes = atom->nmax*3 * sizeof(double); + double bytes = (double)atom->nmax*3 * sizeof(double); return bytes; } diff --git a/src/USER-MISC/pair_list.cpp b/src/USER-MISC/pair_list.cpp index 5b6729ff58..a3a3caa81d 100644 --- a/src/USER-MISC/pair_list.cpp +++ b/src/USER-MISC/pair_list.cpp @@ -409,7 +409,7 @@ double PairList::init_one(int, int) double PairList::memory_usage() { - double bytes = npairs * sizeof(int); + double bytes = (double)npairs * sizeof(int); bytes += (double)npairs * sizeof(list_parm_t); const int n = atom->ntypes+1; bytes += (double)n*(n*sizeof(int) + sizeof(int *)); diff --git a/src/USER-MISC/pair_local_density.cpp b/src/USER-MISC/pair_local_density.cpp index c85633e600..ec3c41a47b 100644 --- a/src/USER-MISC/pair_local_density.cpp +++ b/src/USER-MISC/pair_local_density.cpp @@ -881,7 +881,7 @@ void PairLocalDensity::unpack_reverse_comm(int n, int *list, double *buf) { double PairLocalDensity::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)2 * (nmax*nLD) * sizeof(double); return bytes; diff --git a/src/USER-PHONON/fix_phonon.cpp b/src/USER-PHONON/fix_phonon.cpp index 320a12d8f9..455ca80b12 100644 --- a/src/USER-PHONON/fix_phonon.cpp +++ b/src/USER-PHONON/fix_phonon.cpp @@ -424,7 +424,7 @@ void FixPhonon::end_of_step() double FixPhonon::memory_usage() { - double bytes = sizeof(double)*2*mynq + double bytes = (double)sizeof(double)*2*mynq + sizeof(std::map)*2*ngroup + sizeof(double)*(ngroup*(3*sysdim+2)+mynpt*fft_dim*2) + sizeof(std::complex)*MAX(1,mynq)*fft_dim *(1+2*fft_dim) diff --git a/src/USER-PTM/compute_ptm_atom.cpp b/src/USER-PTM/compute_ptm_atom.cpp index 593c7f9b5e..376253dd84 100644 --- a/src/USER-PTM/compute_ptm_atom.cpp +++ b/src/USER-PTM/compute_ptm_atom.cpp @@ -333,7 +333,7 @@ void ComputePTMAtom::compute_peratom() { ------------------------------------------------------------------------- */ double ComputePTMAtom::memory_usage() { - double bytes = nmax * NUM_COLUMNS * sizeof(double); + double bytes = (double)nmax * NUM_COLUMNS * sizeof(double); bytes += (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-REACTION/fix_bond_react.cpp b/src/USER-REACTION/fix_bond_react.cpp index f49374b0b8..86e7977d9b 100644 --- a/src/USER-REACTION/fix_bond_react.cpp +++ b/src/USER-REACTION/fix_bond_react.cpp @@ -3743,7 +3743,7 @@ memory usage of local atom-based arrays double FixBondReact::memory_usage() { int nmax = atom->nmax; - double bytes = nmax * sizeof(int); + double bytes = (double)nmax * sizeof(int); bytes = 2*nmax * sizeof(tagint); bytes += (double)nmax * sizeof(double); return bytes; diff --git a/src/USER-REAXC/compute_spec_atom.cpp b/src/USER-REAXC/compute_spec_atom.cpp index 5b5a6494e5..ebd7784c1c 100644 --- a/src/USER-REAXC/compute_spec_atom.cpp +++ b/src/USER-REAXC/compute_spec_atom.cpp @@ -172,7 +172,7 @@ void ComputeSpecAtom::compute_peratom() double ComputeSpecAtom::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/USER-REAXC/fix_reaxc.cpp b/src/USER-REAXC/fix_reaxc.cpp index a9793b8321..c178b32097 100644 --- a/src/USER-REAXC/fix_reaxc.cpp +++ b/src/USER-REAXC/fix_reaxc.cpp @@ -83,7 +83,7 @@ int FixReaxC::setmask() double FixReaxC::memory_usage() { int nmax = atom->nmax; - double bytes = nmax * 2 * sizeof(int); + double bytes = (double)nmax * 2 * sizeof(int); return bytes; } diff --git a/src/USER-SDPD/fix_meso_move.cpp b/src/USER-SDPD/fix_meso_move.cpp index 6721bcb70e..ddb4bbc3e8 100644 --- a/src/USER-SDPD/fix_meso_move.cpp +++ b/src/USER-SDPD/fix_meso_move.cpp @@ -799,7 +799,7 @@ void FixMesoMove::final_integrate () { ------------------------------------------------------------------------- */ double FixMesoMove::memory_usage () { - double bytes = atom->nmax*3 * sizeof(double); + double bytes = (double)atom->nmax*3 * sizeof(double); if (displaceflag) bytes += (double)atom->nmax*3 * sizeof(double); if (velocityflag) bytes += (double)atom->nmax*3 * sizeof(double); return bytes; diff --git a/src/USER-SMD/compute_smd_contact_radius.cpp b/src/USER-SMD/compute_smd_contact_radius.cpp index 3204c69a69..3f09b30b97 100644 --- a/src/USER-SMD/compute_smd_contact_radius.cpp +++ b/src/USER-SMD/compute_smd_contact_radius.cpp @@ -103,6 +103,6 @@ void ComputeSMDContactRadius::compute_peratom() double ComputeSMDContactRadius::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_damage.cpp b/src/USER-SMD/compute_smd_damage.cpp index 2636ee52c1..cf5b966dc0 100644 --- a/src/USER-SMD/compute_smd_damage.cpp +++ b/src/USER-SMD/compute_smd_damage.cpp @@ -103,6 +103,6 @@ void ComputeSMDDamage::compute_peratom() double ComputeSMDDamage::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_hourglass_error.cpp b/src/USER-SMD/compute_smd_hourglass_error.cpp index 9162eb447b..c226f526cd 100644 --- a/src/USER-SMD/compute_smd_hourglass_error.cpp +++ b/src/USER-SMD/compute_smd_hourglass_error.cpp @@ -107,6 +107,6 @@ void ComputeSMDHourglassError::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDHourglassError::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_internal_energy.cpp b/src/USER-SMD/compute_smd_internal_energy.cpp index 43273271fe..ccebe0ffdd 100644 --- a/src/USER-SMD/compute_smd_internal_energy.cpp +++ b/src/USER-SMD/compute_smd_internal_energy.cpp @@ -103,6 +103,6 @@ void ComputeSMDInternalEnergy::compute_peratom() double ComputeSMDInternalEnergy::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_plastic_strain.cpp b/src/USER-SMD/compute_smd_plastic_strain.cpp index 7cb40ab68a..375802fa6e 100644 --- a/src/USER-SMD/compute_smd_plastic_strain.cpp +++ b/src/USER-SMD/compute_smd_plastic_strain.cpp @@ -103,6 +103,6 @@ void ComputeSMDPlasticStrain::compute_peratom() double ComputeSMDPlasticStrain::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_plastic_strain_rate.cpp b/src/USER-SMD/compute_smd_plastic_strain_rate.cpp index d5d7ac7e16..ce24a4a4ee 100644 --- a/src/USER-SMD/compute_smd_plastic_strain_rate.cpp +++ b/src/USER-SMD/compute_smd_plastic_strain_rate.cpp @@ -103,6 +103,6 @@ void ComputeSMDPlasticStrainRate::compute_peratom() double ComputeSMDPlasticStrainRate::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_rho.cpp b/src/USER-SMD/compute_smd_rho.cpp index d97b1ecbe5..e570090e2a 100644 --- a/src/USER-SMD/compute_smd_rho.cpp +++ b/src/USER-SMD/compute_smd_rho.cpp @@ -101,6 +101,6 @@ void ComputeSMDRho::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDRho::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_tlsph_defgrad.cpp b/src/USER-SMD/compute_smd_tlsph_defgrad.cpp index 96e6a638b9..277df87eec 100644 --- a/src/USER-SMD/compute_smd_tlsph_defgrad.cpp +++ b/src/USER-SMD/compute_smd_tlsph_defgrad.cpp @@ -130,6 +130,6 @@ void ComputeSMDTLSPHDefgrad::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDTLSPHDefgrad::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_tlsph_dt.cpp b/src/USER-SMD/compute_smd_tlsph_dt.cpp index ee9f3e0db2..54de8a7cd4 100644 --- a/src/USER-SMD/compute_smd_tlsph_dt.cpp +++ b/src/USER-SMD/compute_smd_tlsph_dt.cpp @@ -110,6 +110,6 @@ void ComputeSMDTlsphDt::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDTlsphDt::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_tlsph_num_neighs.cpp b/src/USER-SMD/compute_smd_tlsph_num_neighs.cpp index 796c16b369..6d77fc38da 100644 --- a/src/USER-SMD/compute_smd_tlsph_num_neighs.cpp +++ b/src/USER-SMD/compute_smd_tlsph_num_neighs.cpp @@ -102,6 +102,6 @@ void ComputeSMDTLSPHNumNeighs::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDTLSPHNumNeighs::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_tlsph_shape.cpp b/src/USER-SMD/compute_smd_tlsph_shape.cpp index 2dce1fbd3a..a32c15af28 100644 --- a/src/USER-SMD/compute_smd_tlsph_shape.cpp +++ b/src/USER-SMD/compute_smd_tlsph_shape.cpp @@ -130,6 +130,6 @@ void ComputeSmdTlsphShape::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSmdTlsphShape::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_tlsph_strain.cpp b/src/USER-SMD/compute_smd_tlsph_strain.cpp index f2f7bc2044..c3eae3bfe9 100644 --- a/src/USER-SMD/compute_smd_tlsph_strain.cpp +++ b/src/USER-SMD/compute_smd_tlsph_strain.cpp @@ -139,6 +139,6 @@ void ComputeSMDTLSPHstrain::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDTLSPHstrain::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_tlsph_strain_rate.cpp b/src/USER-SMD/compute_smd_tlsph_strain_rate.cpp index aa1f490afb..e6de94abf9 100644 --- a/src/USER-SMD/compute_smd_tlsph_strain_rate.cpp +++ b/src/USER-SMD/compute_smd_tlsph_strain_rate.cpp @@ -112,6 +112,6 @@ void ComputeSMDTLSPHStrainRate::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDTLSPHStrainRate::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_tlsph_stress.cpp b/src/USER-SMD/compute_smd_tlsph_stress.cpp index 8314b4cbea..26bb78a1db 100644 --- a/src/USER-SMD/compute_smd_tlsph_stress.cpp +++ b/src/USER-SMD/compute_smd_tlsph_stress.cpp @@ -129,6 +129,6 @@ void ComputeSMDTLSPHStress::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDTLSPHStress::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_triangle_vertices.cpp b/src/USER-SMD/compute_smd_triangle_vertices.cpp index c487e60872..6b949196f9 100644 --- a/src/USER-SMD/compute_smd_triangle_vertices.cpp +++ b/src/USER-SMD/compute_smd_triangle_vertices.cpp @@ -118,6 +118,6 @@ void ComputeSMDTriangleVertices::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDTriangleVertices::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_ulsph_effm.cpp b/src/USER-SMD/compute_smd_ulsph_effm.cpp index c1668f2932..c3fdd5bab9 100644 --- a/src/USER-SMD/compute_smd_ulsph_effm.cpp +++ b/src/USER-SMD/compute_smd_ulsph_effm.cpp @@ -110,6 +110,6 @@ void ComputeSMD_Ulsph_Effm::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMD_Ulsph_Effm::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_ulsph_num_neighs.cpp b/src/USER-SMD/compute_smd_ulsph_num_neighs.cpp index 54b300a261..ff40172dea 100644 --- a/src/USER-SMD/compute_smd_ulsph_num_neighs.cpp +++ b/src/USER-SMD/compute_smd_ulsph_num_neighs.cpp @@ -102,6 +102,6 @@ void ComputeSMDULSPHNumNeighs::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDULSPHNumNeighs::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_ulsph_strain.cpp b/src/USER-SMD/compute_smd_ulsph_strain.cpp index 3a45301033..fc4d0c6ecf 100644 --- a/src/USER-SMD/compute_smd_ulsph_strain.cpp +++ b/src/USER-SMD/compute_smd_ulsph_strain.cpp @@ -108,6 +108,6 @@ void ComputeSMDULSPHstrain::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDULSPHstrain::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_ulsph_strain_rate.cpp b/src/USER-SMD/compute_smd_ulsph_strain_rate.cpp index 13c6a59aa1..dfd746b332 100644 --- a/src/USER-SMD/compute_smd_ulsph_strain_rate.cpp +++ b/src/USER-SMD/compute_smd_ulsph_strain_rate.cpp @@ -119,6 +119,6 @@ void ComputeSMDULSPHStrainRate::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDULSPHStrainRate::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_ulsph_stress.cpp b/src/USER-SMD/compute_smd_ulsph_stress.cpp index 18c23cc073..6a5363136e 100644 --- a/src/USER-SMD/compute_smd_ulsph_stress.cpp +++ b/src/USER-SMD/compute_smd_ulsph_stress.cpp @@ -130,7 +130,7 @@ void ComputeSMDULSPHStress::compute_peratom() { ------------------------------------------------------------------------- */ double ComputeSMDULSPHStress::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMD/compute_smd_vol.cpp b/src/USER-SMD/compute_smd_vol.cpp index 9590417747..410fc145f9 100644 --- a/src/USER-SMD/compute_smd_vol.cpp +++ b/src/USER-SMD/compute_smd_vol.cpp @@ -125,6 +125,6 @@ double ComputeSMDVol::compute_scalar() { ------------------------------------------------------------------------- */ double ComputeSMDVol::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SMTBQ/pair_smtbq.cpp b/src/USER-SMTBQ/pair_smtbq.cpp index f32d2e0c98..7ed37fefc4 100644 --- a/src/USER-SMTBQ/pair_smtbq.cpp +++ b/src/USER-SMTBQ/pair_smtbq.cpp @@ -3524,7 +3524,7 @@ void PairSMTBQ::reverse_int(int *tab) double PairSMTBQ::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)nmax * sizeof(int); bytes += (double)MAXNEIGH * nmax * sizeof(int); diff --git a/src/USER-SPH/compute_sph_e_atom.cpp b/src/USER-SPH/compute_sph_e_atom.cpp index f8297f2c32..249de1498b 100644 --- a/src/USER-SPH/compute_sph_e_atom.cpp +++ b/src/USER-SPH/compute_sph_e_atom.cpp @@ -93,6 +93,6 @@ void ComputeSPHEAtom::compute_peratom() double ComputeSPHEAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SPH/compute_sph_rho_atom.cpp b/src/USER-SPH/compute_sph_rho_atom.cpp index ebd11c906d..76f46ccdd7 100644 --- a/src/USER-SPH/compute_sph_rho_atom.cpp +++ b/src/USER-SPH/compute_sph_rho_atom.cpp @@ -94,6 +94,6 @@ void ComputeSPHRhoAtom::compute_peratom() double ComputeSPHRhoAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/USER-SPH/compute_sph_t_atom.cpp b/src/USER-SPH/compute_sph_t_atom.cpp index 9369a19faf..d33630c227 100644 --- a/src/USER-SPH/compute_sph_t_atom.cpp +++ b/src/USER-SPH/compute_sph_t_atom.cpp @@ -96,6 +96,6 @@ void ComputeSPHTAtom::compute_peratom() double ComputeSPHTAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/VORONOI/compute_voronoi_atom.cpp b/src/VORONOI/compute_voronoi_atom.cpp index 63158d4a6b..bcd9031b6e 100644 --- a/src/VORONOI/compute_voronoi_atom.cpp +++ b/src/VORONOI/compute_voronoi_atom.cpp @@ -614,7 +614,7 @@ void ComputeVoronoi::processCell(voronoicell_neighbor &c, int i) double ComputeVoronoi::memory_usage() { - double bytes = size_peratom_cols * nmax * sizeof(double); + double bytes = (double)size_peratom_cols * nmax * sizeof(double); // estimate based on average coordination of 12 if (faces_flag) bytes += (double)12 * size_local_cols * nmax * sizeof(double); return bytes; diff --git a/src/angle.cpp b/src/angle.cpp index 17ece68755..110608a867 100644 --- a/src/angle.cpp +++ b/src/angle.cpp @@ -350,7 +350,7 @@ void Angle::ev_tally(int i, int j, int k, int nlocal, int newton_bond, double Angle::memory_usage() { - double bytes = comm->nthreads*maxeatom * sizeof(double); + double bytes = (double)comm->nthreads*maxeatom * sizeof(double); bytes += (double)comm->nthreads*maxvatom*6 * sizeof(double); bytes += (double)comm->nthreads*maxcvatom*9 * sizeof(double); return bytes; diff --git a/src/angle_hybrid.cpp b/src/angle_hybrid.cpp index 98d9bb9762..1e4ade3ca8 100644 --- a/src/angle_hybrid.cpp +++ b/src/angle_hybrid.cpp @@ -391,7 +391,7 @@ double AngleHybrid::single(int type, int i1, int i2, int i3) double AngleHybrid::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)maxcvatom*9 * sizeof(double); for (int m = 0; m < nstyles; m++) bytes += (double)maxangle[m]*4 * sizeof(int); diff --git a/src/bond.cpp b/src/bond.cpp index e8d220d104..1db4681c71 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -329,7 +329,7 @@ void Bond::write_file(int narg, char **arg) double Bond::memory_usage() { - double bytes = comm->nthreads*maxeatom * sizeof(double); + double bytes = (double)comm->nthreads*maxeatom * sizeof(double); bytes += (double)comm->nthreads*maxvatom*6 * sizeof(double); return bytes; } diff --git a/src/bond_hybrid.cpp b/src/bond_hybrid.cpp index ec275ce0a4..3a6bb4b7de 100644 --- a/src/bond_hybrid.cpp +++ b/src/bond_hybrid.cpp @@ -386,7 +386,7 @@ double BondHybrid::single(int type, double rsq, int i, int j, double BondHybrid::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); for (int m = 0; m < nstyles; m++) bytes += (double)maxbond[m]*3 * sizeof(int); for (int m = 0; m < nstyles; m++) diff --git a/src/compute_aggregate_atom.cpp b/src/compute_aggregate_atom.cpp index 7380c02487..212195eb1a 100644 --- a/src/compute_aggregate_atom.cpp +++ b/src/compute_aggregate_atom.cpp @@ -312,6 +312,6 @@ void ComputeAggregateAtom::unpack_reverse_comm(int n, int *list, double *buf) double ComputeAggregateAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/compute_angle_local.cpp b/src/compute_angle_local.cpp index f4dab647fe..8e24eccf01 100644 --- a/src/compute_angle_local.cpp +++ b/src/compute_angle_local.cpp @@ -343,6 +343,6 @@ void ComputeAngleLocal::reallocate(int n) double ComputeAngleLocal::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/compute_bond_local.cpp b/src/compute_bond_local.cpp index 06d351b7c6..d13f313aea 100644 --- a/src/compute_bond_local.cpp +++ b/src/compute_bond_local.cpp @@ -498,6 +498,6 @@ void ComputeBondLocal::reallocate(int n) double ComputeBondLocal::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/compute_centro_atom.cpp b/src/compute_centro_atom.cpp index a8669efb28..9d40fa0fd5 100644 --- a/src/compute_centro_atom.cpp +++ b/src/compute_centro_atom.cpp @@ -436,7 +436,7 @@ void ComputeCentroAtom::select2(int k, int n, double *arr, int *iarr) double ComputeCentroAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); if (axes_flag) bytes += (double)size_peratom_cols*nmax * sizeof(double); return bytes; } diff --git a/src/compute_centroid_stress_atom.cpp b/src/compute_centroid_stress_atom.cpp index 1b814961a0..cf3a308190 100644 --- a/src/compute_centroid_stress_atom.cpp +++ b/src/compute_centroid_stress_atom.cpp @@ -464,6 +464,6 @@ void ComputeCentroidStressAtom::unpack_reverse_comm(int n, int *list, double *bu double ComputeCentroidStressAtom::memory_usage() { - double bytes = nmax*9 * sizeof(double); + double bytes = (double)nmax*9 * sizeof(double); return bytes; } diff --git a/src/compute_chunk_spread_atom.cpp b/src/compute_chunk_spread_atom.cpp index 67f7e304a3..257e5d0960 100644 --- a/src/compute_chunk_spread_atom.cpp +++ b/src/compute_chunk_spread_atom.cpp @@ -322,6 +322,6 @@ void ComputeChunkSpreadAtom::compute_peratom() double ComputeChunkSpreadAtom::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/compute_cluster_atom.cpp b/src/compute_cluster_atom.cpp index 2056ff99a8..4de5a2321c 100644 --- a/src/compute_cluster_atom.cpp +++ b/src/compute_cluster_atom.cpp @@ -267,6 +267,6 @@ void ComputeClusterAtom::unpack_forward_comm(int n, int first, double *buf) double ComputeClusterAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/compute_cna_atom.cpp b/src/compute_cna_atom.cpp index f629508bde..8b857444e5 100644 --- a/src/compute_cna_atom.cpp +++ b/src/compute_cna_atom.cpp @@ -355,7 +355,7 @@ void ComputeCNAAtom::compute_peratom() double ComputeCNAAtom::memory_usage() { - double bytes = nmax * sizeof(int); + double bytes = (double)nmax * sizeof(int); bytes += (double)nmax * MAXNEAR * sizeof(int); bytes += (double)nmax * sizeof(double); return bytes; diff --git a/src/compute_contact_atom.cpp b/src/compute_contact_atom.cpp index f87d49c439..272c677333 100644 --- a/src/compute_contact_atom.cpp +++ b/src/compute_contact_atom.cpp @@ -188,6 +188,6 @@ void ComputeContactAtom::unpack_reverse_comm(int n, int *list, double *buf) double ComputeContactAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/compute_coord_atom.cpp b/src/compute_coord_atom.cpp index 686c58e8d9..3055fb96ac 100644 --- a/src/compute_coord_atom.cpp +++ b/src/compute_coord_atom.cpp @@ -355,6 +355,6 @@ void ComputeCoordAtom::unpack_forward_comm(int n, int first, double *buf) double ComputeCoordAtom::memory_usage() { - double bytes = ncol*nmax * sizeof(double); + double bytes = (double)ncol*nmax * sizeof(double); return bytes; } diff --git a/src/compute_dihedral_local.cpp b/src/compute_dihedral_local.cpp index d895bd33ec..d6fa722e26 100644 --- a/src/compute_dihedral_local.cpp +++ b/src/compute_dihedral_local.cpp @@ -353,6 +353,6 @@ void ComputeDihedralLocal::reallocate(int n) double ComputeDihedralLocal::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/compute_displace_atom.cpp b/src/compute_displace_atom.cpp index cb1bb30275..445caa15dc 100644 --- a/src/compute_displace_atom.cpp +++ b/src/compute_displace_atom.cpp @@ -247,7 +247,7 @@ void ComputeDisplaceAtom::refresh() double ComputeDisplaceAtom::memory_usage() { - double bytes = nmax*4 * sizeof(double); + double bytes = (double)nmax*4 * sizeof(double); bytes += (double)nvmax * sizeof(double); return bytes; } diff --git a/src/compute_erotate_sphere_atom.cpp b/src/compute_erotate_sphere_atom.cpp index ca15a5d917..cdedfd3509 100644 --- a/src/compute_erotate_sphere_atom.cpp +++ b/src/compute_erotate_sphere_atom.cpp @@ -105,6 +105,6 @@ void ComputeErotateSphereAtom::compute_peratom() double ComputeErotateSphereAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/compute_fragment_atom.cpp b/src/compute_fragment_atom.cpp index b7ed6c31d1..b0ad8e5e60 100644 --- a/src/compute_fragment_atom.cpp +++ b/src/compute_fragment_atom.cpp @@ -285,7 +285,7 @@ void ComputeFragmentAtom::unpack_forward_comm(int n, int first, double *buf) double ComputeFragmentAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); bytes += (double)3*nmax * sizeof(int); return bytes; } diff --git a/src/compute_global_atom.cpp b/src/compute_global_atom.cpp index cc5aaf24c4..8745ef82b4 100644 --- a/src/compute_global_atom.cpp +++ b/src/compute_global_atom.cpp @@ -483,7 +483,7 @@ void ComputeGlobalAtom::compute_peratom() double ComputeGlobalAtom::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); bytes += (double)nmax * sizeof(int); // indices if (varatom) bytes += (double)nmax * sizeof(double); // varatom bytes += (double)maxvector * sizeof(double); // vecglobal diff --git a/src/compute_hexorder_atom.cpp b/src/compute_hexorder_atom.cpp index 4c50b227ab..827d8d3692 100644 --- a/src/compute_hexorder_atom.cpp +++ b/src/compute_hexorder_atom.cpp @@ -338,7 +338,7 @@ void ComputeHexOrderAtom::select2(int k, int n, double *arr, int *iarr) double ComputeHexOrderAtom::memory_usage() { - double bytes = ncol*nmax * sizeof(double); + double bytes = (double)ncol*nmax * sizeof(double); bytes += (double)maxneigh * sizeof(double); bytes += (double)maxneigh * sizeof(int); diff --git a/src/compute_improper_local.cpp b/src/compute_improper_local.cpp index fd1b2dcfab..5d78e585e8 100644 --- a/src/compute_improper_local.cpp +++ b/src/compute_improper_local.cpp @@ -251,6 +251,6 @@ void ComputeImproperLocal::reallocate(int n) double ComputeImproperLocal::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/compute_ke_atom.cpp b/src/compute_ke_atom.cpp index c010041545..17dbd82ee1 100644 --- a/src/compute_ke_atom.cpp +++ b/src/compute_ke_atom.cpp @@ -103,6 +103,6 @@ void ComputeKEAtom::compute_peratom() double ComputeKEAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/compute_orientorder_atom.cpp b/src/compute_orientorder_atom.cpp index 21baaf008a..eb5a96b706 100644 --- a/src/compute_orientorder_atom.cpp +++ b/src/compute_orientorder_atom.cpp @@ -331,7 +331,7 @@ void ComputeOrientOrderAtom::compute_peratom() double ComputeOrientOrderAtom::memory_usage() { - double bytes = ncol*nmax * sizeof(double); + double bytes = (double)ncol*nmax * sizeof(double); bytes += (double)(qmax*(2*qmax+1)+maxneigh*4) * sizeof(double); bytes += (double)(nqlist+maxneigh) * sizeof(int); return bytes; diff --git a/src/compute_pair_local.cpp b/src/compute_pair_local.cpp index 6ca6177b90..6bc1d7b6cb 100644 --- a/src/compute_pair_local.cpp +++ b/src/compute_pair_local.cpp @@ -322,6 +322,6 @@ void ComputePairLocal::reallocate(int n) double ComputePairLocal::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/compute_pe_atom.cpp b/src/compute_pe_atom.cpp index 52e132a626..7c8f786397 100644 --- a/src/compute_pe_atom.cpp +++ b/src/compute_pe_atom.cpp @@ -200,6 +200,6 @@ void ComputePEAtom::unpack_reverse_comm(int n, int *list, double *buf) double ComputePEAtom::memory_usage() { - double bytes = nmax * sizeof(double); + double bytes = (double)nmax * sizeof(double); return bytes; } diff --git a/src/compute_property_atom.cpp b/src/compute_property_atom.cpp index ef8888daf7..cb7cbca0b8 100644 --- a/src/compute_property_atom.cpp +++ b/src/compute_property_atom.cpp @@ -453,7 +453,7 @@ void ComputePropertyAtom::compute_peratom() double ComputePropertyAtom::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/compute_property_local.cpp b/src/compute_property_local.cpp index 365995f863..b7b1d711c3 100644 --- a/src/compute_property_local.cpp +++ b/src/compute_property_local.cpp @@ -650,7 +650,7 @@ void ComputePropertyLocal::reallocate(int n) double ComputePropertyLocal::memory_usage() { - double bytes = nmax*nvalues * sizeof(double); + double bytes = (double)nmax*nvalues * sizeof(double); bytes += (double)nmax*2 * sizeof(int); return bytes; } diff --git a/src/compute_reduce.cpp b/src/compute_reduce.cpp index 3efb4adbed..82d3dff458 100644 --- a/src/compute_reduce.cpp +++ b/src/compute_reduce.cpp @@ -662,6 +662,6 @@ void ComputeReduce::combine(double &one, double two, int i) double ComputeReduce::memory_usage() { - double bytes = maxatom * sizeof(double); + double bytes = (double)maxatom * sizeof(double); return bytes; } diff --git a/src/compute_stress_atom.cpp b/src/compute_stress_atom.cpp index f918f7f293..b7cee8957d 100644 --- a/src/compute_stress_atom.cpp +++ b/src/compute_stress_atom.cpp @@ -382,6 +382,6 @@ void ComputeStressAtom::unpack_reverse_comm(int n, int *list, double *buf) double ComputeStressAtom::memory_usage() { - double bytes = nmax*6 * sizeof(double); + double bytes = (double)nmax*6 * sizeof(double); return bytes; } diff --git a/src/compute_temp_profile.cpp b/src/compute_temp_profile.cpp index 6f705d077f..6938560359 100644 --- a/src/compute_temp_profile.cpp +++ b/src/compute_temp_profile.cpp @@ -577,7 +577,7 @@ void ComputeTempProfile::bin_assign() double ComputeTempProfile::memory_usage() { - double bytes = maxatom * sizeof(int); + double bytes = (double)maxatom * sizeof(int); bytes += (double)nbins*ncount * sizeof(double); return bytes; } diff --git a/src/dihedral.cpp b/src/dihedral.cpp index 2932bcbe2f..2fe354b7ab 100644 --- a/src/dihedral.cpp +++ b/src/dihedral.cpp @@ -390,7 +390,7 @@ void Dihedral::ev_tally(int i1, int i2, int i3, int i4, double Dihedral::memory_usage() { - double bytes = comm->nthreads*maxeatom * sizeof(double); + double bytes = (double)comm->nthreads*maxeatom * sizeof(double); bytes += (double)comm->nthreads*maxvatom*6 * sizeof(double); bytes += (double)comm->nthreads*maxcvatom*9 * sizeof(double); return bytes; diff --git a/src/dihedral_hybrid.cpp b/src/dihedral_hybrid.cpp index dbad92868d..c30c0705f6 100644 --- a/src/dihedral_hybrid.cpp +++ b/src/dihedral_hybrid.cpp @@ -354,7 +354,7 @@ void DihedralHybrid::read_restart(FILE *fp) double DihedralHybrid::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)maxcvatom*9 * sizeof(double); for (int m = 0; m < nstyles; m++) bytes += (double)maxdihedral[m]*5 * sizeof(int); diff --git a/src/fix_ave_chunk.cpp b/src/fix_ave_chunk.cpp index 32cba42c9c..c65e0030c5 100644 --- a/src/fix_ave_chunk.cpp +++ b/src/fix_ave_chunk.cpp @@ -1131,7 +1131,7 @@ bigint FixAveChunk::nextvalid() double FixAveChunk::memory_usage() { - double bytes = maxvar * sizeof(double); // varatom + double bytes = (double)maxvar * sizeof(double); // varatom bytes += (double)4*maxchunk * sizeof(double); // count one,many,sum,total bytes += (double)nvalues*maxchunk * sizeof(double); // values one,many,sum,total bytes += (double)nwindow*maxchunk * sizeof(double); // count_list diff --git a/src/fix_move.cpp b/src/fix_move.cpp index abea871935..647a33a5ca 100644 --- a/src/fix_move.cpp +++ b/src/fix_move.cpp @@ -964,7 +964,7 @@ void FixMove::final_integrate_respa(int ilevel, int /*iloop*/) double FixMove::memory_usage() { - double bytes = atom->nmax*3 * sizeof(double); + double bytes = (double)atom->nmax*3 * sizeof(double); if (theta_flag) bytes += (double)atom->nmax * sizeof(double); if (quat_flag) bytes += (double)atom->nmax*4 * sizeof(double); if (displaceflag) bytes += (double)atom->nmax*3 * sizeof(double); diff --git a/src/fix_neigh_history.cpp b/src/fix_neigh_history.cpp index 2098382161..cccf6ad0a2 100644 --- a/src/fix_neigh_history.cpp +++ b/src/fix_neigh_history.cpp @@ -672,7 +672,7 @@ void FixNeighHistory::post_run() double FixNeighHistory::memory_usage() { int nmax = atom->nmax; - double bytes = nmax * sizeof(int); // npartner + double bytes = (double)nmax * sizeof(int); // npartner bytes += (double)nmax * sizeof(tagint *); // partner bytes += (double)nmax * sizeof(double *); // valuepartner bytes += (double)maxatom * sizeof(int *); // firstflag diff --git a/src/fix_read_restart.cpp b/src/fix_read_restart.cpp index 7ff816ea37..3c7ef4c564 100644 --- a/src/fix_read_restart.cpp +++ b/src/fix_read_restart.cpp @@ -76,7 +76,7 @@ int FixReadRestart::setmask() double FixReadRestart::memory_usage() { - double bytes = atom->nmax*nextra * sizeof(double); + double bytes = (double)atom->nmax*nextra * sizeof(double); bytes += (double)atom->nmax * sizeof(int); return bytes; } diff --git a/src/fix_respa.cpp b/src/fix_respa.cpp index f2dc7d69d3..99b3c18843 100644 --- a/src/fix_respa.cpp +++ b/src/fix_respa.cpp @@ -74,7 +74,7 @@ int FixRespa::setmask() double FixRespa::memory_usage() { - double bytes = atom->nmax*nlevels*3 * sizeof(double); + double bytes = (double)atom->nmax*nlevels*3 * sizeof(double); if (store_torque) bytes += (double)atom->nmax*nlevels*3 * sizeof(double); return bytes; } diff --git a/src/fix_spring_self.cpp b/src/fix_spring_self.cpp index 50d09acf50..79046e09f7 100644 --- a/src/fix_spring_self.cpp +++ b/src/fix_spring_self.cpp @@ -210,7 +210,7 @@ double FixSpringSelf::compute_scalar() double FixSpringSelf::memory_usage() { - double bytes = atom->nmax*3 * sizeof(double); + double bytes = (double)atom->nmax*3 * sizeof(double); return bytes; } diff --git a/src/fix_store_force.cpp b/src/fix_store_force.cpp index 10c4cc2496..460422aee9 100644 --- a/src/fix_store_force.cpp +++ b/src/fix_store_force.cpp @@ -135,6 +135,6 @@ void FixStoreForce::min_post_force(int vflag) double FixStoreForce::memory_usage() { - double bytes = atom->nmax*3 * sizeof(double); + double bytes = (double)atom->nmax*3 * sizeof(double); return bytes; } diff --git a/src/fix_store_state.cpp b/src/fix_store_state.cpp index 639012a735..fff7133edb 100644 --- a/src/fix_store_state.cpp +++ b/src/fix_store_state.cpp @@ -537,7 +537,7 @@ void FixStoreState::end_of_step() double FixStoreState::memory_usage() { - double bytes = atom->nmax*nvalues * sizeof(double); + double bytes = (double)atom->nmax*nvalues * sizeof(double); return bytes; } diff --git a/src/improper.cpp b/src/improper.cpp index 8e24c98116..bab1b91fbf 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -388,7 +388,7 @@ void Improper::ev_tally(int i1, int i2, int i3, int i4, double Improper::memory_usage() { - double bytes = comm->nthreads*maxeatom * sizeof(double); + double bytes = (double)comm->nthreads*maxeatom * sizeof(double); bytes += (double)comm->nthreads*maxvatom*6 * sizeof(double); return bytes; } diff --git a/src/improper_hybrid.cpp b/src/improper_hybrid.cpp index 66ec692d4b..fd5d76049b 100644 --- a/src/improper_hybrid.cpp +++ b/src/improper_hybrid.cpp @@ -350,7 +350,7 @@ void ImproperHybrid::read_restart(FILE *fp) double ImproperHybrid::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)maxcvatom*9 * sizeof(double); for (int m = 0; m < nstyles; m++) bytes += (double)maximproper[m]*5 * sizeof(int); diff --git a/src/my_pool_chunk.cpp b/src/my_pool_chunk.cpp index c58bb5c209..8bf40840fe 100644 --- a/src/my_pool_chunk.cpp +++ b/src/my_pool_chunk.cpp @@ -211,7 +211,7 @@ void MyPoolChunk::allocate(int ibin) { template double MyPoolChunk::size() const { - double bytes = npage*chunkperpage*sizeof(int); + double bytes = (double)npage*chunkperpage*sizeof(int); bytes += (double)npage*sizeof(T *); bytes += (double)npage*sizeof(int); for (int i=0; i < npage; ++i) diff --git a/src/pair.cpp b/src/pair.cpp index d9e7304ba3..739d364e57 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -1836,7 +1836,7 @@ void Pair::hessian_twobody(double fforce, double dfac, double delr[3], double ph double Pair::memory_usage() { - double bytes = comm->nthreads*maxeatom * sizeof(double); + double bytes = (double)comm->nthreads*maxeatom * sizeof(double); bytes += (double)comm->nthreads*maxvatom*6 * sizeof(double); bytes += (double)comm->nthreads*maxcvatom*9 * sizeof(double); return bytes; diff --git a/src/pair_coul_streitz.cpp b/src/pair_coul_streitz.cpp index 941bc8c83d..0b6e6513a3 100644 --- a/src/pair_coul_streitz.cpp +++ b/src/pair_coul_streitz.cpp @@ -736,7 +736,7 @@ void PairCoulStreitz::ewald_sum(double qi, double qj, double zj, double r, double PairCoulStreitz::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)nmax * sizeof(int); bytes += (double)MAXNEIGH * nmax * sizeof(int); diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index fc8f24defd..377364b8e5 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -1078,7 +1078,7 @@ int PairHybrid::check_ijtype(int itype, int jtype, char *substyle) double PairHybrid::memory_usage() { - double bytes = maxeatom * sizeof(double); + double bytes = (double)maxeatom * sizeof(double); bytes += (double)maxvatom*6 * sizeof(double); bytes += (double)maxcvatom*9 * sizeof(double); for (int m = 0; m < nstyles; m++) bytes += styles[m]->memory_usage();