

コマンドプロンプトからファイルを読み込む際にエラーが起きます。

[code]

    include("c:\\Users\\name\\desktop\\test.jl")
    ERROR: LoadError: syntax: invalid character "."
    Stacktrace:
     [1] include at .\boot.jl:317 [inlined]
     [2] include_relative(::Module, ::String) at .\loading.jl:1044
     [3] include(::Module, ::String) at .\sysimg.jl:29
     [4] include(::String) at .\client.jl:392
     [5] top-level scope at none:0
    in expression starting at c:\Users\name\desktop\test.jl:71
    
[/code]

このcharacter"."というのがどこのことを指しているのかわかりません、しかも読み込むコードはほかのエディタでは問題なく動くのですが。。読み込む際のエディタはメモ帳で行っています。  
メモ帳(test.jl)の中身

[code]

    function run(itr)
        n = 27
        c0=zeros(Int,nthreads())
        c1=zeros(Int,nthreads())
        c2=zeros(Int,nthreads())
        c3=zeros(Int,nthreads())
        c4=zeros(Int,nthreads())
        c5=zeros(Int,nthreads())
        @threads for i in 1:itr
            walk = zeros(Int8,n,n,n)
            walk[1,1,1]=1
            for t in 0:3600
                next_walk = zeros(Int8,n,n,n)
                number=rand(UnitRange{Int8}(1:6))
                if t==0
                    c0[threadid()] += 1
                else
                    for x = 1:n, y = 1:n, z =1:n
                        x1 = ((x-1 + (n-1)) %n) + 1
                        x2 = ((x+1 + (n-1)) %n) + 1
                        y1 = ((y-1 + (n-1)) %n) + 1
                        y2 = ((y+1 + (n-1)) %n) + 1
                        z1 = ((z-1 + (n-1)) %n) + 1 
                        z2 = ((z+1 + (n-1)) %n) + 1
                        if Stage[x,y,z]== 0
                            continue
                        else
                            if walk[x,y,z]== 0
                                continue
                            else
                                if number == 1
                                    if Stage[x2,y,z]==1
                                        next_walk[x2,y,z]=walk[x,y,z]
                                    else
                                        next_walk[x,y,z]=walk[x,y,z]
                                    end
                                elseif number == 2
                                    if Stage[x,y2,z]==1
                                        next_walk[x,y2,z]=walk[x,y,z]
                                    else
                                        next_walk[x,y,z]=walk[x,y,z]
                                    end
                                elseif number == 3
                                    if Stage[x,y,z2]==1
                                        next_walk[x,y,z2]=walk[x,y,z]
                                    else
                                        next_walk[x,y,z]=walk[x,y,z]
                                    end
                                elseif number == 4
                                    if Stage[x1,y,z]==1
                                        next_walk[x1,y,z]=walk[x,y,z]
                                    else
                                        next_walk[x,y,z]=walk[x,y,z]
                                    end
                                elseif number == 5
                                    if Stage[x,y1,z]==1
                                        next_walk[x,y1,z]=walk[x,y,z]
                                    else
                                        next_walk[x,y,z]=walk[x,y,z]
                                    end
                                elseif number == 6
                                    if Stage[x,y,z1]==1
                                        next_walk[x,y,z1]=walk[x,y,z]
                                    else
                                        next_walk[x,y,z]=walk[x,y,z]
                                    end
                                end
                            end
                        end
                    end
                　　walk = copy(next_walk)
                #println(t,walk,"\n")
                if t == 2 && walk[1,1,1]==1
                    c1[threadid()] += 1
                elseif t == 4 && walk[1,1,1]==1
                    c2[threadid()] += 1
                elseif t==6 && walk[1,1,1]==1
                    c3[threadid()] += 1
                elseif t == 16 && walk[1,1,1]==1
                    c4[threadid()] += 1
                elseif t==36 && walk[1,1,1]==1
                    c5[threadid()] +=1
                else
                    continue
                end
                end
            end
        end
        println("t=0:",sum(c0),"\n","t=2:",sum(c1),"\n","t=4:",sum(c2),"\n","t=6:",sum(c3))
        println("t=16:",sum(c4),"\n","t=36:",cum(c5))
    end
    
[/code]


CC BY-SA 4.0
2018-12-01T04:26:16.593
50799
2018-12-08T17:08:08.000
29111
question
julia
ファイルの読み込み時のエラーの解決策がわからない


上のプログラムに加えて先頭に  
using Base.Threads()  
using Benchmark.Tools  
などを加えるだけで解決しました。  
ただ走らせる前にコマンドプロンプト上で  
set(macならexport)JULIA_NUM_THREADS = スレッド数  
としてから>Julia→>using IJulia>notebook()としました


CC BY-SA 4.0
2018-12-08T17:08:08.000
51046
2018-12-08T17:08:08.000
29111
50799
answer