I have been working with Firat to try and integrate Maple with coderunner and we have ran into a block when the python code tries to run Maple. We were expecting this to work much like clips but have ran into the following message when the quiz question is checked.
Maple initialization error, maple: process limit must be at least 50
I'm trying to understand where this is falling down as the ulimit's that I have been able to check seem well above 50(php,apache,maple). I'm struggling to follow the logical path to work out where the problem is, unable to find a relevant log with an error.
The coderunner plugin in Moodle sends python code to the jobe server, this is picked up by jobe's php api entry point. At this point I'm unsure what exactly is trigging the maple command, so unable to verify the ulimit being imposed.
Any help would be great, thanks in advance :)
Firat's python code can be seen below:
import subprocess, os, shutil student_answer = """sum(1.0/n, n= 1..10); quit""" SEPARATOR = "#<ab@17943918#@>#" prelude = ""# nothing here postlude="""""" testcode = """""" extra = """""" code_to_run = '\n'.join([prelude, extra, student_answer, testcode,postlude]) with open('commands', 'w') as maple_commands: maple_commands.write(code_to_run) with open('commands') as cmd_input: text_input = cmd_input.read() try: print(text_input) output = subprocess.check_output(['/opt/maple2017/bin/maple'], input='quit', universal_newlines=True ) print(output) except subprocess.CalledProcessError as e: print(e.output) except Exception as e: raise Exception("maple error: " + str(e))