mumax / 3

GPU-accelerated micromagnetic simulator
Other
454 stars 150 forks source link

mumax3-convert -xrange 50:100 -yrange :100 file.ovf #312

Open Ailsa85 opened 2 years ago

Ailsa85 commented 2 years ago

mumax3-convert -xrange 50:100 -yrange :100 file.ovf can't run? and prompt the error: input and output file are the same……who can help me ?

JonathanMaes commented 2 days ago

It seems that you are running the example commands from the documentation, but it appears that this documentation has not been updated in the past decade. I will check these example commands to ensure they work as intended. Possible culprit: 586700c

jplauzie commented 2 days ago

If you run mumax3-convert -xrange 50:100 -yrange :100 file.ovf example verbatim, it will just tell you to pick a file output, with a flag like -png or -ovf etc. It is a bit of a stub, in that regard.

The main error "input and output file are the same" is caused if you select -ovf or -ovf2 as the output specifically. The new file will automatically also be called "file.ovf", the same as the original file. You can't have 2 files named file.ovf in the same directory, so it errors. (this happens regardless of xrange/yrange flags). There is no option to rename the output file, it's automatically generated. This isn't an issue if you're converting to another format, like png, since the new file will be "file.png" instead.

The current workaround is to use -o to send the output to another directory. You can also use an input file from a different directory. It's only an issue when both input and output are in the same directory (typically comes up when they're both in the current working directory). E.g.

mumax3-convert -ovf="text" -o="C:\Users\Josh\Documents\mumax3_11\testfile.out" mtest.ovf

will work (if I'm calling mumax3-convert while i'm in the "C:\Users\Josh\Documents\mumax3_11" folder and there is no existing file named mtest.ovf within the testfile.out subfolder).

mumax3-convert -ovf="text" mtest.ovf

will not work, because there is already a file called mtest.ovf in the current directory.

Best, Josh L.