Group Abstract Group Abstract

Message Boards Message Boards

Why does my Mathematica program use 100% CPU but very little RAM and still not finish after hours?

Posted 23 hours ago

Hi everyone,

I have a Mathematica program that takes an extremely long time to process and still doesn’t produce any result, even after more than 15 hours of runtime.

Here are my system details:

Supercomputer with 256 GB RAM
8 cores, each running at 3.7 GHz
Mathematica uses all CPU cores but only around 3–4 GB of RAM

Despite this, the computation doesn’t seem to progress efficiently. I’d like to understand:

Why is Mathematica using all the CPU but so little memory?

What are the best practices to optimize my code (e.g., parallelization, memory management, symbolic vs numeric evaluation)?

How can I identify the performance bottlenecks in my code?

If helpful, I can share a simplified version of my code to analyze where the slowdown occurs.

Any advice on improving speed or diagnosing such behavior would be greatly appreciated!

Thanks in advance!

This is my code. also i use vs 12.

POSTED BY: Reza rho
4 Replies

If I change a series to integral I have almost horizontal dot-line on two plots ?

POSTED BY: Mariusz Iwaniuk
Posted 8 hours ago

The first one is correct. Thank you alot.

POSTED BY: Reza rho

If I try I0[30, 8000] or I1[30, 8000] I get warnings of the form NIntegrate failed to converge to prescribed accuracy

POSTED BY: Gianluca Gorni
Posted 16 hours ago

it really doesnt matter. if you decrease m range, like 1 to 1000, it gives result. but anyway the result isnt accurate. the problem is that if we increase m range to 10000 it takes very long time.

POSTED BY: Reza rho
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard