MarcBerliner / PETLION.jl

High-performance simulations of the Porous Electrode Theory for Li-ion batteries
MIT License
65 stars 11 forks source link

Installation issue #86

Closed hjli528 closed 2 years ago

hjli528 commented 2 years ago

Hi there, sorry to bother you again. I created a new environment and installed PETLION as instructed. After precompiling, I got the following information

74 dependencies successfully precompiled in 71 seconds (49 already precompiled)
  3 dependencies are precompiled but different versions are currently loaded. Restart Julia to access the new versions

I started Julia and tested the examples, and after "using PETLION", I got the following errors

LoadError: Failed to precompile ArrayInterface [4fba245c-0d91-5ea0-9b3e-6abc04ee57a9] to C:\Users\hli36\.julia\compiled\v1.6\ArrayInterface\jl_C67C.tmp.
Stacktrace:
 LoadError: Failed to precompile RecursiveArrayTools [731186ca-8d62-57ce-b412-fbd966d074cd] to C:\Users\hli36\.julia\compiled\v1.6\RecursiveArrayTools\jl_C265.tmp.
Stacktrace:
LoadError: Failed to precompile SciMLBase [0bca4576-84f4-4d90-8ffe-ffa030f20462] to C:\Users\hli36\.julia\compiled\v1.6\SciMLBase\jl_C061.tmp.
Stacktrace:

However, I was able to download the repository as a zip file, activate the enviroment, instantiate all the packages, and use PETLION with no problem. I then compared the differences in manifest.toml in both installations and found out that with "pkg.add("PETLION")", the following versions of above 3 packages were intalled:

with downloading the repo and activating the existing environment created by you, the following versions were installed:

At this point, I understand the error might be caused by version incompatibilities, so a kinda silly question is, how should I resolve this?

Another question is, after I execute "p = Params(LCO)", a new folder is created under "saved_models" but the folder name is very long so if I put the repo under an already deep directory the model will fail to be created because it exceeds the Windows path length limit. Is there a way to change the name of the saved model so it is shorter?

Thanks,

Hongjiang

MarcBerliner commented 2 years ago

Hi Hongjiang,

It seems like something went wrong when installing your packages. PETLION is compatible with SciMLBase v1.x.x and RecursiveArrayTools v2.x.x with no explicit dependence on ArrayInterface. I would try updating your packages (import Pkg;Pkg.("update")) or just reinstalling PETLION and seeing what happens. You could also try Pkg.precompile().

I've been meaning to fix the long file name problem for awhile now. I will push out a change later today that uses SHA encryption to shorten the name plus adding an info.txt file for version control. For now, you can use PETLION.options[:SAVE_SYMBOLIC_FUNCTIONS] = false which prevents reading/writing to disk.

MarcBerliner commented 2 years ago

See #87

hjli528 commented 2 years ago

It was indeed something wrong with my IDE, atom. I had a similar issue with one of my other Julia environments and with Chris's help, I was able to resolve that. The issue was, as I quoted from Chris

What happened was the package that was held back wasn't one in the project but as part of the IDE. Most people use VS Code instead these days to avoid this.