sst-elements icon indicating copy to clipboard operation
sst-elements copied to clipboard

Vanadis is too fast

Open calewis opened this issue 3 years ago • 5 comments

@nmhamster Vanadis was running too fast so I needed to slow it down a bit. I added the following to my empty main

#include <unistd.h>
int main(){
  sleep(1);
}

to make it take longer, but

FATAL: [os]: [syscall-handler] Error: unknown code 4166 (ins: 0x401584, link-reg: 0x4014d4)

prevents my simulation from finishing.

calewis avatar Nov 18 '21 14:11 calewis

@calewis - you are the first user to complain the code is too fast :-). I'll take a look, this is just an OS call we need to add I believe.

nmhamster avatar Nov 18 '21 15:11 nmhamster

Do you really want to sleep for long periods (like a second or more?) or are you looking for smaller sleep periods that are functionally correct with respect to the sleep time? Asking the question because there is the potential to optimize differently depending on the answer.

nmhamster avatar Dec 01 '21 04:12 nmhamster

I was actually just testing functionality.

auto t0 = std::chono::system_clock::now();
sleep(1);
auto time = std::chono::system_clock::now() - t0;

should lead to a duration that is approximately the amount of time the sleep was suppose to take.

calewis avatar Dec 01 '21 18:12 calewis

@nmhamster @mjleven Is this still a thing?

hughes-c avatar Jun 22 '23 17:06 hughes-c

This still fails with FATAL: [os_hdlr]:handleSysCall() Error: unknown code 115 (ins: 0x38554, link-reg: 0x64)

https://www.man7.org/linux/man-pages/man2/clock_nanosleep.2.html

hughes-c avatar Oct 26 '23 00:10 hughes-c