Troubleshooting

This page collects some possible errors you may encounter and trick how to fix them. If you have some questions about how to use this code, you are welcome to discuss with us.

If you have additional tips, please either report an issue or submit a PR with suggestions.

Installation problems

I cannot find the julia executable

Make sure you have Julia installed in your environment. Please download the latest stable version for your platform. If you are using a *nix system, the recommended way is to use juliaup. If you do not want to install juliaup or you are using other platforms that Julia supports, download the corresponding binaries. Then, create a symbolic link to the Julia executable. If the path is not in your $PATH environment variable, export it to your $PATH.

Some clusters, like Habanero, Comet, or Expanse, already have Julia installed as a module, you may just module load julia to use it. If not, either install by yourself or contact your administrator.

Loading EquationsOfStateOfSolids

Why is Julia compiling/loading modules so slow? What can I do?

First, we recommend you download the latest version of Julia. Usually, the newest version has the best performance.

If you just want Julia to do a simple task and only once, you could start the Julia REPL with

julia --compile=min

to minimize compilation or

julia --optimize=0

to minimize optimizations, or just use both. Or you could make a system image and run with

julia --sysimage custom-image.so

See Fredrik Ekre's talk for details.

How to make a Vector from a Parameters?

A suggested way is to use the IterTools.fieldvalues function:

julia> using IterToolsERROR: ArgumentError: Package IterTools not found in current path.
- Run `import Pkg; Pkg.add("IterTools")` to install the IterTools package.
julia> eos = BirchMurnaghan4th(1, 2.0, 3, 4)ERROR: UndefVarError: BirchMurnaghan4th not defined
julia> collect(fieldvalues(eos))ERROR: UndefVarError: fieldvalues not defined

It is lazy and fast.

Or, write a non-lazy version of fieldvalues manually:

julia> fieldvalues(eos::EquationOfState) = [getfield(eos, i) for i in 1:nfields(eos)]ERROR: UndefVarError: EquationOfState not defined
julia> fieldvalues(eos)ERROR: UndefVarError: eos not defined

linfit does not work with BigFloat?

LinearAlgebra does not support SVD for matrices with BigFloat elements by default. You need to install GenericSVD.jl first and then using GenericSVD. Then it should work.