Running batch files in Windows

22 views
Skip to first unread message

Payal Bhattacharjee

unread,
Dec 19, 2025, 12:07:45 AM12/19/25
to mumax2
Dear all,
Can you please tell me how to run batch processing in MuMax3 for a temperature sweep (Windows version)?
Thank you in advance.

Josh Lauzier

unread,
Dec 20, 2025, 6:05:07 AM12/20/25
to mumax2
Hi,

There are a couple different ways to do this, depending.

1) Within your mumax script, you can add a for-loop that iterates over temperature. However, when you do this, be sure to reset your initial magnetization state at the start of the loop.
2) You can input multiple scripts when you start mumax. Instead of doing "mumax3 script.mx3", mumax accepts multiple files, so you can do "mumax3 script1.mx3  script2.mx3  script3.mx3" 
3) You can use something like Python to autogenerate multiple files.

Each way is equivalent. The mumax workshop has examples for method 1 and 3, in session 4. 1 is probably the simplest way, whereas method 3 with Python is convenient because you can also automate things like plotting the results as a part of the Python script. The example script in the workshop includes code for this to generate plots for the VCMA gate example.

Best,
Josh L.

Payal Bhattacharjee

unread,
Dec 20, 2025, 10:05:39 AM12/20/25
to mum...@googlegroups.com
Thank you so much for the solution. 

--
You received this message because you are subscribed to the Google Groups "mumax2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mumax2+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mumax2/741674fc-d415-47cc-a095-c8d112a4e1afn%40googlegroups.com.

Yuki Liu

unread,
Dec 20, 2025, 11:01:47 AM12/20/25
to mumax2
This is what answered by AI
@echo off
echo start...
cd /d "C:\Your\Project\Path"
python script1.py
python script2.py
xcopy results.log backup\ /y
echo end!
pause

Reply all
Reply to author
Forward
0 new messages