Skip to content

add JuliaLang - #32

Open
miguelraz wants to merge 6 commits into
omegaup:mainfrom
miguelraz:patch-1
Open

add JuliaLang#32
miguelraz wants to merge 6 commits into
omegaup:mainfrom
miguelraz:patch-1

Conversation

@miguelraz

Copy link
Copy Markdown

First step to handle Add Julia to OmegaUp

@miguelraz miguelraz changed the title add julia binary to Dockerfile.rootfs add JuliaLang Jul 30, 2022
Comment thread src/jail/options.rs
const DEFAULT_EXTRA_MEMORY_SIZE_IN_BYTES: u64 = 16 * 1024 * 1024;
const RUBY_EXTRA_MEMORY_SIZE_IN_BYTES: u64 = 56 * 1024 * 1024;
const GO_EXTRA_MEMORY_SIZE_IN_BYTES: u64 = 512 * 1024 * 1024;
const JULIA_EXTRA_MEMORY_SIZE_IN_BYTES: u64 = 512 * 1024 * 1024;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how was this measured?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just took the largest I saw.
I'm guessing it will need tweaking.

Comment thread src/jail/options.rs
}
args::Language::Julia => {
extra_memory_size_in_bytes = JULIA_EXTRA_MEMORY_SIZE_IN_BYTES;
seccomp_profile_name = String::from("jl");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like the seccomp files are missing from this change! can they be added?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure - I don't know what those are though 😅

@miguelraz

Copy link
Copy Markdown
Author

That part of the build that is failing is due to

 ERROR:root:Failed to run 'strace -f -o /home/runner/work/omegajail/omegajail/smoketest/run/jl/strace-compiler.txt -s 512 /home/runner/work/omegajail/omegajail/rootfs/bin/omegajail --homedir /home/runner/work/omegajail/omegajail/smoketest/run/jl --homedir-writable -1 /home/runner/work/omegajail/omegajail/smoketest/run/jl/compile.out -2 /home/runner/work/omegajail/omegajail/smoketest/run/jl/compile.err -M /home/runner/work/omegajail/omegajail/smoketest/run/jl/compile.meta -t 30000 -O 10485100 --root /home/runner/work/omegajail/omegajail/rootfs --compile jl --compile-source Main.jl --compile-target Main --cgroup-path /system.slice/omegaup-runner.service/omegajail'

I didn't know how to work the invocation arguments for the Julia runner, but if I have a file solution.jl which has my code

print(parse(Int, readline())

and an input file called input.txt

10

to run it I would do

julia solution.jl < input.txt

And it would spit out

10

@miguelraz

Copy link
Copy Markdown
Author

Bump @lhchavez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants