-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from patricialarsen/add_xrays
Add xrays and updated grav-only maps
- Loading branch information
Showing
209 changed files
with
11,966 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
check_halo_direct/obj/* | ||
check_halo_direct/params_*.txt | ||
check_halo_direct/run_test | ||
|
||
# log files | ||
density_maps/*.error | ||
density_maps/*.cobaltlog | ||
density_maps/*.output | ||
denstiy_maps/logs/* | ||
|
||
pixelize_halo_lightcones/LJ/*.error | ||
pixelize_halo_lightcones/LJ/*.cobaltlog | ||
pixelize_halo_lightcones/LJ/*.output | ||
pixelize_halo_lightcones/LJ/pixelize_LJ | ||
|
||
cic2gio/logs/*.error | ||
cic2gio/logs/*.cobaltlog | ||
cic2gio/logs/*.output | ||
cic2gio/cic_gio | ||
cic2gio/memtest | ||
|
||
# executables | ||
density_maps/dens | ||
density_maps/hydro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
NODES=`cat $COBALT_NODEFILE | wc -l` | ||
PROCS=6 | ||
|
||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/prlarsen/usr/cfitsio-4.0.0/build/lib/ | ||
#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/prlarsen/usr/Healpix_3.82/lib | ||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/prlarsen/codes/healpix/Healpix_3.82/lib | ||
OMP_NUM_THREADS=1 | ||
export OMP_NUM_THREADS | ||
|
||
export LD_LIBRARY_PATH | ||
|
||
|
||
mpirun -f $COBALT_NODEFILE -n $PROCS ./memtest /lus/eagle/projects/CosDiscover/nfrontiere/576MPC_RUNS/challenge_problem_576MPC_ADIABATIC/output/m000p.lc.mpicosmo. /eagle/LastJourney/prlarsen/LC_hydro/2023/ksz_310_400.fits /eagle/LastJourney/prlarsen/LC_hydro/2023/tsz_310_400.fits 0.01 2 600 2048 | ||
|
||
#8192 | ||
|
||
#correct_massfunc.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Use this file to access and allocate SZ-related data. | ||
*/ | ||
|
||
#include <string> | ||
#include <vector> | ||
#include <map> | ||
#include "AllocatedVector.h" | ||
#include "GenericIO.h" | ||
|
||
using namespace std; | ||
|
||
struct sz_props{ | ||
int64_t pix_num; | ||
double tsz; | ||
double ksz; | ||
int rank; | ||
}; | ||
|
||
class SZ_class { | ||
|
||
public: | ||
|
||
bool is_allocated; | ||
int step_number; | ||
size_t num_parts; | ||
MPI_Datatype sz_properties_MPI_Type; | ||
|
||
vector<int64_t>* pix_num; | ||
vector<double>* tsz; | ||
vector<double>* ksz; | ||
// destination rank for redistribution | ||
vector<int>* rank; | ||
|
||
SZ_class() : num_parts(0), is_allocated(false),\ | ||
step_number(-1); | ||
~SZ_class() { }; | ||
|
||
void Allocate(size_t n=0); | ||
void Deallocate(); | ||
sz_props GetProperties(size_t idx); | ||
void Resize(size_t); | ||
void Set_MPIType(); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#include <iostream> | ||
#include "PartitionPlus.h" | ||
#include "SZ_class.h" | ||
|
||
using namespace std; | ||
using namespace gio; | ||
|
||
// Allocate actually allocates memory with optional vector size | ||
void SZ_class::Allocate(size_t n) { | ||
if (!this->is_allocated) { | ||
this->is_allocated = true; | ||
this->num_parts = n; | ||
|
||
this->pix_num = new vector<int64_t>(this->num_parts); | ||
this->rank = new vector<int>(this->num_parts); | ||
this->tsz = new vector<double>(this->num_parts); | ||
this->ksz = new vector<double>(this->num_parts); | ||
} | ||
else { | ||
cerr << "ERROR: Can't allocate new vectors --\ | ||
vectors are already allocated." << endl; | ||
;// do some graceful exit of the program | ||
} | ||
} | ||
|
||
void SZ_class::Set_MPIType(){ | ||
MPI_Datatype type[4] = { MPI_INT64_T, MPI_DOUBLE, MPI_DOUBLE, MPI_INT }; | ||
int blocklen[4] = {1,1,1,1}; | ||
|
||
sz_props sz; | ||
|
||
MPI_Aint base; | ||
MPI_Aint disp[4]; | ||
|
||
MPI_Get_address(&sz, &base); | ||
MPI_Get_address(&sz.pix_num, &disp[0]); | ||
MPI_Get_address(&sz.tsz, &disp[1]); | ||
MPI_Get_address(&sz.ksz, &disp[2]); | ||
MPI_Get_address(&sz.rank, &disp[3]); | ||
|
||
disp[0]-=base; disp[1]-=base; disp[2]-=base; disp[3]-=base; | ||
|
||
MPI_Type_struct(4,blocklen,disp,type,&this->sz_properties_MPI_Type); | ||
MPI_Type_commit(&this->sz_properties_MPI_Type); | ||
|
||
} | ||
|
||
void SZ_class::Deallocate() { | ||
|
||
if (this->is_allocated) { | ||
|
||
this->num_parts = 0; | ||
|
||
delete this-> pix_num; | ||
delete this-> rank; | ||
delete this-> tsz; | ||
delete this-> ksz; | ||
|
||
this->is_allocated=false; | ||
} | ||
else { | ||
cerr << "ERROR: Can't deallocate -- vectors are not allocated."\ | ||
<< endl; | ||
;// do some graceful exit of the program | ||
} | ||
} | ||
|
||
sz_props SZ_class::GetProperties(size_t idx) { | ||
if (this->is_allocated) { | ||
sz_props sz_properties; | ||
|
||
sz_properties.rank = this->rank->at(idx); | ||
sz_properties.pix_num = this->pix_num->at(idx); | ||
sz_properties.tsz = this->tsz->at(idx); | ||
sz_properties.ksz = this->ksz->at(idx); | ||
|
||
return sz_properties; | ||
} | ||
else { | ||
cerr << "ERROR: Can't get properties -- vectors are not allocated."\ | ||
<< endl; | ||
;// do some graceful exit of the program | ||
} | ||
} | ||
|
||
|
||
// use Resize(0) as a substitute for std::vector clear() | ||
void SZ_class::Resize(size_t n) { | ||
if (this->is_allocated) { | ||
this->num_parts = n; | ||
this->pix_num->resize(this->num_parts); | ||
this->rank->resize(this->num_parts); | ||
this->tsz->resize(this->num_parts); | ||
this->ksz->resize(this->num_parts); | ||
} | ||
else { | ||
cerr << "ERROR: Can't resize -- vectors are not allocated." << endl; | ||
;// do some graceful exit of the program | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.