madsjulia / Mads.jl

MADS: Model Analysis & Decision Support
http://mads.gitlab.io
GNU General Public License v3.0
101 stars 20 forks source link

Getting problems when running package tests. #16

Closed AIAdventures closed 7 years ago

AIAdventures commented 7 years ago

"allwellson!"
"amanzi"
"asinetransform"
"bayessampling"
"calibrate"
"calibraterandom"
"checkmodeloutputdirs"
"checkout"
"checkparameterranges"
"cleancoverage"
"commit"
"computemass"
"computeparametersensitities"
"contamination"
"copyright"
"createmadsproblem"
"createobservations!"
"createtempdir"
"debuglevel"
"deleteNaN!"
"deletekeyword!"
"dependents"
"display"
"dobigdt"
"documentfunction"
"dpi"
"dumpasciifile"
"dumpjsonfile"
"dumpwelldata"
"dumpyamlfile"
"dumpyamlmadsfile"
"efast"
"emceesampling"
"estimationerror"
"expcov"
"exponentialvariogram"
"filterkeys"
"forward"
"forwardgrid"
"free"
"funcname"
"functions"
"gaussiancov"
"gaussianvariogram"
"getcovmat"
"getcovvec!"
"getdictvalues"
"getdir"
"getdistribution"
"getextension"
"getfunction"
"getfunctionarguments"
"getfunctionkeywords"
"getimportantsamples"
"getlogparamkeys"
"getmadsdir"
"getmadsinputfile"
"getmadsproblemdir"
"getmadsrootname"
"getnextmadsfilename"
"getnonlogparamkeys"
"getnonoptparamkeys"
"getobsaltnames"
"getobsdefault"
"getobsdist"
"getobskeys"
"getobslog"
"getobslogdefault"
"getobsmax"
"getobsmin"
"getobsnames"
"getobstarget"
"getobstime"
"getobstypes"
"getobsweight"
"getoptparamkeys"
"getoptparams"
"getparamdict"
"getparamdistributions"
"getparamkeys"
"getparamrandom"
"getparamsdefault"
"getparamsinit"
"getparamslog"
"getparamslogdefault"
"getparamslongname"
"getparamsmax"
"getparamsmin"
"getparamsnames"
"getparamsplotname"
"getparamsstep"
"getparamstype"
"getparamstypes"
"getprocs"
"getrestart"
"getrestartdir"
"getrootname"
"getsindx"
"getsourcekeys"
"gettarget"
"gettargetkeys"
"gettime"
"getweight"
"getwellkeys"
"getwellsdata"
"graphbackend"
"graphoff"
"graphon"
"graphoutput"
"haskeyword"
"help"
"importeverywhere"
"index"
"indexkeys"
"instline2regexs"
"invobsweights!"
"invwellweights!"
"islog"
"isobs"
"isopt"
"isparam"
"ispkgavailable"
"keywordname"
"keywordvalsNOT"
"krige"
"linktempdir"
"loadasciifile"
"loadjsonfile"
"loadmadsfile"
"loadsaltellirestart!"
"loadyamlfile"
"localsa"
"madsbash"
"madscores"
"madscritical"
"madsdebug"
"madsdir"
"madserror"
"madsgit"
"madsinfo"
"madsinputfile"
"madsload"
"madsmathprogbase"
"madsmodules"
"madsoutput"
"madsservers"
"madsup"
"madswarn"
"makearrayconditionalloglikelihood" "makearrayfunction"
"makearrayloglikelihood"
"makebigdt"
"makebigdt!"
"makecomputeconcentrations"
"makedixonprice"
"makedoublearrayfunction"
"makelmfunctions"
"makelocalsafunction"
"makelogprior"
"makemadscommandfunction"
"makemadscommandfunctionandgradient" "makemadscommandgradient"
"makemadsconditionalloglikelihood"
"makemadsloglikelihood"
"makemadsreusablefunction"
"makempbfunctions"
"makepowell"
"makerosenbrock"
"makerotatedhyperellipsoid"
"makesphere"
"makesumsquares"
"maxtorealmax!"
"meshgrid"
"mkdir"
"modelinformationcriteria"
"modelruns"
"modobsweights!"
"modwellweights!"
"montecarlo"
"noplot"
"obslineismatch"
"of"
"outputoriginal"
"outputread"
"outputreader"
"outputwrite"
"paramarray2dict"
"paramdict2array"
"parsemadsdata!"
"parsenodenames"
"partialof"
"plotgrid"
"plotmadsproblem"
"plotmass"
"plotmatches"
"plotobsSAresults"
"plotrobustnesscurves"
"plotseries"
"plotwellSAresults"
"printSAresults"
"printSAresults2"
"printerrormsg"
"push"
"pyyamlok"
"quiet"
"quietdefault"
"quietoff"
"quieton"
"readasciipredictions"
"readjsonpredictions"
"readmodeloutput"
"readobservations"
"readyamlpredictions"
"regexs2obs"
"reload"
"removesource!"
"removesourceparameters!"
"required"
"resetmodelruns"
"residuals"
"restart"
"restartoff"
"restarton"
"reweighsamples"
"rmdir"
"rmfile"
"rosenbrock"
"runcmd"
"runremote"
"saltelli"
"saltellibrute"
"saltellibruteparallel"
"saltelliparallel"
"sampling"
"savecalibrationresults"
"savemadsfile"
"savemcmcresults"
"savesaltellirestart"
"scatterplotsamples"
"searchdir"
"setallparamsoff!"
"setallparamson!"
"setdebuglevel"
"setdefaultplotformat"
"setdir"
"setdynamicmodel"
"setmadsinputfile"
"setmodelinputs"
"setnewmadsfilename"
"setobservationtargets!"
"setobstime!"
"setobsweights!"
"setparamoff!"
"setparamon!"
"setparamsdistnormal!"
"setparamsdistuniform!"
"setparamsinit!"
"setplotfileformat"
"setprocs"
"setseed"
"settarget!"
"settime!"
"setverbositylevel"
"setweight!"
"setwellweights!"
"showallparameters"
"showobservations"
"showparameters"
"sinetransform"
"sinetransformfunction"
"sinetransformgradient"
"spaghettiplot"
"spaghettiplots"
"sphericalcov"
"sphericalvariogram"
"sprintf"
"status"
"stdoutcaptureoff"
"stdoutcaptureon"
"svrFeature"
"svrOutput"
"symlinkdir"
"symlinkdirfiles"
"tag"
"test"
"testj"
"transposematrix"
"transposevector"
"verbositylevel"
"void2nan!"
"weightedstats"
"welloff!"
"wellon!"
"wells2observations!"
"writeparameters"
"writeparametersviatemplate"
"yaml" INFO: Anasol functions: 22-element Array{Any,1}: "@code"
"Anasol"
"boundaryexpr"
"boundarynames"
"cinnerkernel"
"dispersionnames"
"dispersiontimedependenceexpr" "distributionexprs"
"getboundaries"
"getdispersions"
"getinitdispersionfactor"
"getsources"
"inclosedinterval"
"infinitedomainexpr"
"innerkernel"
"kernel"
"maxnumberofdimensions"
"quadgkwithtol"
"retexpr"
"sourcenames"
"standardnormal"
"symbolindex" INFO: AffineInvariantMCMC functions: 3-element Array{Any,1}: "AffineInvariantMCMC" "flattenmcmcarray"
"sample" INFO: GeostatInversion functions: 15-element Array{Any,1}: "FDDerivatives"
"FFTRF"
"GeostatInversion"
"LowRankCovMatrix"
"PCGALowRankMatrix"
"RandMatFact"
"getxis"
"pcga"
"pcgadirect"
"pcgadirectiteration!" "pcgalsqr"
"pcgalsqriteration"
"randsvdwithseed"
"rga"
"srga" INFO: BIGUQ functions: 15-element Array{Any,1}: "BIGUQ"
"BigDT"
"BigOED"
"dataframeresults"
"dobigoed"
"generateproposedobs"
"getfailureprobabilities"
"getmcmcchain"
"getrobustness"
"getrobustnesscurve"
"inbox"
"makebigdts"
"makedecision"
"makedecisionforproposedobs" "printresults" INFO: ReusableFunctions functions: 15-element Array{Any,1}: "ReusableFunctions"
"checkfunctionkeywords" "checkhashfilename"
"computes"
"getfunctionkeywords"
"gethashfilename"
"loadresultfile"
"maker3function"
"quiet"
"quietoff"
"quieton"
"resetcomputes"
"resetrestarts"
"restarts"
"saveresultfile" INFO: RobustPmap functions: 4-element Array{Any,1}: "RobustPmap"
"checkexceptions" "crpmap"
"rpmap" INFO: MetaProgTools functions: 7-element Array{Any,1}: "MetaProgTools"
"getsymbols"
"in"
"populateexpression" "populateexpression!" "replacesymbol"
"replacesymbol!" INFO: SVR functions: 18-element Array{Any,1}: "@cachedsym"
"LINEAR"
"POLY"
"PRECOMPUTED"
"RBF"
"SIGMOID"
"SVR"
"freemodel"
"liboutput"
"loadmodel"
"mapnodes"
"mapparam"
"predict"
"readlibsvmfile" "savemodel"
"svmmodel"
"train"
"verbosity" INFO: Mads functions: 1-element Array{Any,1}: "createmadsproblem"INFO: Mads functions: 1-element Array{Any,1}: "loadmadsfile"WARNING: 2017-05-16 23:15:23 Requested format (TIFF) is not acceptable! (PNG|PDF|PS|SVG) WARNING: File mads.png is missing! filename = "test.png" Couldn't get a file descriptor referring to the console WARNING: 2017-05-16 23:16:02 Keyword ssdr already exists INFO: Git status Mads ... INFO: Git status Anasol ... INFO: Git status AffineInvariantMCMC ... INFO: Git status GeostatInversion ... INFO: Git status BIGUQ ... INFO: Git status ReusableFunctions ... INFO: Git status RobustPmap ... INFO: Git status MetaProgTools ... INFO: Git status SVR ... WARNING: Unknown parallel environment! WARNING: No processors found to add! INFO: Number of processors: 1 [1]

failed process: Process(/usr/bin/julia -Cx86-64 -J/usr/lib/x86_64-linux-gnu/julia/sys.so --compile=yes --depwarn=yes --check-bounds=yes --code-coverage=none --color=yes --compilecache=yes /home/andrewcz/.julia/v0.5/Mads/test/runtests.jl, ProcessExited(1)) [1]

================================================================================ ERROR: Mads had test errors in #test#61(::Bool, ::Function, ::Array{AbstractString,1}) at ./pkg/entry.jl:748 in (::Base.Pkg.Entry.#kw##test)(::Array{Any,1}, ::Base.Pkg.Entry.#test, ::Array{AbstractString,1}) at ./:0 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}})() at ./pkg/dir.jl:31 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}}, ::String) at ./file.jl:59 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at ./pkg/dir.jl:31 in (::Base.Pkg.Dir.#kw##cd)(::Array{Any,1}, ::Base.Pkg.Dir.#cd, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at ./:0 in #test#3(::Bool, ::Function, ::String, ::Vararg{String,N}) at ./pkg/pkg.jl:258 in test(::String, ::Vararg{String,N}) at ./pkg/pkg.jl:258

julia>

AIAdventures commented 7 years ago

really interested in the package

AIAdventures commented 7 years ago

trying to run the tests.

montyvesselinov commented 7 years ago

There seems to be a problem with PyCall; can you test it Pkg.test("PyCall")

AIAdventures commented 7 years ago

julia> include(Mads.madsdir * "/../examples/contamination/contamination.jl") ERROR: LoadError: PyError (:PyObject_Call) <class 'TypeError'> TypeError('cannot use a string pattern on a bytes-like object',) File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/init.py", line 70, in load loader = Loader(stream) File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/loader.py", line 34, in init Reader.init(self, stream) File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/reader.py", line 85, in init self.determine_encoding() File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/reader.py", line 135, in determine_encoding self.update(1) File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/reader.py", line 169, in update self.check_printable(data) File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/reader.py", line 139, in check_printable match = self.NON_PRINTABLE.search(data)

in pyerr_check at /home/andrewcz/.julia/v0.5/PyCall/src/exception.jl:56 [inlined] in pyerr_check at /home/andrewcz/.julia/v0.5/PyCall/src/exception.jl:61 [inlined] in macro expansion at /home/andrewcz/.julia/v0.5/PyCall/src/exception.jl:81 [inlined] in #_pycall#66(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::IOStream, ::Vararg{IOStream,N}) at /home/andrewcz/.julia/v0.5/PyCall/src/PyCall.jl:549 in _pycall(::PyCall.PyObject, ::IOStream, ::Vararg{IOStream,N}) at /home/andrewcz/.julia/v0.5/PyCall/src/PyCall.jl:537 in #pycall#70(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::Type{PyCall.PyAny}, ::IOStream, ::Vararg{IOStream,N}) at /home/andrewcz/.julia/v0.5/PyCall/src/PyCall.jl:571 in pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::IOStream, ::Vararg{IOStream,N}) at /home/andrewcz/.julia/v0.5/PyCall/src/PyCall.jl:571 in #call#71(::Array{Any,1}, ::PyCall.PyObject, ::IOStream, ::Vararg{IOStream,N}) at /home/andrewcz/.julia/v0.5/PyCall/src/PyCall.jl:574 in #loadyamlfile#41(::Bool, ::Function, ::String) at /home/andrewcz/.julia/v0.5/Mads/src/MadsYAML.jl:23 in (::Mads.#kw##loadyamlfile)(::Array{Any,1}, ::Mads.#loadyamlfile, ::String) at ./:0 in #loadmadsfile#6(::Bool, ::String, ::Function, ::String) at /home/andrewcz/.julia/v0.5/Mads/src/MadsIO.jl:29 in loadmadsfile(::String) at /home/andrewcz/.julia/v0.5/Mads/src/MadsIO.jl:28 in include_from_node1(::String) at ./loading.jl:488 while loading /home/andrewcz/.julia/v0.5/Mads/examples/contamination/contamination.jl, in expression starting on line 12

julia>

AIAdventures commented 7 years ago

so ran tests with pycall. no errors. the build still came back with errors. Many thanks, Best, Andrew

montyvesselinov commented 7 years ago

definitely the problem is in the python call to invoke YAML.

can you try this (you replace the respectve line in examples/contamination/contamination.jl).

md = Mads.loadmadsfile("w01.mads", julia=true)

AIAdventures commented 7 years ago

julia> include(Mads.madsdir * "examples/contamination/contamination.jl") ERROR: UndefVarError: Mads not defined

AIAdventures commented 7 years ago

i recently updated julia to the latest version.

AIAdventures commented 7 years ago

im not sure if this makes a difference.

montyvesselinov commented 7 years ago

You need to import mads again. On Tue, May 16, 2017 at 6:20 PM AIAdventures notifications@github.com wrote:

im not sure if this makes a difference.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/madsjulia/Mads.jl/issues/16#issuecomment-301950436, or mute the thread https://github.com/notifications/unsubscribe-auth/AFXxeDB323yFtzRmyYfv1z4_fsAW27otks5r6j1lgaJpZM4Nceu1 .

-- -monty

AIAdventures commented 7 years ago

image

AIAdventures commented 7 years ago

image

montyvesselinov commented 7 years ago

Oh. Julia changed. You need slash before examples. On Tue, May 16, 2017 at 6:47 PM AIAdventures notifications@github.com wrote:

[image: image] https://cloud.githubusercontent.com/assets/26102503/26133910/2b4c6c32-3aee-11e7-989a-55ad68224213.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/madsjulia/Mads.jl/issues/16#issuecomment-301953897, or mute the thread https://github.com/notifications/unsubscribe-auth/AFXxeCongChdY3DlmBeXNmTvgZjf14msks5r6kOOgaJpZM4Nceu1 .

-- -monty

AIAdventures commented 7 years ago

image

montyvesselinov commented 7 years ago

Mads.madsdir * "/../examples/contamination/contamination.jl"

AIAdventures commented 7 years ago

julia> include(Mads.madsdir * "/../examples/contamination/contamination.jl") ERROR: LoadError: PyError (:PyObject_Call) <class 'TypeError'> TypeError('cannot use a string pattern on a bytes-like object',) File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/init.py", line 70, in load loader = Loader(stream) File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/loader.py", line 34, in init Reader.init(self, stream) File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/reader.py", line 85, in init self.determine_encoding() File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/reader.py", line 135, in determine_encoding self.update(1) File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/reader.py", line 169, in update self.check_printable(data) File "/home/andrewcz/miniconda3/lib/python3.5/site-packages/yaml/reader.py", line 139, in check_printable match = self.NON_PRINTABLE.search(data)

in pyerr_check at /home/andrewcz/.julia/v0.5/PyCall/src/exception.jl:56 [inlined] in pyerr_check at /home/andrewcz/.julia/v0.5/PyCall/src/exception.jl:61 [inlined] in macro expansion at /home/andrewcz/.julia/v0.5/PyCall/src/exception.jl:81 [inlined] in #_pycall#66(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::IOStream, ::Vararg{IOStream,N}) at /home/andrewcz/.julia/v0.5/PyCall/src/PyCall.jl:549 in _pycall(::PyCall.PyObject, ::IOStream, ::Vararg{IOStream,N}) at /home/andrewcz/.julia/v0.5/PyCall/src/PyCall.jl:537 in #pycall#70(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::Type{PyCall.PyAny}, ::IOStream, ::Vararg{IOStream,N}) at /home/andrewcz/.julia/v0.5/PyCall/src/PyCall.jl:571 in pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::IOStream, ::Vararg{IOStream,N}) at /home/andrewcz/.julia/v0.5/PyCall/src/PyCall.jl:571 in #call#71(::Array{Any,1}, ::PyCall.PyObject, ::IOStream, ::Vararg{IOStream,N}) at /home/andrewcz/.julia/v0.5/PyCall/src/PyCall.jl:574 in #loadyamlfile#41(::Bool, ::Function, ::String) at /home/andrewcz/.julia/v0.5/Mads/src/MadsYAML.jl:23 in (::Mads.#kw##loadyamlfile)(::Array{Any,1}, ::Mads.#loadyamlfile, ::String) at ./:0 in #loadmadsfile#6(::Bool, ::String, ::Function, ::String) at /home/andrewcz/.julia/v0.5/Mads/src/MadsIO.jl:29 in loadmadsfile(::String) at /home/andrewcz/.julia/v0.5/Mads/src/MadsIO.jl:28 in include_from_node1(::String) at ./loading.jl:488 while loading /home/andrewcz/.julia/v0.5/Mads/examples/contamination/contamination.jl, in expression starting on line 12

julia>

montyvesselinov commented 7 years ago

please use md = Mads.loadmadsfile("w01.mads", julia=true) instead of md = Mads.loadmadsfile("w01.mads")

AIAdventures commented 7 years ago

julia> ^C

julia> md = Mads.loadmadsfile("w01.mads", julia=true) Dict{Any,Any} with 7 entries: "Grid" => Dict{Any,Any}(Pair{Any,Any}("zmax",50),Pair{Any,Any}("time",50),Pair{Any,Any}("xcount",33),Pair{Any,Any}("zcount",1),Pair{Any,Any}("ymin",1000),Pair{Any,Any}("zmin",0),Pair{Any,Any}("ycount",19),Pair{Any,Any}("xmax",2… "Sources" => Dict{Any,Any}[Dict{Any,Any}(Pair{Any,Any}("box",Dict{Any,Any}(Pair{Any,Any}("dz",Dict{Any,Any}(Pair{Any,Any}("longname","Source z dimension [L]"),Pair{Any,Any}("step",1.0),Pair{Any,Any}("init",1.0),Pair{Any,Any}("log"… "Parameters" => DataStructures.OrderedDict{Any,Any}("n"=>Dict{Any,Any}(Pair{Any,Any}("longname","Porosity [L3/L3]"),Pair{Any,Any}("step",0.1),Pair{Any,Any}("init",0.1),Pair{Any,Any}("log",false),Pair{Any,Any}("min",0.0),Pair{Any,Any}… "Wells" => DataStructures.OrderedDict{Any,Any}("w1a"=>Dict{Any,Any}(Pair{Any,Any}("obs",Dict{Any,Any}[Dict{Any,Any}(Pair{Any,Any}("weight",1),Pair{Any,Any}("c",0),Pair{Any,Any}("max",1.0e6),Pair{Any,Any}("log","no"),Pair{Any,Any… "Time" => Dict{Any,Any}(Pair{Any,Any}("step",1),Pair{Any,Any}("start",1),Pair{Any,Any}("end",50)) "Observations" => DataStructures.OrderedDict{Any,Any}("w1a_1"=>DataStructures.OrderedDict{Any,Any}("well"=>"w1a","time"=>1,"index"=>1,"target"=>0,"weight"=>1,"max"=>1.0e6,"log"=>"no","min"=>0),"w1a_2"=>DataStructures.OrderedDict{Any,An… "Filename" => "w01.mads"

julia>

montyvesselinov commented 7 years ago

so it works.

AIAdventures commented 7 years ago

screenshot_2017-05-17_11-02-22

AIAdventures commented 7 years ago

think this still issues with pycall

montyvesselinov commented 7 years ago

yes. that is why you need to replace in /home/andrewcz/.julia/v0.5/Mads/examples/contamination/contamination.jl

md = Mads.loadmadsfile("w01.mads")

with

md = Mads.loadmadsfile("w01.mads", julia=true)

AIAdventures commented 7 years ago

image

montyvesselinov commented 7 years ago

include("/home/andrewcz/.julia/v0.5/Mads/examples/contamination/contamination.jl")

AIAdventures commented 7 years ago

image

montyvesselinov commented 7 years ago

yes. that is why you need to replace in /home/andrewcz/.julia/v0.5/Mads/examples/contamination/contamination.jl

md = Mads.loadmadsfile("w01.mads")

with

md = Mads.loadmadsfile("w01.mads", julia=true)

AIAdventures commented 7 years ago

include(Mads.madsdir * "/home/andrewcz/.julia/v0.5/Mads/examples/contamination/contamination.jl")

montyvesselinov commented 7 years ago

replace in /home/andrewcz/.julia/v0.5/Mads/examples/contamination/contamination.jl

md = Mads.loadmadsfile("w01.mads")

with

md = Mads.loadmadsfile("w01.mads", julia=true)

AIAdventures commented 7 years ago

ah ok, thankyou :)

montyvesselinov commented 7 years ago

YAML.load failure catch added now; checkout the latest.