I am trying to run PrePoMax on an Amazon EC2 instance so I can scale a series of simulations that will take too long to run on my local machine. I have chosen a Windows Server 2022 Base image and an instance type that has access to 8 physical CPU cores. This is more than on my local Windows 10 Pro desktop, which has 6 CPU cores.
When I run PrePoMax on my local machine and specify the solver should use 6 cores, it uses 6 cores and my performance monitor clearly shows nearly 100% CPU usage. I am able to copy PrePoMax over to the EC2 instance and run it, but unlike my local machine, something limits the solver to no more than 1 CPU core.
I am new to EC2 so it’s quite possible there’s something I don’t understand about my configuration. Is there anyone here who has set up PrePoMax on Amazon EC2 and gotten around this problem?
Try setting the OMP_NUM_THREADS environment variable to the number of CPUs you want to use. You can copy the input file and submit it outside of PrePoMax from the command line. You will just need a proper CalculiX binary.
Thanks to your response I found the problem. I was using the PrePoMax GUI settings to set the number of processors. At the time I thought this worked the same as setting the system variables. This worked on my desktop, but it wasn’t until I manually set the system environment variables to include OMP_NUM_THREADS=8 that I was able to access all 8 cores and get the performance up to target.
@Matej for completeness in case anyone else has the same issue I did, I should note that I tried that method first before raising my question here. For whatever reason, that method did not work on the EC2 instance. It was only when I changed the environmental variables from System Properties > Advanced > Environment Variables on the EC2 instance’s Windows OS that I got the desired behavior.