OK! So, for context, what happens when you load your package, i.e. when you do using JuliaPetra is that the JuliaPetra.jl file is executed, and that’s basically it. Looking at this file, it includes a bunch of other files (that’s the typical organization for a big package) so you probably want to include them as well in your main.jl file, especially Comm.jl since it includes the definition of the Comm type, without which there is no way julia can guess what Comm refers to (hence the UndefVarError).
Now, since it looks like you want to explore the JuliaPetra package, what I think should be easier is to move main.jl somewhere else, out of the JuliaPetra directory, and just write using JuliaPetra somewhere at the top: that way, everything exported by JuliaPetra will be imported in your main.jl script, and you can use them all for your experiments. You don’t need to do any other include(...).
If you want to modify the files in the JuliaPetra package and see the effect in your main.jl script, note that you will have to do pkg> dev /your/path/to/JuliaPetra in your REPL (just once) so that julia knows that the JuliaPetra package it must look at is not the registered JuliaPetra but the local one on your computer.