Skip to content

Commit

Permalink
Merge pull request #3 from patricialarsen/add_xrays
Browse files Browse the repository at this point in the history
Everything
  • Loading branch information
patricialarsen authored Nov 4, 2024
2 parents a53638d + cce13ac commit 9fd198f
Show file tree
Hide file tree
Showing 26 changed files with 1,735 additions and 300 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ density_maps/*.error
density_maps/*.cobaltlog
density_maps/*.output
denstiy_maps/logs/*
density_maps/*.o
density_maps/obj/*.o
density_maps/*.out
density_maps/adiabatic_bhp
density_maps/hydro_xray
density_maps/hydro_p

pixelize_halo_lightcones/LJ/*.error
pixelize_halo_lightcones/LJ/*.cobaltlog
Expand Down
36 changes: 19 additions & 17 deletions density_maps/Makefile
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
CC = ${HACC_MPI_CC}
CXX = ${HACC_MPI_CXX}

HPXDIR = /home/prlarsen/codes/Healpix_3.82
CFITSDIR = /home/prlarsen/codes/cfitsio-4.4.1/build
ENVLOC = frontier.kokkos_hip

GIODIR = /home/prlarsen/codes/HACC/aurora.kokkos_sycl_thirdparty/mpi
HACCDIR = /home/prlarsen/codes/HACC

HACCLIB = -qopenmp -lm -lpthread -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend '-device 12.60.7' -L${HACCDIR}/thirdparty/aurora/lib64 -lkokkoscontainers -lkokkoscore -ldl
HPXDIR = /ccs/home/prlarsen/codes/Healpix_3.82
CFITSDIR = /ccs/home/prlarsen/codes/cfitsio-4.4.0/build
GIODIR = /ccs/home/prlarsen/codes/HACC/frontier.kokkos_hip/mpi
HACCDIR = /ccs/home/prlarsen/codes/HACC

SCDIR = src

HACCLIB = -lm -fopenmp

HPXCINCDIR = -I${HPXDIR}/include
HPXINCDIR = -I${HPXDIR}/include/healpix_cxx
HPXLIBDIR = ${HPXDIR}/lib
CFTLIBDIR = ${CFITSDIR}/lib

GIOINCDIR = -I${HACCDIR}/submodules/genericio
GIOLIBDIR = ${GIODIR}/lib

HACCINCDIR = -I${HACCDIR}/cosmotools/algorithms/halofinder
HACCINCDIR2 = -I${HACCDIR}/cosmotools/common
HYDROINC = ${HACCDIR}/aurora.kokkos_sycl_thirdparty/mpi/nbody/common
HYDROINC = ${HACCDIR}/${ENVLOC}/mpi/nbody/common
HYDROINC2 = -I${HACCDIR}/nbody/common
HYDROINC3 = ${HACCDIR}/aurora.kokkos_sycl_thirdparty/mpi/cosmotools/algorithms/halofinder
HYDROINC3 = ${HACCDIR}/${ENVLOC}/mpi/cosmotools/algorithms/halofinder
BLOSCDIR = -I${GIODIR}/genericio/thirdparty/blosc


INCDIRS = ${GIOINCDIR} ${HPXINCDIR} ${HPXCINCDIR} ${BLOSCDIR} ${HACCINCDIR} ${HACCINCDIR2} ${HYDROINC2} -I${HYDROINC3} -I./inc/
LIBDIRS = -L${HPXLIBDIR} -L${GIOLIBDIR} -L${CFTLIBDIR}


go_compile: ${SCDIR}/gravonly.cxx
${CXX} -g -O3 -qopenmp -c ${INCDIRS} ${SCDIR}/gravonly.cxx ${SCDIR}/utils_gravonly.cxx ${SCDIR}/pix_funcs_gravonly.cxx ${SCDIR}/PLParticles.cxx -std=c++17 ${HACC_MPI_CXXFLAGS}
${CXX} -g -O3 -fopenmp -c ${INCDIRS} ${SCDIR}/gravonly.cxx ${SCDIR}/utils_gravonly.cxx ${SCDIR}/pix_funcs_gravonly.cxx ${SCDIR}/PLParticles.cxx -std=c++17 ${HACC_MPI_CXXFLAGS}

go_link: ${SCDIR}/gravonly.cxx
${CXX} -g -O3 -qopenmp -o dens gravonly.o utils_gravonly.o pix_funcs_gravonly.o PLParticles.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lhealpix_cxx -std=c++17 ${HACCLIB}
${CXX} -g -O3 -fopenmp -o dens gravonly.o utils_gravonly.o pix_funcs_gravonly.o PLParticles.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lhealpix_cxx -std=c++17 ${HACCLIB}



main_compile: ${SCDIR}/main.cxx
${CXX} -g -O3 -qopenmp -c ${INCDIRS} ${SCDIR}/main.cxx ${SCDIR}/utils_dm.cxx ${SCDIR}/pix_funcs_dm.cxx ${SCDIR}/PLParticles.cxx -std=c++17 ${HACC_MPI_CXXFLAGS}
main_compile: main.cxx
${CXX} -c -fopenmp ${INCDIRS} ${SCDIR}/main.cxx utils.cxx pix_funcs.cxx PLParticles.cxx -std=c++11

main_link: ${SCDIR}/main.cxx
${CXX} -g -O3 -qopenmp -o dens main.o utils_dm.o pix_funcs_dm.o PLParticles.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lhealpix_cxx -std=c++17 ${HACCLIB}
main_link: main.cxx
${CXX} -O3 -fopenmp -o dens main.o utils.o pix_funcs.o PLParticles.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lchealpix -lhealpix_cxx -std=c++11


hydro_compile: ${SCDIR}/hydro.cxx
${CXX} -g -O3 -qopenmp -c ${INCDIRS} ${SCDIR}/hydro.cxx ${SCDIR}/utils.cxx ${SCDIR}/pix_funcs.cxx ${SCDIR}/PLParticles.cxx ${SCDIR}/PLHalos.cxx -std=c++17
${CXX} -c -fopenmp ${INCDIRS} ${SCDIR}/hydro.cxx ${SCDIR}/utils.cxx ${SCDIR}/pix_funcs.cxx ${SCDIR}/PLParticles.cxx ${SCDIR}/PLHalos.cxx -std=c++17

hydro_link: ${SCDIR}/hydro.cxx
${CXX} -g -O3 -qopenmp -o hydro_xray hydro.o utils.o pix_funcs.o PLParticles.o PLHalos.o ${HYDROINC3}/RadiativeCooling.o ${HYDROINC}/Domain.o ${GIODIR}/cosmotools/algorithms/halofinder/Partition.o ${GIODIR}/cosmotools/algorithms/halofinder/dims.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lhealpix_cxx -std=c++17
${CXX} -O3 -fopenmp -o hydro_xray hydro.o utils.o pix_funcs.o PLParticles.o PLHalos.o ${HYDROINC3}/RadiativeCooling.o ${HYDROINC}/Domain.o ${GIODIR}/cosmotools/algorithms/halofinder/Partition.o ${GIODIR}/cosmotools/algorithms/halofinder/dims.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lchealpix -lhealpix_cxx -std=c++17


53 changes: 53 additions & 0 deletions density_maps/Makefile_aurora
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
CC = ${HACC_MPI_CC}
CXX = ${HACC_MPI_CXX}

HPXDIR = /home/prlarsen/codes/Healpix_3.82
CFITSDIR = /home/prlarsen/codes/cfitsio-4.4.1/build

GIODIR = /home/prlarsen/codes/HACC/aurora.kokkos_sycl_thirdparty/mpi
HACCDIR = /home/prlarsen/codes/HACC

HACCLIB = -qopenmp -lm -lpthread -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend '-device 12.60.7' -L${HACCDIR}/thirdparty/aurora/lib64 -lkokkoscontainers -lkokkoscore -ldl

SCDIR = src

HPXCINCDIR = -I${HPXDIR}/include
HPXINCDIR = -I${HPXDIR}/include/healpix_cxx
HPXLIBDIR = ${HPXDIR}/lib
CFTLIBDIR = ${CFITSDIR}/lib

GIOINCDIR = -I${HACCDIR}/submodules/genericio
GIOLIBDIR = ${GIODIR}/lib

HACCINCDIR = -I${HACCDIR}/cosmotools/algorithms/halofinder
HACCINCDIR2 = -I${HACCDIR}/cosmotools/common
HYDROINC = ${HACCDIR}/aurora.kokkos_sycl_thirdparty/mpi/nbody/common
HYDROINC2 = -I${HACCDIR}/nbody/common
HYDROINC3 = ${HACCDIR}/aurora.kokkos_sycl_thirdparty/mpi/cosmotools/algorithms/halofinder
BLOSCDIR = -I${GIODIR}/genericio/thirdparty/blosc


INCDIRS = ${GIOINCDIR} ${HPXINCDIR} ${HPXCINCDIR} ${BLOSCDIR} ${HACCINCDIR} ${HACCINCDIR2} ${HYDROINC2} -I${HYDROINC3} -I./inc/
LIBDIRS = -L${HPXLIBDIR} -L${GIOLIBDIR} -L${CFTLIBDIR}

go_compile: ${SCDIR}/gravonly.cxx
${CXX} -g -O3 -qopenmp -c ${INCDIRS} ${SCDIR}/gravonly.cxx ${SCDIR}/utils_gravonly.cxx ${SCDIR}/pix_funcs_gravonly.cxx ${SCDIR}/PLParticles.cxx -std=c++17 ${HACC_MPI_CXXFLAGS}

go_link: ${SCDIR}/gravonly.cxx
${CXX} -g -O3 -qopenmp -o dens gravonly.o utils_gravonly.o pix_funcs_gravonly.o PLParticles.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lhealpix_cxx -std=c++17 ${HACCLIB}


main_compile: ${SCDIR}/main.cxx
${CXX} -g -O3 -qopenmp -c ${INCDIRS} ${SCDIR}/main.cxx ${SCDIR}/utils_dm.cxx ${SCDIR}/pix_funcs_dm.cxx ${SCDIR}/PLParticles.cxx -std=c++17 ${HACC_MPI_CXXFLAGS}

main_link: ${SCDIR}/main.cxx
${CXX} -g -O3 -qopenmp -o dens main.o utils_dm.o pix_funcs_dm.o PLParticles.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lhealpix_cxx -std=c++17 ${HACCLIB}


hydro_compile: ${SCDIR}/hydro.cxx
${CXX} -g -O3 -qopenmp -c ${INCDIRS} ${SCDIR}/hydro.cxx ${SCDIR}/utils.cxx ${SCDIR}/pix_funcs.cxx ${SCDIR}/PLParticles.cxx ${SCDIR}/PLHalos.cxx -std=c++17

hydro_link: ${SCDIR}/hydro.cxx
${CXX} -g -O3 -qopenmp -o hydro_xray hydro.o utils.o pix_funcs.o PLParticles.o PLHalos.o ${HYDROINC3}/RadiativeCooling.o ${HYDROINC}/Domain.o ${GIODIR}/cosmotools/algorithms/halofinder/Partition.o ${GIODIR}/cosmotools/algorithms/halofinder/dims.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lhealpix_cxx -std=c++17


55 changes: 55 additions & 0 deletions density_maps/Makefile_frontier
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
CC = ${HACC_MPI_CC}
CXX = ${HACC_MPI_CXX}

ENVLOC = frontier.kokkos_hip

HPXDIR = /ccs/home/prlarsen/codes/Healpix_3.82
CFITSDIR = /ccs/home/prlarsen/codes/cfitsio-4.4.0/build
GIODIR = /ccs/home/prlarsen/codes/HACC/frontier.kokkos_hip/mpi
HACCDIR = /ccs/home/prlarsen/codes/HACC

SCDIR = src

HACCLIB = -lm -fopenmp

HPXCINCDIR = -I${HPXDIR}/include
HPXINCDIR = -I${HPXDIR}/include/healpix_cxx
HPXLIBDIR = ${HPXDIR}/lib
CFTLIBDIR = ${CFITSDIR}/lib

GIOINCDIR = -I${HACCDIR}/submodules/genericio
GIOLIBDIR = ${GIODIR}/lib
HACCINCDIR = -I${HACCDIR}/cosmotools/algorithms/halofinder
HACCINCDIR2 = -I${HACCDIR}/cosmotools/common
HYDROINC = ${HACCDIR}/${ENVLOC}/mpi/nbody/common
HYDROINC2 = -I${HACCDIR}/nbody/common
HYDROINC3 = ${HACCDIR}/${ENVLOC}/mpi/cosmotools/algorithms/halofinder
BLOSCDIR = -I${GIODIR}/genericio/thirdparty/blosc


INCDIRS = ${GIOINCDIR} ${HPXINCDIR} ${HPXCINCDIR} ${BLOSCDIR} ${HACCINCDIR} ${HACCINCDIR2} ${HYDROINC2} -I${HYDROINC3} -I./inc/
LIBDIRS = -L${HPXLIBDIR} -L${GIOLIBDIR} -L${CFTLIBDIR}


go_compile: ${SCDIR}/gravonly.cxx
${CXX} -g -O3 -fopenmp -c ${INCDIRS} ${SCDIR}/gravonly.cxx ${SCDIR}/utils_gravonly.cxx ${SCDIR}/pix_funcs_gravonly.cxx ${SCDIR}/PLParticles.cxx -std=c++17 ${HACC_MPI_CXXFLAGS}

go_link: ${SCDIR}/gravonly.cxx
${CXX} -g -O3 -fopenmp -o dens gravonly.o utils_gravonly.o pix_funcs_gravonly.o PLParticles.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lhealpix_cxx -std=c++17 ${HACCLIB}



main_compile: main.cxx
${CXX} -c -fopenmp ${INCDIRS} ${SCDIR}/main.cxx utils.cxx pix_funcs.cxx PLParticles.cxx -std=c++11

main_link: main.cxx
${CXX} -O3 -fopenmp -o dens main.o utils.o pix_funcs.o PLParticles.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lchealpix -lhealpix_cxx -std=c++11


hydro_compile: ${SCDIR}/hydro.cxx
${CXX} -c -fopenmp ${INCDIRS} ${SCDIR}/hydro.cxx ${SCDIR}/utils.cxx ${SCDIR}/pix_funcs.cxx ${SCDIR}/PLParticles.cxx ${SCDIR}/PLHalos.cxx -std=c++17

hydro_link: ${SCDIR}/hydro.cxx
${CXX} -O3 -fopenmp -o hydro_xray hydro.o utils.o pix_funcs.o PLParticles.o PLHalos.o ${HYDROINC3}/RadiativeCooling.o ${HYDROINC}/Domain.o ${GIODIR}/cosmotools/algorithms/halofinder/Partition.o ${GIODIR}/cosmotools/algorithms/halofinder/dims.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lchealpix -lhealpix_cxx -std=c++17


52 changes: 52 additions & 0 deletions density_maps/Makefile_perlmutter
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
CC = ${HACC_MPI_CC}
CXX = ${HACC_MPI_CXX}

#HPXDIR = /home/prlarsen/codes/healpix/Healpix_3.82_polaris
HPXDIR = /global/homes/p/plarsen/plarsen_git/Healpix_3.82
#CFITSDIR = /home/prlarsen/usr/cfitsio-4.0.0/build
CFITSDIR = /global/homes/p/plarsen/plarsen_git/cfitsio-4.4.0/build

GIODIR = /global/homes/p/plarsen/plarsen_git/HACC/perlmutter.kokkos_cuda/mpi
HACCDIR = /global/homes/p/plarsen/plarsen_git/HACC

SCDIR = src

#HPXDIR = /lustre/orion/hep114/scratch/prlarsen/Healpix_3.82
#CFITSDIR = /lustre/orion/hep114/scratch/prlarsen/cfitsio-4.2.0/build
#GIODIR = /lustre/orion/hep114/scratch/prlarsen/HACC/frontier.cpu/mpi
#HACCDIR = /lustre/orion/hep114/scratch/prlarsen/HACC

HPXCINCDIR = -I${HPXDIR}/include
HPXINCDIR = -I${HPXDIR}/include/healpix_cxx
HPXLIBDIR = ${HPXDIR}/lib
CFTLIBDIR = ${CFITSDIR}/lib

GIOINCDIR = -I${HACCDIR}/submodules/genericio
GIOLIBDIR = ${GIODIR}/lib
HACCINCDIR = -I${HACCDIR}/cosmotools/algorithms/halofinder
HACCINCDIR2 = -I${HACCDIR}/cosmotools/common
HYDROINC = ${HACCDIR}/perlmutter.kokkos_cuda/mpi/nbody/common
HYDROINC2 = -I${HACCDIR}/nbody/common
HYDROINC3 = ${HACCDIR}/perlmutter.kokkos_cuda/mpi/cosmotools/algorithms/halofinder
BLOSCDIR = -I${GIODIR}/genericio/thirdparty/blosc


INCDIRS = ${GIOINCDIR} ${HPXINCDIR} ${HPXCINCDIR} ${BLOSCDIR} ${HACCINCDIR} ${HACCINCDIR2} ${HYDROINC2} -I${HYDROINC3} -I./inc/
LIBDIRS = -L${HPXLIBDIR} -L${GIOLIBDIR} -L${CFTLIBDIR}



main_compile: main.cxx
${CXX} -c -fopenmp ${INCDIRS} ${SCDIR}/main.cxx utils.cxx pix_funcs.cxx PLParticles.cxx -std=c++11

main_link: main.cxx
${CXX} -O3 -fopenmp -o dens main.o utils.o pix_funcs.o PLParticles.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lchealpix -lhealpix_cxx -std=c++11


hydro_compile: ${SCDIR}/hydro.cxx
${CXX} -c -fopenmp ${INCDIRS} ${SCDIR}/hydro.cxx ${SCDIR}/utils.cxx ${SCDIR}/pix_funcs.cxx ${SCDIR}/PLParticles.cxx ${SCDIR}/PLHalos.cxx -std=c++11

hydro_link: ${SCDIR}/hydro.cxx
${CXX} -O3 -fopenmp -o hydro_xray hydro.o utils.o pix_funcs.o PLParticles.o PLHalos.o ${HYDROINC3}/RadiativeCooling.o ${HYDROINC}/Domain.o ${GIODIR}/cosmotools/algorithms/halofinder/Partition.o ${GIODIR}/cosmotools/algorithms/halofinder/dims.o ${INCDIRS} -L${GIOLIBDIR} -lGenericIOMPI -L${CFTLIBDIR} -lcfitsio -L${HPXLIBDIR} -lchealpix -lhealpix_cxx -std=c++11


Binary file removed density_maps/adiabatic_bhp
Binary file not shown.
Binary file removed density_maps/hydro_p
Binary file not shown.
Binary file removed density_maps/hydro_xray
Binary file not shown.
6 changes: 4 additions & 2 deletions density_maps/inc/PLParticles.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
#include "BasicDefinition.h"


//#include "particle_def_hydro.h"
#include "particle_def_hydro.h"
//#include "particle_def.h"

//##_bhp.h

//#ifndef HYBRID
#include "particle_def.h"
//#include "particle_def.h"
//#else
//#include "particle_def_hydro.h"
//#endif
Expand Down Expand Up @@ -50,5 +51,6 @@ class PLParticles {
void Allocate(size_t n=0);
void Deallocate();
void Resize(size_t);
void Transform(const std::vector<int>&);
};

16 changes: 13 additions & 3 deletions density_maps/inc/pix_funcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
#include <unordered_map>
#include <string>
#include <vector>
#include "RadiativeCooling.h"

using namespace std;

//#define RAD_T float


void initialize_pixel(int pix_val, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, std::vector<float> &rho , std::vector<float> &phi , std::vector<float> &vel, int64_t &count, std::vector<int64_t> &start_idx, std::vector<int64_t> &end_idx, std::vector<int64_t> &pixnum_start, std::vector<int64_t> &pixnum_end, int rank_diff, unordered_map<int64_t, int64_t>* ring_to_idx);
void get_pix_list_rank(int octant, int rank, int numranks, int64_t npix_lores, std::vector<int> pix_list_oct, std::vector<int> pix_list_noct, std::vector<int> &lores_pix);

Expand All @@ -12,15 +17,20 @@ void get_pix_list_rank(int octant, int rank, int numranks, int64_t npix_lores, s
int compute_ranks_count( PLParticles* P, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, int numranks, vector<int> &send_count, int rank_diff);

void clear_pixel(int64_t start_idx, int rank_diff, vector<float> &rho , vector<float> &phi, vector<float> &vel);
void clear_pixel_hydro(int64_t start_idx, int rank_diff, vector<float> &rho , vector<float> &phi, vector<float> &vel, vector<float> &ksz, vector<double> &tsz, vector<double> &xray1, vector<double> &xray2);
void clear_pixel_hydro(int64_t start_idx, int rank_diff, vector<double> &rho , vector<double> &phi, vector<double> &vel, vector<double> &ksz, vector<double> &tsz, vector<double> &xray1, vector<double> &xray2, vector<double> &xray3, vector<double> &xray4, vector<double> &temp);

void compute_ranks_index( PLParticles* P, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, int numranks, vector<int> send_off, vector<int64_t> &id_particles, int rank_diff);

int assign_sz_ngp(vector<float> &rho, vector<float> &phi, vector<float> &vel,vector<float> &ksz, vector<float> &tsz, PLParticles* P, T_Healpix_Base<int64_t> map_hires, vector<int64_t> pixnum_start, vector<int64_t> pixnum_end, vector<int64_t> start_idx, unordered_map<int64_t, int64_t> ring_to_idx);

int assign_sz_xray_cic(vector<float> &rho, vector<float> &phi, vector<float> &vel,vector<float> &ksz, vector<double> &tsz, vector<double> &xray1, vector<double> &xray2, PLParticles* P, T_Healpix_Base<int64_t> map_hires, vector<int64_t> pixnum_start, vector<int64_t> pixnum_end, vector<int64_t> start_idx, unordered_map<int64_t, int64_t> ring_to_idx, float hval,bool borgcube, bool adiabatic, float samplerate, string cloudypath);
int assign_sz_xray_cic(vector<double> &rho, vector<double> &phi, vector<double> &vel,vector<double> &ksz, vector<double> &tsz, vector<double> &xray1, vector<double> &xray2, vector<double> &xray3, vector<double> &xray4, vector<double> &temp, PLParticles* P, T_Healpix_Base<int64_t> map_hires, vector<int64_t> pixnum_start, vector<int64_t> pixnum_end, vector<int64_t> start_idx, unordered_map<int64_t, int64_t> ring_to_idx, float hval,bool borgcube, bool adiabatic, float samplerate, string cloudypath);

int check_xray_halo( PLParticles* P, float hval, bool borgcube, bool adiabatic, float samplerate, string cloudypath);


void initialize_pixel_hydro(int pix_val, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, vector<float> &rho , vector<float> &phi, vector<float> &vel, vector<float> &ksz, vector<double> &tsz, vector<double> &xray1, vector<double> &xray2, int64_t &count, vector<int64_t> &start_idx, vector<int64_t> &end_idx, vector<int64_t> &pixnum_start, vector<int64_t> &pixnum_end, int rank_diff, unordered_map<int64_t, int64_t>* ring_to_idx);
void initialize_pixel_hydro(int pix_val, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, vector<double> &rho , vector<double> &phi, vector<double> &vel, vector<double> &ksz, vector<double> &tsz, vector<double> &xray1, vector<double> &xray2, vector<double> &xray3, vector<double> &xray4, vector<double> &temp, int64_t &count, vector<int64_t> &start_idx, vector<int64_t> &end_idx, vector<int64_t> &pixnum_start, vector<int64_t> &pixnum_end, int rank_diff, unordered_map<int64_t, int64_t>* ring_to_idx);





9 changes: 7 additions & 2 deletions density_maps/inc/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
#include <vector>
using namespace std;

void read_and_redistribute(string file_name, int numranks, PLParticles* P, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, int rank_diff);
//void read_and_redistribute(string file_name, int numranks, PLParticles* P, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, int rank_diff);
void read_and_redistribute(string file_name, string file_name_next, int numranks, PLParticles* P, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, int rank_diff, bool output_downsampled = false, float downsampling_rate = 1.0, string file_name_output = "");

//void read_and_redistribute(string file_name, int numranks, PLParticles* P, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, int rank_diff, bool output_downsampled, float downsampling_rate, string file_name_output);


void write_files(string outfile, string stepnumber,vector<int64_t> start_idx, vector<int64_t> end_idx, vector<int64_t> pix_nums_start, vector<float> rho, vector<float> phi, vector<float> vel, int64_t npix_hires);

//void read_and_redistribute_halocut(string file_name, string file_name2, int numranks, PLParticles* P, PLHalos* H, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, int rank_diff);


void write_files_hydro(string outfile, string stepnumber,vector<int64_t> start_idx, vector<int64_t> end_idx, vector<int64_t> pix_nums_start, vector<float> rho, vector<float> phi, vector<float> vel, vector<float> ksz, vector<double> tsz, vector<double> xray1, vector<double> xray2, int64_t npix_hires);
void write_files_hydro(string outfile, string stepnumber,vector<int64_t> start_idx, vector<int64_t> end_idx, vector<int64_t> pix_nums_start, vector<double> rho, vector<double> phi, vector<double> vel, vector<double> ksz, vector<double> tsz, vector<double> xray1, vector<double> xray2, vector<double> xray3, vector<double> xray4, vector<double> temp, int64_t npix_hires);
4 changes: 3 additions & 1 deletion density_maps/inc/utils_gravonly.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#include <vector>
using namespace std;

void read_and_redistribute(string file_name, int numranks, PLParticles* P, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, int rank_diff);
void read_and_redistribute(string file_name, string file_name_next, int numranks, PLParticles* P, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, int rank_diff, bool output_downsampled = false, float downsampling_rate = 1.0, string file_name_output = "");

//void read_and_redistribute(string file_name, int numranks, PLParticles* P, T_Healpix_Base<int> map_lores, T_Healpix_Base<int64_t> map_hires, int rank_diff);

void write_files(string outfile, string stepnumber,vector<int64_t> start_idx, vector<int64_t> end_idx, vector<int64_t> pix_nums_start, vector<double> rho, vector<double> phi, vector<double> vel, int64_t npix_hires);

Expand Down
13 changes: 13 additions & 0 deletions density_maps/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
#SBATCH -A HEP142
#SBATCH -J calib_run
#SBATCH -o %x-%j.out
#SBATCH -t 02:00:00
#SBATCH -p batch
##SBATCH -q debug
#SBATCH -N 8

source bashrc.frontier.kokkos_hip
export OMP_NUM_THREADS=7

srun -N8 -n64 -c7 --gpus-per-node=8 --gpu-bind=closest ./hacc_tpm params/indat.params -n
Loading

0 comments on commit 9fd198f

Please sign in to comment.