and it ran through now. However, in the final step, when snakemake tries to export the network, I get the following error:
INFO:pypsa.linopt:No model basis stored
INFO:pypsa.linopf:Optimization successful. Objective value: 5.37e+09
INFO:pypsa.io:Exported network elec_s300_130_ec_lcopt_1H.nc has storage_units, loads, links, buses, lines, carriers, generators
Traceback (most recent call last):
File "/cluster/home/wlaumen/.local/lib/python3.8/site-packages/xarray/backends/file_manager.py", line 199, in _acquire_with_cache_info
file = self._cache[self._key]
File "/cluster/home/wlaumen/.local/lib/python3.8/site-packages/xarray/backends/lru_cache.py", line 53, in __getitem__
value = self._cache[key]
KeyError: [<class 'netCDF4._netCDF4.Dataset'>, ('/cluster/scratch/wlaumen/pypsa-eur/.snakemake/shadow/tmpcxakew7x/results/networks/elec_s300_130_ec_lcopt_1H.nc',), 'a', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False))]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/cluster/scratch/wlaumen/pypsa-eur/.snakemake/shadow/tmpcxakew7x/.snakemake/scripts/
tmp4i1i_qic.solve_network.py", line 291, in <module>
[...]
File "src/netCDF4/_netCDF4.pyx", line 2330, in netCDF4._netCDF4.Dataset.__init__
File "src/netCDF4/_netCDF4.pyx", line 1948, in netCDF4._netCDF4._ensure_nc_success
PermissionError: [Errno 13] Permission denied: b'/cluster/scratch/wlaumen/pypsa-eur/.snakemake/shadow/tmpcxakew7x/results/networks/elec_s300_130_ec_lcopt_1H.nc'
[Fri Mar 26 15:47:04 2021]
Error in rule solve_network:
jobid: 0
output: results/networks/elec_s300_130_ec_lcopt_1H.nc
log: logs/solve_network/elec_s300_130_ec_lcopt_1H_solver.log, logs/solve_network/elec_s300_130_ec_lcopt_1H_python.log, logs/solve_network/elec_s300_130_ec_lcopt_1H_memory.log (check log file(s) for error message)
I don't really understand the error nor do I ever get it on my computer when running smaller networks locally. Do you know what that error means and how to resolve it?
For context: The scratch directory is a working directory for writing files and output and has a lot more storage than the usual home directory on the cluster. However I do not know where the .snakemake/shadow/tmpcxakew7x part comes from.
Best,
Willem