# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=490

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 491

---

## [Fail to execute startup.jl](https://discourse.julialang.org/t/fail-to-execute-startup-jl/39936)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 18\
**Last updated:** [January 28, 2022, 6:21am UTC](https://discourse.julialang.org/t/fail-to-execute-startup-jl/39936 "2022-01-28T06:21:12Z")

</div>

I have just installed Julia 1.4.1 on Windows. I have a trusty startup.jl file in C:\\Users\\myuser\\.julia\\config I can directly execute the file, but on \[re\]starting Julia (CTRL+j,k) startup.jl is not executed. The doc …

---

## [Can I compile native C programs on Julia CI?](https://discourse.julialang.org/t/can-i-compile-native-c-programs-on-julia-ci/75340)

<div class="topic-metadata">

**Author:** [@melonedo](https://discourse.julialang.org/u/melonedo)\
**Replies:** 2\
**Last updated:** [January 28, 2022, 5:27am UTC](https://discourse.julialang.org/t/can-i-compile-native-c-programs-on-julia-ci/75340 "2022-01-28T05:27:28Z")

</div>

When I am developing Clang.jl, a package which bridges C and Julia, I find it necessary that I test the generated wrapper against C libraries. Apart from testing on existing libraries shipped with jll packages, one way i…

---

## [A Union of Tuple types isa Tuple type ?!](https://discourse.julialang.org/t/a-union-of-tuple-types-isa-tuple-type/75339)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 3\
**Last updated:** [January 28, 2022, 5:25am UTC](https://discourse.julialang.org/t/a-union-of-tuple-types-isa-tuple-type/75339 "2022-01-28T05:25:42Z")

</div>

So, what’s the rationale for the following behaviour, which caught me by surprise: julia\> Union{Tuple{Int}, Tuple{Char}} \<: Tuple true

---

## [FLoops + CUDAEx(): accumulator type must be \`isbits\` or \`isbitsunion\`; got: Union{}](https://discourse.julialang.org/t/floops-cudaex-accumulator-type-must-be-isbits-or-isbitsunion-got-union/74865)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 2\
**Last updated:** [January 28, 2022, 4:27am UTC](https://discourse.julialang.org/t/floops-cudaex-accumulator-type-must-be-isbits-or-isbitsunion-got-union/74865 "2022-01-28T04:27:14Z")

</div>

I’m trying my first small codes with CUDA, and using the FLoops interface. I am probably missing the basics here, so a brief explanation of this error will probably illuminate my path: julia\> using CUDA, FLoops, FoldsCU…

---

## [Evaluating @view macro before @tturbo](https://discourse.julialang.org/t/evaluating-view-macro-before-tturbo/75320)

<div class="topic-metadata">

**Author:** [@Chiil](https://discourse.julialang.org/u/Chiil)\
**Replies:** 1\
**Last updated:** [January 27, 2022, 11:54pm UTC](https://discourse.julialang.org/t/evaluating-view-macro-before-tturbo/75320 "2022-01-27T23:54:04Z")

</div>

I am revising a piece of code where I am removing unnecessary copies by creating views. At places where I have @tturbo decorators, I get errors because LoopVectorization does not like the @view. Is it possible to make th…

---

## [Could this be faster using some decomposition?](https://discourse.julialang.org/t/could-this-be-faster-using-some-decomposition/75323)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 4\
**Last updated:** [January 27, 2022, 10:02pm UTC](https://discourse.julialang.org/t/could-this-be-faster-using-some-decomposition/75323 "2022-01-27T22:02:00Z")

</div>

Hi, This is more maths than Julia optimisation, but I do not recall if there is a trick in the linear algebra book to make this more efficiently. I have a covariance matrix M, of size (2000,2000), and i want to normali…

---

## [ERROR: LoadError: AssertionError: Target platform is Windows, but can't find valid FMU binary](https://discourse.julialang.org/t/error-loaderror-assertionerror-target-platform-is-windows-but-cant-find-valid-fmu-binary/75312)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 0\
**Last updated:** [January 27, 2022, 7:09pm UTC](https://discourse.julialang.org/t/error-loaderror-assertionerror-target-platform-is-windows-but-cant-find-valid-fmu-binary/75312 "2022-01-27T19:09:52Z")

</div>

I am using Julia v. 1.6.3 64bit in my windows machine. I have an FMU model (generated by 32bits simulation tool) which I tried to load it. However, I got the below error. ERROR: LoadError: AssertionError: Target platfor…

---

## [What is the difference between the version of Julia installed in windows and the one in VS Code in extension?](https://discourse.julialang.org/t/what-is-the-difference-between-the-version-of-julia-installed-in-windows-and-the-one-in-vs-code-in-extension/75325)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 3\
**Last updated:** [January 27, 2022, 9:49pm UTC](https://discourse.julialang.org/t/what-is-the-difference-between-the-version-of-julia-installed-in-windows-and-the-one-in-vs-code-in-extension/75325 "2022-01-27T21:49:54Z")

</div>

The julia version that I installed in my windows machine is v. 1.6.3. While the julia extension that I installed in VS Code is v1.5.10. This is what I get when from REPL of VS Code, I dont know why it gives v. 1.6.3 not…

---

## [Why is the non parallel loop faster than my parallel loop?](https://discourse.julialang.org/t/why-is-the-non-parallel-loop-faster-than-my-parallel-loop/72512)

<div class="topic-metadata">

**Author:** [@Marius\_123](https://discourse.julialang.org/u/Marius_123)\
**Replies:** 5\
**Last updated:** [January 27, 2022, 9:33pm UTC](https://discourse.julialang.org/t/why-is-the-non-parallel-loop-faster-than-my-parallel-loop/72512 "2022-01-27T21:33:45Z")

</div>

Down below i have two version of a loop, the non parallel version is significantly faster. I am not a real expert in parallelization, can you tell me why this is the case and how i can improve the performance? using Sob…

---

## [Generate function code](https://discourse.julialang.org/t/generate-function-code/67385)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 6\
**Last updated:** [January 27, 2022, 9:31pm UTC](https://discourse.julialang.org/t/generate-function-code/67385 "2022-01-27T21:31:34Z")

</div>

Hellow! I have type\_list = \[ # type code # Int64 0x11; Int32 0xa2; Int16 0x33; Int8 0x24; # UInt64 0x15; UInt32 0xb6; UInt16 0x7a; UInt8…

---

## [Julia, Pluto and Docker Images](https://discourse.julialang.org/t/julia-pluto-and-docker-images/75264)

<div class="topic-metadata">

**Author:** [@timothyhartzog](https://discourse.julialang.org/u/timothyhartzog)\
**Replies:** 5\
**Last updated:** [January 27, 2022, 8:02pm UTC](https://discourse.julialang.org/t/julia-pluto-and-docker-images/75264 "2022-01-27T20:02:23Z")

</div>

Going forward the desire 9s to build a simulation of Neonatal Invasive Ventilator during resuscitation using Julia, Pluto and use docker images as a distribution method for the beta viewing. I plan to use VS Code as th…

---

## [Work on main thread delays spawned task](https://discourse.julialang.org/t/work-on-main-thread-delays-spawned-task/75297)

<div class="topic-metadata">

**Author:** [@cafaxo](https://discourse.julialang.org/u/cafaxo)\
**Replies:** 3\
**Last updated:** [January 27, 2022, 7:15pm UTC](https://discourse.julialang.org/t/work-on-main-thread-delays-spawned-task/75297 "2022-01-27T19:15:31Z")

</div>

Consider the following example: function ex1() task = @Threads.spawn begin st = time() sleep(1.0) return time() - st end st2 = time() while time() - st2 \< 5 end println("tas…

---

## [Video dataset in Julia?](https://discourse.julialang.org/t/video-dataset-in-julia/75309)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 1\
**Last updated:** [January 27, 2022, 6:02pm UTC](https://discourse.julialang.org/t/video-dataset-in-julia/75309 "2022-01-27T18:02:01Z")

</div>

Where could I find video datasets in Julia? I want to use neural networks to reconstruct videos

---

## [Thread affinitization: pinning Julia threads to cores](https://discourse.julialang.org/t/thread-affinitization-pinning-julia-threads-to-cores/58069)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 10\
**Last updated:** [January 27, 2022, 4:57pm UTC](https://discourse.julialang.org/t/thread-affinitization-pinning-julia-threads-to-cores/58069 "2022-01-27T16:57:15Z")

</div>

Hi all, as part of my attempt to create a simple port of the STREAM benchmark (STREAMBenchmark.jl) for estimating the memory bandwidth of a machine I asked myself whether it is possible to pin Julia threads to specific …

---

## [Order of \`JULIA\_DEPOT\_PATH\` not hornored?](https://discourse.julialang.org/t/order-of-julia-depot-path-not-hornored/75299)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 1\
**Last updated:** [January 27, 2022, 3:13pm UTC](https://discourse.julialang.org/t/order-of-julia-depot-path-not-hornored/75299 "2022-01-27T15:13:47Z")

</div>

Using Julia on a HPC setup: \[jiling\]~% which julia /cvmfs/sft.cern.ch/lcg/views/LCG\_101/x86\_64-centos7-gcc8-opt/bin/julia \[jiling\]~% echo $JULIA\_DEPOT\_PATH /afs/cern.ch/user/j/jiling/.julia:/cvmfs/sft.cern.c…

---

## [Saving a period of ODE solutions](https://discourse.julialang.org/t/saving-a-period-of-ode-solutions/75278)

<div class="topic-metadata">

**Author:** [@xspeng](https://discourse.julialang.org/u/xspeng)\
**Replies:** 4\
**Last updated:** [January 27, 2022, 1:45pm UTC](https://discourse.julialang.org/t/saving-a-period-of-ode-solutions/75278 "2022-01-27T13:45:07Z")

</div>

Hi, if I only want to save part of the solutions, how to realize it, for example, function test(dy, y, p, t) a, b, c = p dy\[1\] = a \* y\[1\] + b \* y\[2\] + c dy\[2\] = b \* y\[2\] + c \* y\[3\] + a dy\[3\] = c \* y\[3\] +…

---

## [Distributed solving ODEs problem](https://discourse.julialang.org/t/distributed-solving-odes-problem/74983)

<div class="topic-metadata">

**Author:** [@xspeng](https://discourse.julialang.org/u/xspeng)\
**Replies:** 8\
**Last updated:** [January 27, 2022, 10:34am UTC](https://discourse.julialang.org/t/distributed-solving-odes-problem/74983 "2022-01-27T10:34:04Z")

</div>

Hi, I have a problem with using distributed solving ODEs, here is a simple example, @everywhere begin function test(dy, y, p, t) a, b, c = p dy\[1\] = a \* y\[1\] + b \* y\[2\] + c dy\[2\] = b \* y\[2\] +…

---

## [Evaluating the Hessian of the Lagrangian efficiently](https://discourse.julialang.org/t/evaluating-the-hessian-of-the-lagrangian-efficiently/54659)

<div class="topic-metadata">

**Author:** [@ferrolho](https://discourse.julialang.org/u/ferrolho)\
**Replies:** 14\
**Last updated:** [January 27, 2022, 9:49am UTC](https://discourse.julialang.org/t/evaluating-the-hessian-of-the-lagrangian-efficiently/54659 "2022-01-27T09:49:31Z")

</div>

In the context of numerical optimisation, it is good to provide exact Hessians of the problem constraints. I have a working version thanks to Julia’s AD capabilities, but I think my current approach is not optimised for …

---

## [Building a symbolic Hessian function with ModelingToolkit.jl](https://discourse.julialang.org/t/building-a-symbolic-hessian-function-with-modelingtoolkit-jl/74746)

<div class="topic-metadata">

**Author:** [@adeyemiadeoye](https://discourse.julialang.org/u/adeyemiadeoye)\
**Replies:** 9\
**Last updated:** [January 27, 2022, 9:15am UTC](https://discourse.julialang.org/t/building-a-symbolic-hessian-function-with-modelingtoolkit-jl/74746 "2022-01-27T09:15:11Z")

</div>

I seek to build a Hessian function for the Lagrangian using ModelingToolkit.jl. This Hessian function is supposed to take two (non-symbolic) functions as arguments. My question is, how would you “correctly” write (if pos…

---

## [Module functions logic depend on whether the third party library is used or not](https://discourse.julialang.org/t/module-functions-logic-depend-on-whether-the-third-party-library-is-used-or-not/75266)

<div class="topic-metadata">

**Author:** [@kerim](https://discourse.julialang.org/u/kerim)\
**Replies:** 1\
**Last updated:** [January 27, 2022, 8:09am UTC](https://discourse.julialang.org/t/module-functions-logic-depend-on-whether-the-third-party-library-is-used-or-not/75266 "2022-01-27T08:09:22Z")

</div>

Hi, I’m pretty new in Julia. My module MyModule consist of few functions and the behaviour of these functions may vary dependent whether the python package is installed or not (I’m going to use PyCall). I think I shoul…

---

## [Computation of eigenvalues of a sparse matrix that is given by a file in COO format](https://discourse.julialang.org/t/computation-of-eigenvalues-of-a-sparse-matrix-that-is-given-by-a-file-in-coo-format/75214)

<div class="topic-metadata">

**Author:** [@Eustace](https://discourse.julialang.org/u/Eustace)\
**Replies:** 5\
**Last updated:** [January 27, 2022, 7:35am UTC](https://discourse.julialang.org/t/computation-of-eigenvalues-of-a-sparse-matrix-that-is-given-by-a-file-in-coo-format/75214 "2022-01-27T07:35:31Z")

</div>

Hi everyone, I am pretty new to Julia, and I would appreciate your help in the following. I have a complex, non-symmetric yet sparse matrix (800,000x800,000 with ~10M nnz) that is stored in a file in COO format, i.e., …

---

## [Include error](https://discourse.julialang.org/t/include-error/50753)

<div class="topic-metadata">

**Author:** [@dillamarcos](https://discourse.julialang.org/u/dillamarcos)\
**Replies:** 5\
**Last updated:** [January 27, 2022, 2:22am UTC](https://discourse.julialang.org/t/include-error/50753 "2022-01-27T02:22:42Z")

</div>

Hey guys I started using Julia today to apply in some exercises. I’ve tried to use the include function and I’m getting this error: Can anyone help me with understanding what I am doing wrong? I thought that since I’…

---

## [When using Vector{T}(undef,n) constructor, what are the values set to?](https://discourse.julialang.org/t/when-using-vector-t-undef-n-constructor-what-are-the-values-set-to/75251)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [January 26, 2022, 7:48pm UTC](https://discourse.julialang.org/t/when-using-vector-t-undef-n-constructor-what-are-the-values-set-to/75251 "2022-01-26T19:48:33Z")

</div>

Hi! If T = Float64, I observe that the values most often are set as some very small number, but is it possible for it to be a number such as “0.1”,“5” etc.? The reason I ask is that I just found out that some code I ha…

---

## [Discover which project I am?](https://discourse.julialang.org/t/discover-which-project-i-am/75247)

<div class="topic-metadata">

**Author:** [@whatsthecraic](https://discourse.julialang.org/u/whatsthecraic)\
**Replies:** 2\
**Last updated:** [January 26, 2022, 7:50pm UTC](https://discourse.julialang.org/t/discover-which-project-i-am/75247 "2022-01-26T19:50:28Z")

</div>

Hi there, is there a way to programmatically know which one is my current julia project?

---

## [Adding package developed in a local folder for use in other environment (for Documenter)](https://discourse.julialang.org/t/adding-package-developed-in-a-local-folder-for-use-in-other-environment-for-documenter/75233)

<div class="topic-metadata">

**Author:** [@sstroemer](https://discourse.julialang.org/u/sstroemer)\
**Replies:** 2\
**Last updated:** [January 26, 2022, 5:10pm UTC](https://discourse.julialang.org/t/adding-package-developed-in-a-local-folder-for-use-in-other-environment-for-documenter/75233 "2022-01-26T17:10:14Z")

</div>

I’ve created a package that I’m currently developing, specifying a path so that it fits into the overall folder structure (and the overall git structure), using: using PkgTemplates t = Template(; user="username", dir="…

---

## [Julia for Simulating Embedded Systems (HW/SW/Environment)](https://discourse.julialang.org/t/julia-for-simulating-embedded-systems-hw-sw-environment/75130)

<div class="topic-metadata">

**Author:** [@mrkrynmdsco](https://discourse.julialang.org/u/mrkrynmdsco)\
**Replies:** 7\
**Last updated:** [January 26, 2022, 4:17pm UTC](https://discourse.julialang.org/t/julia-for-simulating-embedded-systems-hw-sw-environment/75130 "2022-01-26T16:17:16Z")

</div>

Hi, I’m a Julia starter and I would want to leverage the language in doing cyber-physical simulation in the embedded systems domain. Something similar to what Renode can do but dynamically (if we can think of how to run…

---

## [InitError: could not load library "...libcxxwrap\_julia\_stl.dll" on windows](https://discourse.julialang.org/t/initerror-could-not-load-library-libcxxwrap-julia-stl-dll-on-windows/74535)

<div class="topic-metadata">

**Author:** [@hiemstar](https://discourse.julialang.org/u/hiemstar)\
**Replies:** 7\
**Last updated:** [January 26, 2022, 3:07pm UTC](https://discourse.julialang.org/t/initerror-could-not-load-library-libcxxwrap-julia-stl-dll-on-windows/74535 "2022-01-26T15:07:30Z")

</div>

I successfully build libcxxwrap\_julia from source on Windows using cmake -DJulia\_EXECUTABLE="home/AppData/Local/Programs/Julia-1.6.3/bin/julia" .. -G "Visual Studio 16" cmake --build . --config=Release and have added a…

---

## [Standard Package Statistics not found during testing oneAPI](https://discourse.julialang.org/t/standard-package-statistics-not-found-during-testing-oneapi/75225)

<div class="topic-metadata">

**Author:** [@Himbeersternchen](https://discourse.julialang.org/u/Himbeersternchen)\
**Replies:** 3\
**Last updated:** [January 26, 2022, 2:49pm UTC](https://discourse.julialang.org/t/standard-package-statistics-not-found-during-testing-oneapi/75225 "2022-01-26T14:49:55Z")

</div>

Hi all, I am new to julia gpu programming. I just run the steps in readme of oneAPI.jl and when i run: (@v1.5) pkg\> test oneAPI Then I get the error: ERROR: LoadError: LoadError: ArgumentError: Package Statistics no…

---

## [Run parts of other files from a loop](https://discourse.julialang.org/t/run-parts-of-other-files-from-a-loop/75195)

<div class="topic-metadata">

**Author:** [@alexdmeyer](https://discourse.julialang.org/u/alexdmeyer)\
**Replies:** 9\
**Last updated:** [January 26, 2022, 12:47pm UTC](https://discourse.julialang.org/t/run-parts-of-other-files-from-a-loop/75195 "2022-01-26T12:47:30Z")

</div>

Hi Julia folks, This is a somewhat strange/niche question, but I hope the answer ends up being useful to other users. Basically, I have one file that needs to loop over a list of other files, evaluating only the first f…

---

## [Allocation with Union Nothing](https://discourse.julialang.org/t/allocation-with-union-nothing/75163)

<div class="topic-metadata">

**Author:** [@RomainPct](https://discourse.julialang.org/u/RomainPct)\
**Replies:** 2\
**Last updated:** [January 26, 2022, 1:12am UTC](https://discourse.julialang.org/t/allocation-with-union-nothing/75163 "2022-01-26T01:12:17Z")

</div>

Hello, I discovered this behavior that created some weird allocations in my code. I feel like I get it now, but I would be interested in some relevant comments/explanations. f\_allocates(x) = isempty(x) ? nothing : (0, …

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=489)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=491)
