# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=144

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

**Page:** 145

---

## [Monte Carlo ray tracing flow chart algorithm pseudocode: A @goto-implementation and a recursion based implementation, any ideas for a more modern implementation?](https://discourse.julialang.org/t/monte-carlo-ray-tracing-flow-chart-algorithm-pseudocode-a-goto-implementation-and-a-recursion-based-implementation-any-ideas-for-a-more-modern-implementation/108089)

<div class="topic-metadata">

**Author:** [@NikoBiele](https://discourse.julialang.org/u/NikoBiele)\
**Replies:** 3\
**Last updated:** [December 29, 2023, 11:59pm UTC](https://discourse.julialang.org/t/monte-carlo-ray-tracing-flow-chart-algorithm-pseudocode-a-goto-implementation-and-a-recursion-based-implementation-any-ideas-for-a-more-modern-implementation/108089 "2023-12-29T23:59:58Z")

</div>

Hi Julia-people :slight\_smile: I am working with heat transfer, more specifically simulating thermal radiation heat transfer in participating media through Monte Carlo ray tracing. I am currently working with a 2D algor…

---

## [Conceptual Question on GPU Integration with Optimization.jl](https://discourse.julialang.org/t/conceptual-question-on-gpu-integration-with-optimization-jl/108165)

<div class="topic-metadata">

**Author:** [@bdas123](https://discourse.julialang.org/u/bdas123)\
**Replies:** 2\
**Last updated:** [December 29, 2023, 11:55pm UTC](https://discourse.julialang.org/t/conceptual-question-on-gpu-integration-with-optimization-jl/108165 "2023-12-29T23:55:05Z")

</div>

This is more of a conceptual question about CUDA integration (CUDA.jl) with Optimization.jl Does the CUDA integration speed up both compilation AND solving time, or just solving time?

---

## [Understanding and Overcoming Zygote's Functional Limitations for distributed](https://discourse.julialang.org/t/understanding-and-overcoming-zygotes-functional-limitations-for-distributed/108143)

<div class="topic-metadata">

**Author:** [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)\
**Replies:** 5\
**Last updated:** [December 29, 2023, 8:57pm UTC](https://discourse.julialang.org/t/understanding-and-overcoming-zygotes-functional-limitations-for-distributed/108143 "2023-12-29T20:57:00Z")

</div>

Hello everyone, I am trying to parallelize a cost function. I am using Distributed and Zygote as an autodifferentiator for this. The example is as follows function sliced\_invariant\_statistical\_loss\_distributed(nn\_model,…

---

## [Set spatial reference system to a geodataframe and plot it](https://discourse.julialang.org/t/set-spatial-reference-system-to-a-geodataframe-and-plot-it/108086)

<div class="topic-metadata">

**Author:** [@anjelinejeline](https://discourse.julialang.org/u/anjelinejeline)\
**Replies:** 8\
**Last updated:** [December 29, 2023, 6:11pm UTC](https://discourse.julialang.org/t/set-spatial-reference-system-to-a-geodataframe-and-plot-it/108086 "2023-12-29T18:11:48Z")

</div>

Hello, I am trying to create a geotable from a csv and plot it along with a shapefile, However I am not able to to set the right spatial reference system as I am getting a method error when using the setspatialref! fun…

---

## [I am building a simple to use autoencoder model.. anyone interested?](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [December 29, 2023, 3:33pm UTC](https://discourse.julialang.org/t/i-am-building-a-simple-to-use-autoencoder-model-anyone-interested/108146 "2023-12-29T15:33:44Z")

</div>

Hello, I saw that all autoencoders presented in the various blogs require to actually implement the autoencoder from a DL framework. I am implementing instead one where the user just creates the model m =AutoEncoder(out…

---

## [Multi-objective: have no optimal solutions after changing the priority of the objectives](https://discourse.julialang.org/t/multi-objective-have-no-optimal-solutions-after-changing-the-priority-of-the-objectives/108078)

<div class="topic-metadata">

**Author:** [@Shaolin](https://discourse.julialang.org/u/Shaolin)\
**Replies:** 3\
**Last updated:** [December 29, 2023, 2:38am UTC](https://discourse.julialang.org/t/multi-objective-have-no-optimal-solutions-after-changing-the-priority-of-the-objectives/108078 "2023-12-29T02:38:59Z")

</div>

Hi, I have a 4-objective optimization model using Gurobi, and there was the optimal solution when I set the poriority of one order (e.g. \[4,3,2,1\]). but when the priority changes ((e.g. \[2,3,4,1\])), the optimal solutio…

---

## [JuMP: MathOptInterface.ScalarNonlinearFunction](https://discourse.julialang.org/t/jump-mathoptinterface-scalarnonlinearfunction/108139)

<div class="topic-metadata">

**Author:** [@a\_jae](https://discourse.julialang.org/u/a_jae)\
**Replies:** 5\
**Last updated:** [December 28, 2023, 10:47pm UTC](https://discourse.julialang.org/t/jump-mathoptinterface-scalarnonlinearfunction/108139 "2023-12-28T22:47:36Z")

</div>

is there a way to run a function only under certain conditions? For example, I have the following model: using JuMP, Gurobi; model = Model(Gurobi.Optimizer); @variable(model, x\[1:t\] \>= 0, Int); @variable(model, y\[1:h…

---

## [Trouble with NeuralODE and Metal](https://discourse.julialang.org/t/trouble-with-neuralode-and-metal/107826)

<div class="topic-metadata">

**Author:** [@tobydriscoll](https://discourse.julialang.org/u/tobydriscoll)\
**Replies:** 3\
**Last updated:** [December 28, 2023, 10:17pm UTC](https://discourse.julialang.org/t/trouble-with-neuralode-and-metal/107826 "2023-12-28T22:17:17Z")

</div>

I’m trying to do the canned basic neural ODE demo using Metal. First off, I was getting errors even with gdev=cpu\_device(), but I guessed at wrapping the solve() and prob\_neuralode() outputs with Array(), and then it se…

---

## [Can I rely on consecutive state positions of a variable in discretized problem with MOL?](https://discourse.julialang.org/t/can-i-rely-on-consecutive-state-positions-of-a-variable-in-discretized-problem-with-mol/108126)

<div class="topic-metadata">

**Author:** [@progtw1](https://discourse.julialang.org/u/progtw1)\
**Replies:** 1\
**Last updated:** [December 28, 2023, 12:22pm UTC](https://discourse.julialang.org/t/can-i-rely-on-consecutive-state-positions-of-a-variable-in-discretized-problem-with-mol/108126 "2023-12-28T12:22:06Z")

</div>

MethodOfLines creates a symbolic array variable indexed over discretized spaces. After structurally simplifying the system (currently done automatically in the discretization) there are several corresponding variables i…

---

## [Plots: Ribbons along y-axis](https://discourse.julialang.org/t/plots-ribbons-along-y-axis/108100)

<div class="topic-metadata">

**Author:** [@jabru](https://discourse.julialang.org/u/jabru)\
**Replies:** 2\
**Last updated:** [December 28, 2023, 11:49am UTC](https://discourse.julialang.org/t/plots-ribbons-along-y-axis/108100 "2023-12-28T11:49:29Z")

</div>

Hi there, I am currently trying to plot my data with a standard deviation. However, due to context reasons, I have a function f(y) instead of f(x). I would now like to make the error look nice with the help of the ribbo…

---

## [Matrix type for inversion](https://discourse.julialang.org/t/matrix-type-for-inversion/108107)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 2\
**Last updated:** [December 28, 2023, 9:22am UTC](https://discourse.julialang.org/t/matrix-type-for-inversion/108107 "2023-12-28T09:22:53Z")

</div>

Hi, I would like to solve a linear system A x=b where A is band by block. The bandwith can be big (~10). An example of such matrix is for example the one in the trapezoid method. I can do a LU decomposition to solve th…

---

## [Change to MTK plotting?](https://discourse.julialang.org/t/change-to-mtk-plotting/108109)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 4\
**Last updated:** [December 28, 2023, 9:15am UTC](https://discourse.julialang.org/t/change-to-mtk-plotting/108109 "2023-12-28T09:15:56Z")

</div>

I just updated Julia to v1.10, and now plotting results from MTK models do not work as before. Consider a solution structure sol from an MTK model: julia\> sol(0.5, idxs=\[r2m.Vd\_v, r2m.Dp\_p\]) 2-element Vector{Float64}: …

---

## [Some AMDGPU tests failing on Radeon VII under Windows](https://discourse.julialang.org/t/some-amdgpu-tests-failing-on-radeon-vii-under-windows/108074)

<div class="topic-metadata">

**Author:** [@mike.ingold](https://discourse.julialang.org/u/mike.ingold)\
**Replies:** 10\
**Last updated:** [December 27, 2023, 11:34pm UTC](https://discourse.julialang.org/t/some-amdgpu-tests-failing-on-radeon-vii-under-windows/108074 "2023-12-27T23:34:04Z")

</div>

I recently installed ROCm/HIP on Windows. I have a Radeon VII installed in my desktop, which isn’t officially supported but I’ve heard that it works for some people. It seems to kind-of work, but I consistently get a sma…

---

## [GLMakie, yscale=log10 and Float32](https://discourse.julialang.org/t/glmakie-yscale-log10-and-float32/101731)

<div class="topic-metadata">

**Author:** [@tt1234567](https://discourse.julialang.org/u/tt1234567)\
**Replies:** 3\
**Last updated:** [December 27, 2023, 4:39pm UTC](https://discourse.julialang.org/t/glmakie-yscale-log10-and-float32/101731 "2023-12-27T16:39:00Z")

</div>

A simple scatter plot with a log scale gives an error if the y values underflow Float32: x = 10.0.^-(0:50) using GLMakie fig = Figure() ax = Axis(fig\[1,1\], yscale=log10) scatter!(x) ERROR: Found invalid y-limits (0.0f0…

---

## [SparseSparse for inverting structured sparse matrices](https://discourse.julialang.org/t/sparsesparse-for-inverting-structured-sparse-matrices/105715)

<div class="topic-metadata">

**Author:** [@loisel](https://discourse.julialang.org/u/loisel)\
**Replies:** 4\
**Last updated:** [December 27, 2023, 2:48pm UTC](https://discourse.julialang.org/t/sparsesparse-for-inverting-structured-sparse-matrices/105715 "2023-12-27T14:48:33Z")

</div>

Hello, A few days ago, I discovered in this discussion that there is seemingly no way of inverting structured sparse matrices in Julia. We say that a matrix A is morally block diagonal if there are permutation matrices P…

---

## [Need a simple backend for plots inside pluto that support click event when plotting implicit equations](https://discourse.julialang.org/t/need-a-simple-backend-for-plots-inside-pluto-that-support-click-event-when-plotting-implicit-equations/107862)

<div class="topic-metadata">

**Author:** [@hisacro](https://discourse.julialang.org/u/hisacro)\
**Replies:** 1\
**Last updated:** [December 27, 2023, 10:32am UTC](https://discourse.julialang.org/t/need-a-simple-backend-for-plots-inside-pluto-that-support-click-event-when-plotting-implicit-equations/107862 "2023-12-27T10:32:19Z")

</div>

hello I want to get coordinates of implicit equations plot and pass it to a function, I have found using plots; plotlyjs() can do this but it doesn’t work inside pluto. Currently I use plotly backend and it gives a pop…

---

## [Flux loss with contribution gradient is slow](https://discourse.julialang.org/t/flux-loss-with-contribution-gradient-is-slow/107956)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 5\
**Last updated:** [December 27, 2023, 5:20am UTC](https://discourse.julialang.org/t/flux-loss-with-contribution-gradient-is-slow/107956 "2023-12-27T05:20:29Z")

</div>

I am trying to replicate some computations on solving PDEs with neural networks (the committor problem, see \[1802.10275\] Solving for high dimensional committor functions using artificial neural networks). This involves …

---

## [Round off decision variable](https://discourse.julialang.org/t/round-off-decision-variable/107988)

<div class="topic-metadata">

**Author:** [@quais](https://discourse.julialang.org/u/quais)\
**Replies:** 2\
**Last updated:** [December 26, 2023, 8:50pm UTC](https://discourse.julialang.org/t/round-off-decision-variable/107988 "2023-12-26T20:50:57Z")

</div>

Hey, is there a way to round off decision variables? I initialized the following variable, which is given in hours: n = 4 model = Model() @variable(model, start\_n\[1:n\] \>= 0, Int) In one of my cost functions, however, I…

---

## [Unable to create vector out of AffExpr in some cases](https://discourse.julialang.org/t/unable-to-create-vector-out-of-affexpr-in-some-cases/107968)

<div class="topic-metadata">

**Author:** [@A\_C](https://discourse.julialang.org/u/A_C)\
**Replies:** 3\
**Last updated:** [December 26, 2023, 9:09pm UTC](https://discourse.julialang.org/t/unable-to-create-vector-out-of-affexpr-in-some-cases/107968 "2023-12-26T21:09:51Z")

</div>

MWE: using JuMP model = Model() x1 = @variable(model, base\_name = "x1") x2 = x1 + 1 x3::AffExpr = x1 # Works: x1 is of type VariableRef v1 = \[sin(x1), x1\] # Works: x2 is of type AffExpr v2 = \[sin(x1), x2\] # Does not …

---

## [Potential Bug in Optimization.jl](https://discourse.julialang.org/t/potential-bug-in-optimization-jl/108066)

<div class="topic-metadata">

**Author:** [@bdas123](https://discourse.julialang.org/u/bdas123)\
**Replies:** 1\
**Last updated:** [December 26, 2023, 7:17pm UTC](https://discourse.julialang.org/t/potential-bug-in-optimization-jl/108066 "2023-12-26T19:17:21Z")

</div>

Here is my code which utilizes Optimization.jl and ModelingToolkit.jl: using BenchmarkTools, Optimization, OptimizationNLopt, ModelingToolkit function func\_1(x0,p) sse = sum(x0) + p\[1\] return sse end funct…

---

## [Higher order derivatives/ automatic differentiation](https://discourse.julialang.org/t/higher-order-derivatives-automatic-differentiation/107936)

<div class="topic-metadata">

**Author:** [@ayushinav](https://discourse.julialang.org/u/ayushinav)\
**Replies:** 5\
**Last updated:** [December 26, 2023, 10:05am UTC](https://discourse.julialang.org/t/higher-order-derivatives-automatic-differentiation/107936 "2023-12-26T10:05:01Z")

</div>

Tldr: Getting gradients for training PINNs for higher order ODEs/PDEs. There’s a certain Diff Eq I want to solve using PINNs. Let’s say a damped harmonic oscillator: u''(t)+ \\mu u'(t)+ k u(t)= 0 with a Dirichlet BC (u…

---

## [Having legend on top of twinx() line](https://discourse.julialang.org/t/having-legend-on-top-of-twinx-line/107970)

<div class="topic-metadata">

**Author:** [@aoifehealy](https://discourse.julialang.org/u/aoifehealy)\
**Replies:** 1\
**Last updated:** [December 24, 2023, 2:52pm UTC](https://discourse.julialang.org/t/having-legend-on-top-of-twinx-line/107970 "2023-12-24T14:52:59Z")

</div>

Hi there, I am plotting 4 different sine waves. The scale of one of these waves is on a seperate y axis. Using the code below, I have obtained the following graph: plot(sol\_2\_elem, idxs = wk2model.source.Δp, labels="2 E…

---

## [Using mapreduce on GPU with CUDA.jl](https://discourse.julialang.org/t/using-mapreduce-on-gpu-with-cuda-jl/108023)

<div class="topic-metadata">

**Author:** [@huguesmp](https://discourse.julialang.org/u/huguesmp)\
**Replies:** 1\
**Last updated:** [December 25, 2023, 7:50pm UTC](https://discourse.julialang.org/t/using-mapreduce-on-gpu-with-cuda-jl/108023 "2023-12-25T19:50:47Z")

</div>

Hello, I’m trying to get acquainted with GPU programming with CUDA.jl, and to start off I’m trying to stick to Array operations to keep things simple. In this MWE, the GPU version will not compile because of “dynamic f…

---

## [Calling another library from CUDA.jl](https://discourse.julialang.org/t/calling-another-library-from-cuda-jl/107981)

<div class="topic-metadata">

**Author:** [@AshtonSBradley](https://discourse.julialang.org/u/AshtonSBradley)\
**Replies:** 1\
**Last updated:** [December 25, 2023, 7:46pm UTC](https://discourse.julialang.org/t/calling-another-library-from-cuda-jl/107981 "2023-12-25T19:46:09Z")

</div>

Hi all, I want to call another library on the GPU (external to CUDA.jl) and have the rest of the code use the high level CUDA.jl array interface. It this possible to call an external library from CUDA.jl? Any advice g…

---

## [KernelAbstractions Autotuning](https://discourse.julialang.org/t/kernelabstractions-autotuning/108013)

<div class="topic-metadata">

**Author:** [@smartalecH](https://discourse.julialang.org/u/smartalecH)\
**Replies:** 1\
**Last updated:** [December 25, 2023, 11:48am UTC](https://discourse.julialang.org/t/kernelabstractions-autotuning/108013 "2023-12-25T11:48:29Z")

</div>

I’m going through the recent paper comparing batched KernelAbstractions kernels to standard array batching in jax and pytorch. In section 5.1.2, I found this interesting tidbit: KernelAbstractions.jl performs a limited…

---

## [Complex exponentiation: 1^x ≈ 2](https://discourse.julialang.org/t/complex-exponentiation-1-x-2/107994)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 6\
**Last updated:** [December 24, 2023, 11:38pm UTC](https://discourse.julialang.org/t/complex-exponentiation-1-x-2/107994 "2023-12-24T23:38:47Z")

</div>

I have a mind worm, and I’m trying to figure out how we might express this in Julia. Examine the following REPL log including complex exponentiation. julia\> x = -1im \* log(2)/(2π) 0.0 - 0.1103178000763258im julia\> 1…

---

## [PINN using Flux](https://discourse.julialang.org/t/pinn-using-flux/107782)

<div class="topic-metadata">

**Author:** [@andres](https://discourse.julialang.org/u/andres)\
**Replies:** 4\
**Last updated:** [December 24, 2023, 4:32pm UTC](https://discourse.julialang.org/t/pinn-using-flux/107782 "2023-12-24T16:32:05Z")

</div>

Hello, folks I’m trying to create a Physics-Informed Neural Network (PINN) to solve the harmonic oscillator using Flux. The idea was to make a Julia version based on the following link, whose implementation is in Pytho…

---

## [How to remove specific collumn from ModelFrame (StatsModels.jl)?](https://discourse.julialang.org/t/how-to-remove-specific-collumn-from-modelframe-statsmodels-jl/106864)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 11\
**Last updated:** [December 24, 2023, 2:32pm UTC](https://discourse.julialang.org/t/how-to-remove-specific-collumn-from-modelframe-statsmodels-jl/106864 "2023-12-24T14:32:55Z")

</div>

Hello! I have ModelFrame from data: mf = ModelFrame(@formula(y ~ 1 + x\*y), df)) where ‘x’ and ‘y’ - categorical. But I have rank-deficient modelmatrix(mf) and want to drop rank-deficient columns, I can identify them…

---

## [Issues with computing gradient with ForwardDiff.jl (Any fixes other than ND?)](https://discourse.julialang.org/t/issues-with-computing-gradient-with-forwarddiff-jl-any-fixes-other-than-nd/107989)

<div class="topic-metadata">

**Author:** [@ayushinav](https://discourse.julialang.org/u/ayushinav)\
**Replies:** 2\
**Last updated:** [December 24, 2023, 4:30am UTC](https://discourse.julialang.org/t/issues-with-computing-gradient-with-forwarddiff-jl-any-fixes-other-than-nd/107989 "2023-12-24T04:30:06Z")

</div>

When training a model using the boundary loss function, how do you all compute gradients? We can easily apply numerical differentiaion and get things up and running and I’ve seen a good example here. The Flux.gradient(.…

---

## [Learning rate scheduler with the new interface of Flux](https://discourse.julialang.org/t/learning-rate-scheduler-with-the-new-interface-of-flux/107142)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 4\
**Last updated:** [December 23, 2023, 5:34am UTC](https://discourse.julialang.org/t/learning-rate-scheduler-with-the-new-interface-of-flux/107142 "2023-12-23T05:34:07Z")

</div>

Hi, I’ve not been actively using Flux.jl for a while and I found that the interface of Flux has changed a bit. Here is the docs of Flux, “Scheduling Optimisers”. It seems like that using ParameterSchedulers.jl is reco…

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=143)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=145)
