Strange WLE issue

32 views
Skip to first unread message

Madhavan Mukund

unread,
May 2, 2018, 2:27:29 AM5/2/18
to Stefano Maggiolo, Luca Wehrstedt, contestm...@googlegroups.com
We are running CMS on an Ubuntu 16.04 desktop with two additional
machines configured as Workers. One of our students faced the
following issue today. For one problem, he submitted code that was
timing out due to the wall clock limit. When he changed some
declarations from long long int to int, the same code ran without any
issues.

I have attached the two cpp files, screenshots of the grader output
and the testdata. We experimented with different versions of the code
and the effect was the same: long long int seems to take a much longer
time to evaluation on the wall clock, though the actual running time
is very small.

Can you suggest what might be happening?

--Madhavan

wall-clock-issue.tar.gz
signature.asc

Luca Wehrstedt

unread,
May 2, 2018, 3:18:14 AM5/2/18
to Madhavan Mukund, Stefano Maggiolo, contestm...@googlegroups.com
Does the longlong version program also take a long wall clock time when you run it outside of isolate?

Are the machine and the kernel 32 or 64 bit?

Is swap on? May the longlong version be using so much memory that it starts swapping?

Madhavan Mukund

unread,
May 2, 2018, 3:29:07 AM5/2/18
to Luca Wehrstedt, Stefano Maggiolo, contestm...@googlegroups.com
Answers below. I think it may be related to memory usage, as you have
suggested.

--Madhavan

----------------------------------------------------------------------

1. Outside isolate there is negligible difference in running times.

======================================================================

2. Machines and kernel are 64bit

----------------------------------------------------------------------
grader@grader2:/proc$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 42
Model name: Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
Stepping: 7
CPU MHz: 1596.572
CPU max MHz: 3300.0000
CPU min MHz: 1600.0000
BogoMIPS: 6585.41
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm epb pti retpoline spec_ctrl tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm arat pln pts
----------------------------------------------------------------------
grader@grader2:/proc$ uname -a
Linux grader2 4.13.0-39-generic #44~16.04.1-Ubuntu SMP Thu Apr 5 16:43:10 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

======================================================================

3. Swap is on.

grader@grader2:/proc$ /sbin/swapon --summary
Filename Type Size Used Priority
/dev/sda5 partition 4090876 1966364 -1

----------------------------------------------------------------------
signature.asc

Luca Wehrstedt

unread,
May 2, 2018, 3:32:03 AM5/2/18
to Madhavan Mukund, Stefano Maggiolo, contestm...@googlegroups.com

Madhavan Mukund

unread,
May 2, 2018, 3:37:49 AM5/2/18
to Luca Wehrstedt, Stefano Maggiolo, contestm...@googlegroups.com
Thanks, will try that out and get back.

--Madhavan
signature.asc

Madhavan Mukund

unread,
May 2, 2018, 3:42:10 AM5/2/18
to Luca Wehrstedt, Stefano Maggiolo, contestm...@googlegroups.com
Yes, with swap disabled it gets killed for violating the memory
limit. Thanks for the quick diagnosis.

--Madhavan
signature.asc
Reply all
Reply to author
Forward
0 new messages