Important: Read this before posting to this forum

  1. This forum is for questions related to the use of Apollo. We will answer some general choice modelling questions too, where appropriate, and time permitting. We cannot answer questions about how to estimate choice models with other software packages.
  2. There is a very detailed manual for Apollo available at http://www.ApolloChoiceModelling.com/manual.html. This contains detailed descriptions of the various Apollo functions, and numerous examples are available at http://www.ApolloChoiceModelling.com/examples.html. In addition, help files are available for all functions, using e.g. ?apollo_mnl
  3. Before asking a question on the forum, users are kindly requested to follow these steps:
    1. Check that the same issue has not already been addressed in the forum - there is a search tool.
    2. Ensure that the correct syntax has been used. For any function, detailed instructions are available directly in Apollo, e.g. by using ?apollo_mnl for apollo_mnl
    3. Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
    4. Make sure that R is using the latest official release of Apollo.
  4. If the above steps do not resolve the issue, then users should follow these steps when posting a question:
    1. provide full details on the issue, including the entire code and output, including any error messages
    2. posts will not immediately appear on the forum, but will be checked by a moderator first. This may take a day or two at busy times. There is no need to submit the post multiple times.

multithreading doesn't work with AMD CPU when estimating ICLV model

Report bugs or highlight issues with Apollo functions. At a minimum, please include the part of the output where you believe the bug is manifested. Ideally, please share your model file.
Post Reply
YGao
Posts: 2
Joined: 29 Sep 2021, 08:28

multithreading doesn't work with AMD CPU when estimating ICLV model

Post by YGao »

Dear Apollo team,

Thank you for producing this wonderful library!
Please forgive my poor writing, I am not from a English speaking country.

I am encountering a strange problem during the estimation of ICLV models.

I have 2 computers, one laptop with Inter i7-1065G7, and a desktop with AMD Ryzen 5600x. Both of them are using R4.1.1 on windows 10, with Apollo version 0.2.5. I found that Apollo on my AMD platform estimating the ICLV model far slower than my Inter Laptop, which is theoretically unlikely.

To ensure the problem doesn't come from my coding, I run example 24 on Apollo homepage, only changing the nCores in apollo_control to enable multi-threading. During the estimation, I can tell from the windows Task manager that the Intel CPU utilization is always at 100% for all 8 cores, while the AMD CPU utilization is only around 2%-10% for all 12 cores. None of the AMD cores get fully used.

By the way I also do the same test based on Apollo example 16, and the multi-threading works perfectly on both CPU platforms... this completely confused me.

Is this a bug? Or did I do something wrong in setting my environment for the AMD platform?
Any feedback would be appreciated.

Best Regards,
Gao
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: multithreading doesn't work with AMD CPU when estimating ICLV model

Post by stephanehess »

Gao

it doesn't make sense that this problem happens with hybrid choice but not with mixed logit, as the multi-threading part of the code is the same.

Can I suggest that you run some tests using the apollo_speedTest function on both machines, for both of the below examples, and then send us the output in reply to this post.

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
YGao
Posts: 2
Joined: 29 Sep 2021, 08:28

Re: multithreading doesn't work with AMD CPU when estimating ICLV model

Post by YGao »

Hi, Professor Stephane

My apologies for the late reply. I actually solve this myself by resetting my windows 10... so I cannot reproduce this problem currently. Once I met the problem again (I hope not) I will try to run apollo_speedTest and show you the results.

Sorry to bother you.

Best regards,
gao
Post Reply