如何在命令行中执行Julia代码? [英] How to exectute Julia code in command line?

查看:433
本文介绍了如何在命令行中执行Julia代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在用Julia转移我的代码.我想知道如何在命令行中执行Julia代码?

I have been recently transfer my code in Julia. I'm wondering how to exectute Julia code in command line?

我知道可以通过运行一次Julia代码来进行编译.

I know the Julia code can be complied by running it once.

但是,我需要为集群上的仿真模型进行参数扫描,在这里我只能使用命令行,而不能使用REPL.

But the thing is I need to do parameter sweep for my simulation models on the cluster, where I could only use command line -- not the REPL.

在集群上运行模拟复制的最佳实践是什么?

What is the best practice to run simulation replications on the cluster?

推荐答案

忘记了我已经设法从群集上的命令行运行Julia.

Forgot to mention that I've managed to run Julia from command line on the cluster.

在PBS作业脚本中,您可以添加julia run_mytest.jl $parameter.在run_mytest.jl中,您可以添加

In the PBS job script, you can add julia run_mytest.jl $parameter. In the run_mytest.jl, you can add

include("mytest.jl")
arg = parse(Float64, ARGS[1])
mytest(arg)

这篇关于如何在命令行中执行Julia代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆