Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
371 commits
Select commit Hold shift + click to select a range
859ff83
fixes
zneedell Jun 19, 2024
85d8591
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 19, 2024
0a9d23f
fixes
zneedell Jun 19, 2024
809e6ba
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 19, 2024
ac86cde
fixes
zneedell Jun 19, 2024
e251a42
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 19, 2024
1c40689
fixes
zneedell Jun 19, 2024
17b7daf
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 19, 2024
b036686
fixes
zneedell Jun 20, 2024
5e7c59f
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 20, 2024
ccdcfa0
fixes
zneedell Jun 20, 2024
d54638f
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 20, 2024
8a6fd0e
fixes
zneedell Jun 20, 2024
47af510
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 20, 2024
b72984c
fixes
zneedell Jun 20, 2024
7c038fa
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 20, 2024
5a72751
fixes
zneedell Jun 20, 2024
614e882
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 20, 2024
1b38523
fixes
zneedell Jun 20, 2024
503480c
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 20, 2024
69fa231
fixes
zneedell Jun 20, 2024
b224a27
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 20, 2024
ec2cf93
fixes
zneedell Jun 20, 2024
7d94060
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 20, 2024
1012e88
fixes
zneedell Jun 20, 2024
c8b39cc
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 20, 2024
ae79b45
fixes
zneedell Jun 20, 2024
b0f6e16
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 20, 2024
456d487
fixes
zneedell Jun 21, 2024
2d0b734
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 21, 2024
dafca08
fixes
zneedell Jun 24, 2024
79d8ef2
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 24, 2024
a7b3a44
fixes
zneedell Jun 24, 2024
2d8c2c2
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 24, 2024
c3b690b
ugggghhhh!
zneedell Jun 24, 2024
394c673
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 24, 2024
aae76b3
~ fixes
zneedell Jun 24, 2024
57e2563
~ fixes
zneedell Jun 25, 2024
6c1805a
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 25, 2024
5c3eed6
float to int
zneedell Jun 26, 2024
108be51
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 26, 2024
af5ccc0
float to int
zneedell Jun 27, 2024
35b5227
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 27, 2024
8852199
atlas input loc fix
zneedell Jun 27, 2024
ed21d5d
atlas input loc fix
zneedell Jun 27, 2024
141e28f
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 27, 2024
fc60085
atlas input loc fix
zneedell Jun 28, 2024
fb449cd
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Jun 28, 2024
1e6b304
updates
zneedell Jul 1, 2024
a72173f
fix for just asim/beam runs
zneedell Jul 9, 2024
c92553d
Merge remote-tracking branch 'lbl/copy-working-directory' into copy-w…
zneedell Jul 9, 2024
fb5fdf7
fix for just asim/beam runs
zneedell Jul 9, 2024
9bdccfa
fix for just asim/beam runs
zneedell Jul 9, 2024
5f808ea
fix for just asim/beam runs
zneedell Jul 9, 2024
3545aa7
pandas version fix
zneedell Jul 9, 2024
be4662c
pandas version fix
zneedell Jul 9, 2024
fefc324
pandas version fix (ugly)
zneedell Jul 9, 2024
dac4bc1
preprocessor ptype fix (ugh)
zneedell Jul 9, 2024
24b2dc0
beam postprocessor bug fix
zneedell Jul 11, 2024
05d8f7e
Update lawrencium-setup.md
zneedell Jul 22, 2024
2534db6
pick up in the middle of replanning
zneedell Jul 23, 2024
0e7c0dd
Merge remote-tracking branch 'lbl/copy-working-directory' into copy-w…
zneedell Jul 23, 2024
5028631
bug
zneedell Jul 23, 2024
b3b6086
bug
zneedell Jul 23, 2024
2bfcc26
bug
zneedell Jul 30, 2024
78a767c
Update lawrencium-setup.md
zneedell Feb 18, 2025
5800483
Update lawrencium-setup.md
zneedell Feb 18, 2025
b155f78
Update lawrencium-setup.md
zneedell Feb 18, 2025
63fd515
creating scenario folder
haitamlaarabi Feb 19, 2025
1f71a91
moving settings to scenarios folder
haitamlaarabi Feb 19, 2025
1572d08
new pilates setting
haitamlaarabi Feb 21, 2025
1e2017a
update python version
haitamlaarabi Feb 21, 2025
c1d24ad
updated python and beam versions
zneedell Feb 21, 2025
0865b34
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Feb 21, 2025
f2b33bb
merge zach changes
haitamlaarabi Feb 21, 2025
11b6948
update router
haitamlaarabi Feb 21, 2025
114ec95
update
haitamlaarabi Feb 21, 2025
5ae6ca5
add pip uninstall geopandas
haitamlaarabi Feb 21, 2025
1656ded
test 1
haitamlaarabi Feb 21, 2025
426a502
test2
haitamlaarabi Feb 21, 2025
b7af0e3
test3
haitamlaarabi Feb 21, 2025
ea00423
test4
haitamlaarabi Feb 21, 2025
d525f52
test5
haitamlaarabi Feb 21, 2025
c343fce
test6
haitamlaarabi Feb 21, 2025
237e458
test7
haitamlaarabi Feb 21, 2025
1dbc74f
test8
haitamlaarabi Feb 22, 2025
3a679dd
test9
haitamlaarabi Feb 22, 2025
43c4d1a
test10
haitamlaarabi Feb 22, 2025
f9cbd9a
test11
haitamlaarabi Feb 22, 2025
fd53e61
test12
haitamlaarabi Feb 22, 2025
a17b913
test13
haitamlaarabi Feb 22, 2025
8398bd8
test14
haitamlaarabi Feb 22, 2025
11250eb
adding comment
haitamlaarabi Feb 22, 2025
39533dc
adding error check
haitamlaarabi Feb 22, 2025
7a67bef
test15
haitamlaarabi Feb 22, 2025
a6f1172
test16
haitamlaarabi Feb 22, 2025
bb59cda
wip: making fixes
haitamlaarabi Feb 26, 2025
7ac042e
wip: making fixes 2
haitamlaarabi Feb 26, 2025
032590c
set PROJ_
haitamlaarabi Feb 26, 2025
cd19283
update
haitamlaarabi Feb 26, 2025
c8bda2d
testing path
haitamlaarabi Feb 26, 2025
636179a
trying to fix proj warning and docker
haitamlaarabi Feb 26, 2025
5dd14db
adding sortedcontainers
haitamlaarabi Feb 26, 2025
374c667
deactivating polaris code
haitamlaarabi Feb 26, 2025
61aeb39
remove log from run.py
haitamlaarabi Feb 27, 2025
0ade2ed
clean job.sh
haitamlaarabi Feb 27, 2025
70d2df7
removing path related logs
haitamlaarabi Feb 27, 2025
8112454
update config
haitamlaarabi Feb 27, 2025
693be42
fix output run name
haitamlaarabi Feb 27, 2025
6fcf84d
fix it again
haitamlaarabi Feb 27, 2025
29a1691
adding scenarios/freight/sfbay-pilates-freight--20241106--2018-Baseli…
haitamlaarabi Feb 28, 2025
ee4ec40
fix skim error due to asim not active
haitamlaarabi Feb 28, 2025
a38c253
avoid stopping simulation when skim not found
haitamlaarabi Feb 28, 2025
42c1504
fix return
haitamlaarabi Mar 1, 2025
8eb0fb3
updating workflow
haitamlaarabi Mar 1, 2025
ff1b1f3
updating workflow again
haitamlaarabi Mar 1, 2025
63cda44
fixing workflow when asim is not activated
haitamlaarabi Mar 1, 2025
819e914
fixing name for freight baseline
haitamlaarabi Mar 3, 2025
9cc393a
adding new settings to test
haitamlaarabi Mar 11, 2025
a406bf5
testing 450g memory
haitamlaarabi Mar 11, 2025
a624257
updating name
haitamlaarabi Mar 11, 2025
867f946
one iteration instead of 5
haitamlaarabi Mar 11, 2025
15a47d9
end_year=2018
haitamlaarabi Mar 11, 2025
648a501
end_year=2018 for all
haitamlaarabi Mar 11, 2025
c9c2284
update output run name
haitamlaarabi Mar 12, 2025
aaeff20
update beam_config
haitamlaarabi Mar 12, 2025
736071e
update
haitamlaarabi Mar 16, 2025
5851bde
updating lrc settings
haitamlaarabi Mar 16, 2025
297eb63
fix lrc params
haitamlaarabi Mar 16, 2025
7250cba
updat lrc setting
haitamlaarabi Mar 16, 2025
27607a6
update job runner
zneedell Mar 18, 2025
bd10339
allow for config subfolder
zneedell Mar 18, 2025
73c6737
Merge remote-tracking branch 'origin/copy-working-directory' into cop…
zneedell Mar 18, 2025
61f7ed8
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Mar 18, 2025
c506b70
indexing fix
zneedell Mar 19, 2025
c9b1544
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Mar 19, 2025
2afa850
indexing fix
zneedell Mar 19, 2025
27a6aea
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Mar 19, 2025
ea940fa
parquet fix
zneedell Mar 19, 2025
15b1c77
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Mar 19, 2025
2178a0a
bugfix
zneedell Mar 19, 2025
de40f50
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Mar 19, 2025
7e903a9
adding pilates config for psimpl
haitamlaarabi Mar 20, 2025
7d3bd4a
adding a config testing zn docker
haitamlaarabi Mar 20, 2025
6442bcf
configs
zneedell Mar 20, 2025
ca0799b
fixes for new asim
zneedell Mar 20, 2025
16734ad
fixes for new asim
zneedell Mar 20, 2025
d5a7b1b
parquet
zneedell Mar 20, 2025
a565180
dict bug
zneedell Mar 20, 2025
78b5210
singularity command fix
zneedell Mar 21, 2025
6c8fd3e
singularity command fix
zneedell Mar 21, 2025
4958b9c
singularity command fix
zneedell Mar 21, 2025
720d2ff
only run small sample for compilation
zneedell Mar 21, 2025
2d5d55f
don't multiprocess for compilation
zneedell Mar 21, 2025
c135c4a
oops
zneedell Mar 21, 2025
1fe6c9d
changing name
haitamlaarabi Mar 21, 2025
d781eb8
testing new network with zn branch
haitamlaarabi Mar 21, 2025
6b31f84
oops
zneedell Mar 21, 2025
b19d1f4
fix order of asim config directories
zneedell Mar 21, 2025
2dc10e0
option for extended configs
zneedell Mar 21, 2025
e0d0997
option for extended configs
zneedell Mar 21, 2025
a5563a0
more parquet support
zneedell Mar 21, 2025
d85621e
more parquet support
zneedell Mar 21, 2025
98d6434
update config
zneedell Mar 25, 2025
2f2b2d1
new seattle config
zneedell Mar 25, 2025
1e14b78
fix for new seattle data
zneedell Mar 25, 2025
7cae226
fix for new seattle data
zneedell Mar 25, 2025
d1cc3b5
catch failed compilation
zneedell Mar 25, 2025
e2bba8d
catch failed compilation
zneedell Mar 26, 2025
6bc891d
tweaks
zneedell Mar 26, 2025
8c00cb1
write asim compilation
zneedell Mar 26, 2025
759cf23
change file headers
zneedell Mar 26, 2025
591ea94
merge
zneedell Mar 26, 2025
5622a21
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Mar 26, 2025
8e05c10
make hh id an int
zneedell Mar 27, 2025
25cfd85
Merge branch 'copy-working-directory' of https://github.com/LBNL-UCB-…
zneedell Mar 27, 2025
e07c94a
conf updates
zneedell Mar 28, 2025
43cfa30
continue with zarr processing, fix some bugs
zneedell Mar 31, 2025
2c62a26
Merge remote-tracking branch 'origin/copy-working-directory' into cop…
zneedell Mar 31, 2025
df0b038
finish zarr postprocessing
zneedell Apr 3, 2025
3e869a2
correct cache loc
zneedell Apr 4, 2025
bc44b4f
handle "None" iteration
zneedell Apr 4, 2025
ecda389
make sure file format is defined
zneedell Apr 4, 2025
f98475f
Merge branch 'copy-working-directory' into hl/copy-working-directory
zneedell Apr 7, 2025
043702d
merge
zneedell Apr 7, 2025
3f53e77
Version upgrade
zneedell Apr 7, 2025
069cdc0
merge error
zneedell Apr 7, 2025
5452273
new seattle config
zneedell Apr 7, 2025
e4cae8e
updated parquet input
zneedell Apr 7, 2025
c137382
make more explicit inputs around copying asim plans to beam
zneedell Apr 7, 2025
bbe7d39
typo
zneedell Apr 7, 2025
3098478
Merge pull request #51 from LBNL-UCB-STI/hl/copy-working-directory
zneedell Apr 8, 2025
09058cd
don't do 100% replan every year
zneedell Apr 8, 2025
14f6e04
update docker
zneedell Apr 8, 2025
f37f543
update configs
zneedell Apr 8, 2025
c605a6d
catch failed trip_mode_choice utilities
zneedell Apr 8, 2025
34b92a0
old map
zneedell Apr 8, 2025
ae263e2
use max cpus and memory for lr7
zneedell Apr 9, 2025
3904ebd
use max cpus and memory for lr7
zneedell Apr 9, 2025
47eb758
increase memory allocation
zneedell Apr 9, 2025
ce7b7c3
null pilates run
zneedell Apr 9, 2025
432b17a
write zarr skims back to omx
zneedell Apr 14, 2025
7a549c4
updated settings
zneedell Apr 14, 2025
a691d5b
updated settings
zneedell Apr 14, 2025
2beb2fd
updated settings
zneedell Apr 14, 2025
592fca4
don't call omx origin skims twice
zneedell Apr 16, 2025
f31205a
exclude unused zarr skims
zneedell Apr 22, 2025
47a1e5e
fixes for OOM issues on slurm hopefully
zneedell May 5, 2025
9f4d83a
put memory logging on correct script
zneedell May 5, 2025
8b9ae58
Actually write the updated skims back to disk!!!!!
zneedell May 14, 2025
b1bd57b
saved the wrong skims!!!
zneedell May 15, 2025
aea7afa
skims are still not updating correctly
zneedell May 16, 2025
f40ace2
try using zarr format for trimming ods too
zneedell May 16, 2025
9ef83bf
more logging, use correct .zarr format
zneedell May 18, 2025
4af610a
also fix other zarr write
zneedell May 18, 2025
526313a
allow debugging zarr
zneedell May 18, 2025
0991338
fix random seed generation
zneedell May 18, 2025
6afa3a9
clip skims at zero
zneedell May 18, 2025
89f9bea
more updates to skim processing
zneedell May 19, 2025
e708fc5
handle TNC in zarr postprocessing
zneedell May 27, 2025
8eac562
new script to compare two omx skims
zneedell May 28, 2025
8de170d
fix zarr open
zneedell May 28, 2025
1e745bc
negative value check
zneedell May 28, 2025
a5c897a
pooling RH skims
zneedell May 28, 2025
6d91189
new copying script
zneedell May 28, 2025
0000e73
open zarr doesn't accept additional args
zneedell May 29, 2025
ba19843
fix scaling for transit fare
zneedell May 29, 2025
9d745d5
fix seattle zone geoms
zneedell May 29, 2025
3536cc2
fix seattle zone geoms
zneedell May 29, 2025
85b9c93
trim ODs even without replanning
zneedell May 29, 2025
89bd61b
add mapping to omx
zneedell May 29, 2025
c1b173d
copy files without extension too
zneedell May 29, 2025
e95ae8b
update settings
zneedell May 30, 2025
7c275cc
update null config
zneedell May 30, 2025
842889d
update base sfbay config
zneedell May 30, 2025
8c9fcb8
fix clipped_tazs path
zneedell May 30, 2025
ce9f27d
oops
zneedell May 30, 2025
2d5f6a9
correct zone_ids name
zneedell Jun 2, 2025
d15b3c7
add attrs?
zneedell Jun 2, 2025
0d038a2
fill na with 0
zneedell Jun 2, 2025
56ae2ff
nan_to_num
zneedell Jun 2, 2025
0feb6ff
nan_to_num
zneedell Jun 2, 2025
20afafc
update faster rail config
zneedell Jun 5, 2025
237cfe7
better handling of zone ID in beam shapefile
zneedell Jun 10, 2025
01d1daf
shorter name, more logging
zneedell Jun 10, 2025
ffb465c
naming fix
zneedell Jun 10, 2025
8026557
more fixes
zneedell Jun 10, 2025
b152f74
hacky fix
zneedell Jun 10, 2025
3298794
also write trip counts to zarr
zneedell Jun 10, 2025
72e68fe
Merge remote-tracking branch 'origin/main' into copy-working-directory
zneedell Jun 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
482 changes: 482 additions & 0 deletions compare_skims.py

Large diffs are not rendered by default.

310 changes: 310 additions & 0 deletions copy-seattle-skims.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
import openmatrix as omx
import os
import logging
import sys

logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
stream=sys.stdout # Log to console
)
logger = logging.getLogger(__name__)

# --- File Paths ---
file1_path = "pilates/beam/production/seattle/as-base-skims-seattle-bg.omx"
file2_path = "pilates/beam/production/seattle/as-base-skims-seattle-bg-new.omx"

# --- Skims to Copy ---
# This list is generated *strictly* based on the analysis of
# compare_skims.log, excluding those with _EXP_ or _HVY_
# as per the user's criteria for the target file.
skims_to_copy = [
"BIKE_TRIPS",
"DISTBIKE",
"DISTWALK",
"HOV2TOLL_BTOLL__AM",
"HOV2TOLL_BTOLL__EA",
"HOV2TOLL_BTOLL__EV",
"HOV2TOLL_BTOLL__MD",
"HOV2TOLL_BTOLL__PM",
"HOV2TOLL_DIST__AM",
"HOV2TOLL_DIST__EA",
"HOV2TOLL_DIST__EV",
"HOV2TOLL_DIST__MD",
"HOV2TOLL_DIST__PM",
"HOV2TOLL_TIME__AM",
"HOV2TOLL_TIME__EA",
"HOV2TOLL_TIME__EV",
"HOV2TOLL_TIME__MD",
"HOV2TOLL_TIME__PM",
"HOV2TOLL_VTOLL__AM",
"HOV2TOLL_VTOLL__EA",
"HOV2TOLL_VTOLL__EV",
"HOV2TOLL_VTOLL__MD",
"HOV2TOLL_VTOLL__PM",
"HOV2_BTOLL__AM",
"HOV2_BTOLL__EA",
"HOV2_BTOLL__EV",
"HOV2_BTOLL__MD",
"HOV2_BTOLL__PM",
"HOV2_DIST__AM",
"HOV2_DIST__EA",
"HOV2_DIST__EV",
"HOV2_DIST__MD",
"HOV2_DIST__PM",
"HOV2_TIME__AM",
"HOV2_TIME__EA",
"HOV2_TIME__EV",
"HOV2_TIME__MD",
"HOV2_TIME__PM",
"HOV2_VTOLL__AM",
"HOV2_VTOLL__EA",
"HOV2_VTOLL__EV",
"HOV2_VTOLL__MD",
"HOV2_VTOLL__PM",
"HOV3TOLL_BTOLL__AM",
"HOV3TOLL_BTOLL__EA",
"HOV3TOLL_BTOLL__EV",
"HOV3TOLL_BTOLL__MD",
"HOV3TOLL_BTOLL__PM",
"HOV3TOLL_DIST__AM",
"HOV3TOLL_DIST__EA",
"HOV3TOLL_DIST__EV",
"HOV3TOLL_DIST__MD",
"HOV3TOLL_DIST__PM",
"HOV3TOLL_VTOLL__AM",
"HOV3TOLL_VTOLL__EA",
"HOV3TOLL_VTOLL__EV",
"HOV3TOLL_VTOLL__MD",
"HOV3TOLL_VTOLL__PM",
"HOV3_TIME__AM",
"HOV3_TIME__EA",
"HOV3_TIME__EV",
"HOV3_TIME__MD",
"HOV3_TIME__PM",
"HOV3_VTOLL__AM",
"HOV3_VTOLL__EA",
"HOV3_VTOLL__EV",
"HOV3_VTOLL__MD",
"HOV3_VTOLL__PM",
"RH_POOLED_REJECTIONPROB__AM",
"RH_POOLED_REJECTIONPROB__EA",
"RH_POOLED_REJECTIONPROB__EV",
"RH_POOLED_REJECTIONPROB__MD",
"RH_POOLED_REJECTIONPROB__PM",
"RH_POOLED_TRIPS__AM",
"RH_POOLED_TRIPS__EA",
"RH_POOLED_TRIPS__EV",
"RH_POOLED_TRIPS__MD",
"RH_POOLED_TRIPS__PM",
"RH_POOLED_WAIT__AM",
"RH_POOLED_WAIT__EA",
"RH_POOLED_WAIT__EV",
"RH_POOLED_WAIT__MD",
"RH_POOLED_WAIT__PM",
"RH_SOLO_REJECTIONPROB__AM",
"RH_SOLO_REJECTIONPROB__EA",
"RH_SOLO_REJECTIONPROB__EV",
"RH_SOLO_REJECTIONPROB__MD",
"RH_SOLO_REJECTIONPROB__PM",
"RH_SOLO_TRIPS__AM",
"RH_SOLO_TRIPS__EA",
"RH_SOLO_TRIPS__EV",
"RH_SOLO_TRIPS__MD",
"RH_SOLO_TRIPS__PM",
"RH_SOLO_WAIT__AM",
"RH_SOLO_WAIT__EA",
"RH_SOLO_WAIT__EV",
"RH_SOLO_WAIT__MD",
"RH_SOLO_WAIT__PM",
"SOVTOLL_BTOLL__AM",
"SOVTOLL_BTOLL__EA",
"SOVTOLL_BTOLL__EV",
"SOVTOLL_BTOLL__MD",
"SOVTOLL_BTOLL__PM",
"SOVTOLL_DIST__AM",
"SOVTOLL_DIST__EA",
"SOVTOLL_DIST__EV",
"SOVTOLL_DIST__MD",
"SOVTOLL_DIST__PM",
"SOVTOLL_TIME__AM",
"SOVTOLL_TIME__EA",
"SOVTOLL_TIME__EV",
"SOVTOLL_TIME__MD",
"SOVTOLL_TIME__PM",
"SOVTOLL_VTOLL__AM",
"SOVTOLL_VTOLL__EA",
"SOVTOLL_VTOLL__EV",
"SOVTOLL_VTOLL__MD",
"SOVTOLL_VTOLL__PM",
"SOV_BTOLL__AM",
"SOV_BTOLL__EA",
"SOV_BTOLL__EV",
"SOV_BTOLL__MD",
"SOV_BTOLL__PM",
"SOV_DIST__AM",
"SOV_DIST__EA",
"SOV_DIST__EV",
"SOV_DIST__MD",
"SOV_DIST__PM",
"SOV_TIME__AM",
"SOV_TIME__EA",
"SOV_TIME__EV",
"SOV_TIME__MD",
"SOV_TIME__PM",
"SOV_TRIPS__AM",
"SOV_TRIPS__EA",
"SOV_TRIPS__EV",
"SOV_TRIPS__MD",
"SOV_TRIPS__PM",
"SOV_VTOLL__AM",
"SOV_VTOLL__EA",
"SOV_VTOLL__EV",
"SOV_VTOLL__MD",
"SOV_VTOLL__PM",
"WALK_TRIPS",
"WLK_TRN_WLK_BOARDS__AM",
"WLK_TRN_WLK_BOARDS__EA",
"WLK_TRN_WLK_BOARDS__EV",
"WLK_TRN_WLK_BOARDS__MD",
"WLK_TRN_WLK_BOARDS__PM",
"WLK_TRN_WLK_FAILURES__AM",
"WLK_TRN_WLK_FAILURES__EA",
"WLK_TRN_WLK_FAILURES__EV",
"WLK_TRN_WLK_FAILURES__MD",
"WLK_TRN_WLK_FAILURES__PM",
"WLK_TRN_WLK_FAR__AM",
"WLK_TRN_WLK_FAR__EA",
"WLK_TRN_WLK_FAR__EV",
"WLK_TRN_WLK_FAR__MD",
"WLK_TRN_WLK_FAR__PM",
"WLK_TRN_WLK_IVT__AM",
"WLK_TRN_WLK_IVT__EA",
"WLK_TRN_WLK_IVT__EV",
"WLK_TRN_WLK_IVT__MD",
"WLK_TRN_WLK_IVT__PM",
"WLK_TRN_WLK_IWAIT__AM",
"WLK_TRN_WLK_IWAIT__EA",
"WLK_TRN_WLK_IWAIT__EV",
"WLK_TRN_WLK_IWAIT__MD",
"WLK_TRN_WLK_IWAIT__PM",
"WLK_TRN_WLK_KEYIVT__AM",
"WLK_TRN_WLK_KEYIVT__EA",
"WLK_TRN_WLK_KEYIVT__EV",
"WLK_TRN_WLK_KEYIVT__MD",
"WLK_TRN_WLK_KEYIVT__PM",
"WLK_TRN_WLK_TRIPS__AM",
"WLK_TRN_WLK_TRIPS__EA",
"WLK_TRN_WLK_TRIPS__EV",
"WLK_TRN_WLK_TRIPS__MD",
"WLK_TRN_WLK_TRIPS__PM",
"WLK_TRN_WLK_WACC__AM",
"WLK_TRN_WLK_WACC__EA",
"WLK_TRN_WLK_WACC__EV",
"WLK_TRN_WLK_WACC__MD",
"WLK_TRN_WLK_WACC__PM",
"WLK_TRN_WLK_WAUX__AM",
"WLK_TRN_WLK_WAUX__EA",
"WLK_TRN_WLK_WAUX__EV",
"WLK_TRN_WLK_WAUX__MD",
"WLK_TRN_WLK_WAUX__PM",
"WLK_TRN_WLK_WEGR__AM",
"WLK_TRN_WLK_WEGR__EA",
"WLK_TRN_WLK_WEGR__EV",
"WLK_TRN_WLK_WEGR__MD",
"WLK_TRN_WLK_WEGR__PM",
"WLK_TRN_WLK_XWAIT__AM",
"WLK_TRN_WLK_XWAIT__EA",
"WLK_TRN_WLK_XWAIT__EV",
"WLK_TRN_WLK_XWAIT__MD",
"WLK_TRN_WLK_XWAIT__PM",
]

def copy_skims(src_path, dest_path, skims_list):
"""
Copies a specified list of skims from a source OMX file to a destination OMX file,
overwriting existing skims in the destination.

Parameters
----------
src_path : str
Path to the source OMX file.
dest_path : str
Path to the destination OMX file.
skims_list : list
A list of skim names (strings) to copy.
"""
if not os.path.exists(src_path):
logger.critical(f"Source file not found: {src_path}")
return
if not os.path.exists(dest_path):
logger.critical(f"Destination file not found: {dest_path}")
return # Or create it, depending on desired behavior. Sticking to copy to existing here.

skims_src = None
skims_dest = None

try:
logger.info(f"Opening source file: {src_path}")
skims_src = omx.open_file(src_path, 'r')

logger.info(f"Opening destination file for append/write: {dest_path}")
# Open in append mode to be able to write/overwrite
skims_dest = omx.open_file(dest_path, 'a')

logger.info(f"Attempting to copy {len(skims_list)} specified skims.")

for skim_name in skims_list:
if skim_name in skims_src.list_matrices():
logger.info(f"Processing skim: '{skim_name}'")
try:
# If the skim exists in the destination, delete it first
if skim_name in skims_dest.list_matrices():
logger.info(f" Removing existing skim '{skim_name}' from destination.")
del skims_dest[skim_name]

# Read data from source file
data_to_copy = skims_src[skim_name][:] # Use [:] to get the actual numpy array

# Write data to destination file
skims_dest[skim_name] = data_to_copy

logger.info(f" Successfully copied '{skim_name}'.")

except Exception as e:
logger.error(f" Error copying skim '{skim_name}': {e}")
else:
logger.warning(f" Skim '{skim_name}' not found in source file '{src_path}'. Skipping.")

logger.info("\n--- Copy Operation Summary ---")
logger.info(f"Attempted to copy {len(skims_list)} skims.")
# You could add counters here for success/failure if desired
logger.info("----------------------------")


except FileNotFoundError as e:
logger.critical(f"File not found error: {e}")
except Exception as e:
logger.critical(f"An unexpected error occurred: {e}")
finally:
if skims_src:
try:
skims_src.close()
logger.info(f"Closed source file: {src_path}")
except Exception as e:
logger.error(f"Error closing source file {src_path}: {e}")
if skims_dest:
try:
skims_dest.close()
logger.info(f"Closed destination file: {dest_path}")
except Exception as e:
logger.error(f"Error closing destination file {dest_path}: {e}")


if __name__ == '__main__':
# Note: The file paths are hardcoded at the top of the script,
# making this a one-time script tailored to the log analysis.
# You will need to manually run this script.
logger.info("Starting skim copying script.")
copy_skims(file1_path, file2_path, skims_to_copy)
logger.info("Script finished.")
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ dependencies:
- xorg-xproto=7.0.31=h7f98852_1007
- xz=5.2.5=h516909a_1
- yaml=0.2.5=h516909a_0
- zarr=3.0.6
- zlib=1.2.11=h36c2ea0_1013
- zstd=1.5.0=ha95c52a_0
- pip:
Expand Down
26 changes: 22 additions & 4 deletions hpc/job.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
#!/bin/bash

module load python/3.8.8
#pip install --user openmatrix
#pip install --user geopandas
module load python/3.10.12
#python -m pip uninstall --user shapely
#python -m pip install --user shapely
#python -m pip install --user openmatrix
#python -m pip install --user pygeos
#python -m pip install --user geopandas
#python -m pip install --user table
#python -m pip install --user PyYAML
export PYTHONPATH=`python -m site --user-site`:$PYTHONPATH
cd /global/scratch/users/$USER/sources/PILATES
python run.py -v
echo "$1"

echo "=== MEMORY INFORMATION ==="
free -h
grep MemTotal /proc/meminfo
grep -i numa /proc/cpuinfo
echo "=========================="

echo "=== NODE USAGE INFORMATION ==="
squeue -o "%.18i %.9P %.8j %.8u %.8T %.10M %.9l %.6D %R" | grep $(hostname)
echo "=========================="


python run.py -c "$1" -S "$2"

23 changes: 19 additions & 4 deletions hpc/job_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,28 @@ RANDOM_PART="$(tr -dc A-Z0-9 </dev/urandom | head -c 8)"
DATETIME="$(date "+%Y.%m.%d-%H.%M.%S")"
JOB_NAME="$RANDOM_PART.$DATETIME"

settings_file="settings.yaml"
stage_file="current_stage_${JOB_NAME}.yaml"
while getopts :c:s: name
do
case $name in
c) cflag=1
settings_file="$OPTARG";;
s) sflag=1
stage_file="$OPTARG";;
?) printf "Usage: %s: [-c settings/config file loc] [-s stage file loc] args\n" $0
exit 2;;
esac
done


PARTITION="lr7"
QOS="lr_normal"
NUM_CPUS=50
MEMORY_LIMIT="240"
NUM_CPUS=56
MEMORY_LIMIT="230"
ACCOUNT="pc_beamcore"
JOB_LOG_FILE_PATH="/global/scratch/users/$USER/pilates_logs/log_${DATETIME}_${RANDOM_PART}.log"
EXPECTED_EXECUTION_DURATION="2-00:00:00"
EXPECTED_EXECUTION_DURATION="3-00:00:00"

mkdir -p "/global/scratch/users/$USER/pilates_logs"

Expand All @@ -23,6 +38,6 @@ sbatch --partition="$PARTITION" \
--job-name="$JOB_NAME" \
--output="$JOB_LOG_FILE_PATH" \
--time="$EXPECTED_EXECUTION_DURATION" \
job.sh
job.sh "$settings_file" "$stage_file"

echo $JOB_LOG_FILE_PATH
Loading