Skip to content

Egs Test#739

Draft
hdanielskoch wants to merge 11 commits into
masterfrom
egs_conus_enablement
Draft

Egs Test#739
hdanielskoch wants to merge 11 commits into
masterfrom
egs_conus_enablement

Conversation

@hdanielskoch
Copy link
Copy Markdown
Collaborator

Closes # (if applicable).

Changes proposed in this Pull Request

Not a real PR! Just using to compare code on sherlock

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in all of config.default.yaml.
  • Changes in configuration options are also documented in doc/configtables/*.csv.

threads: 1
resources:
mem_mb=lambda wildcards, input, attempt: (input.size // 100000) * attempt * 2,
mem_mb=lambda wildcards, input, attempt: (input.size // 100000) * attempt * 10,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this

threads: 1
resources:
mem_mb=4000,
mem_mb=20000,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed this

threads: 1
resources:
mem_mb=7000,
mem_mb=14000,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed this

threads: 1
resources:
mem_mb=5000,
mem_mb=20000,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Copy link
Copy Markdown
Collaborator Author

@hdanielskoch hdanielskoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logging for new stuff

Comment on lines +55 to +57
* attempt
* 150
* 0.5,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Comment on lines -290 to +340
cbuses = n.df(c)[column][lambda ds: ds.isin(buses)].rename("Bus")
df = n.df(c)
# For components with both bus0 and bus1, require both to be in buses
if "bus0" in df.columns and "bus1" in df.columns:
mask = df["bus0"].isin(buses) & df["bus1"].isin(buses)
cbuses = df.loc[mask, column].rename("Bus")
else:
cbuses = df[column][lambda ds: ds.isin(buses)].rename("Bus")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed!!! Why??

Comment on lines +710 to +713
# bus2sub stores sub_id as float strings (e.g. "39763.0") while the
# EGS profile stores sub_id as integer strings (e.g. "39763").
# Normalize to integer strings so the merge key matches.
bus2sub["sub_id"] = bus2sub["sub_id"].apply(lambda x: str(int(float(x))))
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

missing_i = list(colors.index[colors.isna()])
logger.warning(f"tech_colors for carriers {missing_i} not defined in config.")
# Fill missing colors with a default gray color
colors = colors.fillna("#808080")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new

Comment thread workflow/run_slurm.sh
Comment on lines +3 to +7
# snakemake --cluster "sbatch -A {cluster.account} --mail-type ALL --mail-user {cluster.email} -p {cluster.partition} -o {cluster.output} -e {cluster.error} -c {threads} --mem {resources.mem_mb} --time {cluster.walltime}" --cluster-config config/260128_config/config.cluster.yaml --jobs 20 --latency-wait 60 --rerun-incomplete --configfile config/260128_config/config.egs_conus_z134_nz2050_perfect.yaml


# snakemake resources/egs_conus_z134_nz2050_perfect/usa/profile_solar.nc \
# --cluster "sbatch -A {cluster.account} --mail-type ALL --mail-user {cluster.email} -p {cluster.partition} -o {cluster.output} -e {cluster.error} -c {threads} --mem {resources.mem_mb} --time {cluster.walltime}" \
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new

Comment on lines +3 to +18
#SBATCH -p service
#SBATCH --job-name=smk-driver
#SBATCH --time=01-23:59:00
#SBATCH --cpus-per-task=1
#SBATCH --mem=1G
#SBATCH -o logs/run_slurm/smk-driver-%j.out
#SBATCH -e logs/run_slurm/smk-driver-%j.err
#SBATCH --mail-type=FAIL
#SBATCH --mail-user=hdaniels@stanford.edu

set -euo pipefail
cd /oak/stanford/groups/iazevedo/henry/pypsa-usa/workflow

export GRB_LICENSE_FILE=/share/software/user/restricted/gurobi/11.0.2/licenses/gurobi.lic

/home/groups/iazevedo/henry/miniforge3/bin/mamba run -n pypsa-usa bash run_slurm.sh
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants