Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoformating #54

Open
TeaObvious opened this issue Aug 25, 2020 · 3 comments
Open

Autoformating #54

TeaObvious opened this issue Aug 25, 2020 · 3 comments
Labels

Comments

@TeaObvious
Copy link

Hi,

@hermanzdosilovic can you estimate how much work would it be, to get an "Autoformat" button working?

I figured the easiest solution could be:

  1. take the source, send it to the judge api
  2. use astyle as "compiler"
  3. write the output back to the Implementation window (which might be the hard part)

For the Background: I am evaluating Online IDEs and i like the clear and simple structure of the judge0 IDE.
I've got a student research assistant which i want to give the task to get judge0 running with MPI support for multiple cluster nodes, since i want to use it to teach parallel programming. So while being at this, i am evaluating if i also want him to add this comfort feature, just to improve the readability of code. :)

Thank you and your pals for this nice platform!

Have a very good day,
Ronny

@hermanzdosilovic
Copy link
Member

Hi Ronny,

I am familiar with the MPI and you can see that I have added support for it in Judge0 for C, C++, and Python. I am not sure how you could make it work in Judge0 with support for multiple nodes. This seems a lot of work from my perspective.

But, back to your question about astyle.

For me, this is not much work to add support for running astyle for multiple or single file program, but for your student it could be at least a week or two.

You are welcome. :)

Best,
Herman

@TeaObvious
Copy link
Author

We did not run MPI in parallel across multiple nodes, but we of course used parallel MPI Execution in a single node.

We modified it such, that you can't provide cmd parameters to the programm it self, instead the command line arguments are used to, for example, pass "-n 5" to mpirun.

Then we altered judge0/db/languages/active.rb a bit, such that it shows where the Code was executed: run_cmd: "./a.out && echo && echo Calculated on && cat /proc/sys/kernel/hostname"

How ever, i can't remember what else we hat to touch to make it usable.

Originally posted by @TeaObvious in oboha55/fahad#8 (comment)

@TeaObvious
Copy link
Author

I've asked our former student, who worked on this Project, to report what he knows, i left my teaching position, hence i have no overview anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants