Hi Pradeep,
The domain wall does seem a bit strange. I don't get it for using RandomMagSeed(3), but i do for RandomMagSeed(2). It seems likely it's just an artifact of the relax method for that specific configuration. Sometimes you need to nudge the system. How to do so is a bit of an art, but here are some suggestions-
You can use the run() command, instead of relax. This is much slower, but you can apply a finite temperature (temperature is disabled for relax) using 'Temp=100', which can help avoid these metastable states. If you do use run(), make sure to set an alpha (doesn't necessarily have to be reasonable, you can set a fairly large one like 0.05, just to damp the dynamics). You can also start with run(), then switch to relax() to get to the full ground state, or even minimize() at the end. Run() is a lot slower than relax, so there is a trade off, but if you plan on keeping this small system size it's not terribly long.
You would do this by replacing relax() with say
alpha=0.05
temp=100
run(1e-9)
relax()
Where 1e-9 tells run how long to go for. i chose 1ns arbitrarily, you can reduce this. you just need a little bit, to help relax out a bit initially. If you only use run instead of relax(), you need to run for sufficiently long that you're reasonably confident you're in equilibrium.
Instead of temperature, you can also add some random noise to the magnetization itself.
Often applying a very small external field can help by breaking symmetry.
Changing the system size can also do the trick. I wasn't noticing walls for SetGridSize(128, 128, 16), for instance. I'm not sure if in this case is because the energy penalty was higher for this system, or the state was simply not stable with some extra spins.
Which one is best is often preference. For the script you posted, run() is a pretty easy one though, without too much longer simulation time.
Best,
Josh L.