- ago
For both the SMAC and particle swarm optimizers, there appear to be threads trying to access the same C:\Windows\temp\smac.log file at the same time.

In addition, the optimizer should be using the logical TEMP as the scratch device instead of C:\Windows\temp\smac.log in the first place.



CODE:
11/23/2024 09:38:13:975 Particle Swarm Exception in Optimize() AggregateException One or more errors occurred. (The process cannot access the file 'C:\Windows\temp\smac.log' because it is being used by another process.) (The process cannot access the file 'C:\Windows\temp\smac.log' because it is being used by another process.) (The process cannot access the file 'C:\Windows\temp\smac.log' because it is being used by another process.) (The process cannot access the file 'C:\Windows\temp\smac.log' because it is being used by another process.) (The process cannot access the file 'C:\Windows\temp\smac.log' because it is being used by another process.) Inner Exception: The process cannot access the file 'C:\Windows\temp\smac.log' because it is being used by another process. at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure) at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt fromInclusive, TInt toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) --- End of stack trace from previous location --- at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt fromInclusive, TInt toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body) at SharpLearning.Optimization.ParticleSwarmOptimizer.Optimize(Func`2 functionToMinimize) at finantic.Optimizer.ParticleSwarm.Optimize2(ParameterList pl, Boolean resumePrevious) at finantic.Optimizer.ParticleSwarm.Optimize(ParameterList pl, Boolean resumePrevious) at WealthLab.Backtest.StrategyOptimizer.PerformOptimization(IOptimizerHost host, PositionSize posSize, BacktestSettings bts, Boolean resuming) at WealthLab8.ucOptimization.InvokeStruct(Object item, DoWorkEventArgs cfg)
0
20
0 Replies

Reply

Bookmark

Sort
Currently there are no replies yet. Please check back later.