mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-22 10:38:03 +00:00
Fix overload I/O system
This commit is contained in:
parent
b49cc9ebee
commit
0984191dc8
2 changed files with 17 additions and 9 deletions
|
@ -85,16 +85,11 @@ if __name__ == "__main__":
|
||||||
if args.snapshot_kind != "ramses":
|
if args.snapshot_kind != "ramses":
|
||||||
raise NotImplementedError("Only RAMSES snapshots are supported.")
|
raise NotImplementedError("Only RAMSES snapshots are supported.")
|
||||||
|
|
||||||
particles_path = join(args.scratch_space,
|
|
||||||
f"ramses_{str(args.nsim).zfill(5)}.hdf5")
|
|
||||||
output_path = join(args.output_folder,
|
|
||||||
f"sph_ramses_{str(args.nsim).zfill(5)}.hdf5")
|
|
||||||
|
|
||||||
print("---------- SPH Density & Velocity Field Job Information ----------")
|
print("---------- SPH Density & Velocity Field Job Information ----------")
|
||||||
print(f"Mode: {args.mode}")
|
print(f"Mode: {args.mode}")
|
||||||
print(f"Simulation index: {args.nsim}")
|
print(f"Simulation index: {args.nsim}")
|
||||||
print(f"Paticles path: {particles_path}")
|
print(f"Scratch space: {args.scratch_space}")
|
||||||
print(f"Output path: {output_path}")
|
print(f"Output folder: {args.output_folder}")
|
||||||
print(f"Resolution: {args.resolution}")
|
print(f"Resolution: {args.resolution}")
|
||||||
print(f"SPH executable: {args.SPH_executable}")
|
print(f"SPH executable: {args.SPH_executable}")
|
||||||
print(f"Snapshot kind: {args.snapshot_kind}")
|
print(f"Snapshot kind: {args.snapshot_kind}")
|
||||||
|
@ -102,8 +97,20 @@ if __name__ == "__main__":
|
||||||
print(flush=True)
|
print(flush=True)
|
||||||
|
|
||||||
if args.mode == "prepare":
|
if args.mode == "prepare":
|
||||||
|
if args.nsim == -1:
|
||||||
|
nsims = [7444 + n * 24 for n in range(101)]
|
||||||
|
for nsim in nsims:
|
||||||
|
print(f"Processing simulation {nsim}.")
|
||||||
|
particles_path = join(args.scratch_space,
|
||||||
|
f"ramses_{str(nsim).zfill(5)}.hdf5")
|
||||||
|
prepare_csiborg1(nsim, particles_path)
|
||||||
|
else:
|
||||||
|
particles_path = join(args.scratch_space,
|
||||||
|
f"ramses_{str(args.nsim).zfill(5)}.hdf5")
|
||||||
prepare_csiborg1(args.nsim, particles_path)
|
prepare_csiborg1(args.nsim, particles_path)
|
||||||
elif args.mode == "run":
|
elif args.mode == "run":
|
||||||
|
particles_path = join(args.scratch_space,
|
||||||
|
f"ramses_{str(args.nsim).zfill(5)}.hdf5")
|
||||||
output_path = join(args.output_folder,
|
output_path = join(args.output_folder,
|
||||||
f"sph_ramses_{str(args.nsim).zfill(5)}.hdf5")
|
f"sph_ramses_{str(args.nsim).zfill(5)}.hdf5")
|
||||||
boxsize = 677.7
|
boxsize = 677.7
|
||||||
|
|
|
@ -8,7 +8,8 @@ file="field_sph_ramses.py"
|
||||||
|
|
||||||
|
|
||||||
# nsims=(7444)
|
# nsims=(7444)
|
||||||
nsims=(7444 7468 7492 7516 7540 7564 7588 7612 7636 7660 7684 7708 7732 7756 7780 7804 7828 7852 7876 7900 7924 7948 7972 7996 8020 8044 8068 8092 8116 8140 8164 8188 8212 8236 8260 8284 8308 8332 8356 8380 8404 8428 8452 8476 8500 8524 8548 8572 8596 8620 8644 8668 8692 8716 8740 8764 8788 8812 8836 8860 8884 8908 8932 8956 8980 9004 9028 9052 9076 9100 9124 9148 9172 9196 9220 9244 9268 9292 9316 9340 9364 9388 9412 9436 9460 9484 9508 9532 9556 9580 9604 9628 9652 9676 9700 9724 9748 9772 9796 9820 9844)
|
# nsims=(7444 7468 7492 7516 7540 7564 7588 7612 7636 7660 7684 7708 7732 7756 7780 7804 7828 7852 7876 7900 7924 7948 7972 7996 8020 8044 8068 8092 8116 8140 8164 8188 8212 8236 8260 8284 8308 8332 8356 8380 8404 8428 8452 8476 8500 8524 8548 8572 8596 8620 8644 8668 8692 8716 8740 8764 8788 8812 8836 8860 8884 8908 8932 8956 8980 9004 9028 9052 9076 9100 9124 9148 9172 9196 9220 9244 9268 9292 9316 9340 9364 9388 9412 9436 9460 9484 9508 9532 9556 9580 9604 9628 9652 9676 9700 9724 9748 9772 9796 9820 9844)
|
||||||
|
nsims=(-1)
|
||||||
mode="prepare"
|
mode="prepare"
|
||||||
output_folder="/mnt/extraspace/rstiskalek/dump/"
|
output_folder="/mnt/extraspace/rstiskalek/dump/"
|
||||||
resolution=1024
|
resolution=1024
|
||||||
|
|
Loading…
Reference in a new issue