How to install/build mumax3.10(beta) for Windows 10, CUDA v11.0, & gnuplot 5.2.8(soon to be 5.40!)?

523 views
Skip to first unread message

CA Trevillian

unread,
Jun 15, 2020, 3:01:19 AM6/15/20
to mumax2
Hello all!

I'd like to ask a question, or rather, some questions, and in doing so encourage a bit of a discussion to create a central font of unwritten common knowledge points regarding installation and compiling of mumax3 in its updated state, considering, of course, all dependent parts in their updated states. I note that the GitHub readme has not been updated since 2017, and there have been some updates to various parts of mumax3 since then. I note further that the installation process seems to be relatively straight forward for Ubuntu Linux, and so this question is not necessarily focused on this OS.

For the installation of the precompiled binary for mumax 3.10beta, which is the trivial method for installing mumax3 on Windows 10, a primary set of issues occur for many users: there are missing Cuda .dll files, and Gnuplot does not work!

Fortunately, the solution for the missing Cuda .dll files is a trivial one: one must merely include the .dll files noted within the same folder as the mumax 3.10beta executables. These files can be found via simple search engine query, packaged within a previous mumax3 release (I cannot recall which) or within the Nvidia website's archive of older Cuda releases.

For Gnuplot, the solution is not so trivial, as it is not readily apparent that one exists. While one could step nearly an entire version backward in time, this is, of course, not ideal. And so, we reach the first question:
How can one resolve the issue of Gnuplot not running on the precompiled binary for mumax 3.10beta? Consider the Gnuplot version to be 5.2.8+.

Please, be sure to note unwritten common knowledge points (read: implied) in detailing how to resolve these errors.

Now, here we reach some non-trivial questions that arise when one seeks to compile a set of binaries for their updated Windows 10 system. Some have implied knowledge solutions, while others do not have solutions at all. More or less, these questions all consider that one has followed the build instructions on the 2017 readme.
First, how to resolve the missing *.h Cuda files? After installing the updated Nvidia release of Cuda to the default installation path, here v11.0, one must create a Cuda folder such that C:/cuda exists, then migrate everything below cuda/v11.0 to be held within that folder, after this, one should not experience missing Cuda *.h related errors when running go install.

Unfortunately, now one encounters the following error:
In file included from C:/cuda/include/cuda_runtime_api.h:138,
                 from ..\..\cuda\cu\version.go:5:
C:/cuda/include/crt/host_defines.h:94: warning: "__cdecl" redefined
 #define __cdecl

<built-in>: note: this is the location of the previous definition"

How can this be resolved? There does not appear that there yet exists a solution that is made readily apparent.

After resolution or ignoring of the above error, however, it seems one must run go install within each of the folders within /cmd in order to compile each binary, is this normal?

Whether subsequent issues relating to Gnuplot exist after the resolution of the final Cuda related error remains to be seen, but one does not experience any errors when compiling the remaining executables. Unfortunately, likely due to the final Cuda related error, the executable does not bring up the interactive browser-based mumax3 GUI.

Please be aware that I'd like these answers to be consumable for those who do not have much experience, especially with command-line based programs. However, as one will note, some entry-level knowledge is necessary when compiling to binary.

My deepest thanks to you all in advance. I would very much like to be able to use mumax3, but as of right now, this does not seem to be possible due to the difficulties one encounters when trying to get the more updated version up and running.

h4...@eng.ucsd.edu

unread,
Jun 15, 2020, 3:06:04 AM6/15/20
to mumax2
Regarding the gnuplot corruption issue, I have downgrade the version back to 4.4.4 and it works pretty well in Win 10 OS. That is the only solution I have found working at this moment. 

CA Trevillian

unread,
Jun 15, 2020, 4:46:43 AM6/15/20
to mumax2
Hi Haowen,

Does this mean that you are only running Gnuplot v4.4.4? It appears to be only available as a 32bit binary, and as I am running a 64bit I do not know that I would be able to do such a downgrade. I do have several versions of Gnuplot installed, and I wonder if I would need to then only have a singular installed version, in this case of Gnuplot v4.4.4, in order for it to work?

It seems strange that one would need to use Gnuplot v4.4.4 when Silva's guide for mumax 3.9.1 and Gnuplot v5.2.x does exist--one would think then, that v5.2.x should work with 3.10beta, but this is not so.

I hope we may find a simple & easy way to resolve what seems to be such a trivial issue, as it would be great to encourage more to use mumax3.

Thanks for the response.

godsic

unread,
Jun 15, 2020, 5:39:13 AM6/15/20
to mumax2
Hi Cody,

There is no need to compile mumax3.

Please follow these steps:
Regrads,

-Mykola

CA Trevillian

unread,
Jun 15, 2020, 2:56:09 PM6/15/20
to mumax2
Hi Mykola,

Thanks for your response. The problem of not being able to use mumax still persists.

I was hoping this would work, but the mumax3 executable does not start apart from causing a cmd window to appear briefly.

To see if perhaps the procedure had enabled the Gnuplot region to be functional,
I tried again to use the mumax3 executable that does run, which one would get from the git repo,
but I still do not see a plot appear, and the Gnuplot area gives an additional error as such:

"write |1: The pipe has been ended."

if I do more than one run() of 1e-9 with my table.txt filling every 1e-11 seconds.

I will note that I have the mumax files placed in a different drive directory and that in the mumax that does run, the visual portion is functional, but there is no Gnuplot which appears.

Do I need to ensure that all other installations of CUDA and the Nvidia driver are removed? I did so with the Gnuplot, but not with the other instances of software.

I hope you may help me to get this tool running to what I know is its full capacity, but the mumax executable which you sent does not run on my system.

I am eager to know what you recommend?

Best,

Cody

h4...@eng.ucsd.edu

unread,
Jun 15, 2020, 3:32:26 PM6/15/20
to mumax2
The reason why you are getting *.dll missing (and probably all these craps) is due to the wrong version of CUDA installed. In principle, you should not need to have a cuda folder under C:\cuda, at least in my desktop there is no such requirement under Win10 OS. What CUDA installation did is adding its installation folder to PATH and your computer should recognize it immediately whenever you run a program. 

Remember, CUDA is really bad at comparability over different versions, especially they change the source code and function names after upgrade from v10 to v11. If you are expecting v11 (same case in gnuplot) will give you a bit of more productivity, you will get more pains than what you gain. 

I recommend to uninstall all things related to your existing mumax3, following the existing guide (especially install CUDA 10.0) again except replacing the mumax3 3.9 with 3.10 and gnuplot 5.2 with 4.4.4. I think this is an open source software, probably no one is paid to complete your requests. The whole point is to be able to run it with full functions but not try to extract ever bit of 'benefits' from the new version, though I do hope the authors could update it soon. Thanks.

Bests,
Haowen

CA Trevillian

unread,
Jun 15, 2020, 3:48:35 PM6/15/20
to mumax2
Hi Haowen,

The need to have cuda directly under c drive is for compiling purposes. I note this in my original question, and offer the solution. As for missing the .dll files, it is necessary to have them in your mumax folder, for which I also offered a solution in my original question. It is not due to an incorrect version of cuda being installed, unfortunately, the solution is just slightly less trivial than that.

Regarding your recommendation of using v4.4.4 of gnuplot, I cannot locate a binary which would allow this to occur, can you give a recommendation where one might find this? Even the 32bit zip file that exists on the gnuplot Sourceforge is not a compiled version.

As for my "requests", this is a forum for the purposes of using mumax and dealing with said issues, so, if not here, where else can I ask these questions? I seek only to ensure that future users do not encounter these issues as I have, even upon attempts to use the most trivial of options, that being the use of the precompiled binaries available on the github. I hope you understand that these inquires are entirely appropriate and necessary to help others overcome these same issues. I would think there should be no reason to resort to software which is nearly a decade old now, but I may be mistaken. Though, if this is necessary, it is unfortunate as one cannot readily locate a precompiled 32bit gnuplot v4.4.4 binary. I come from a place of wanting to help resolve my issue, while also ensuring that others are properly educated on how to avoid these problems, hence the format of my original question.

I'd like to explicitly note that the only true problem here is the inability to have gnuplot appropriately integrated with mumax as intended, all other issues are results of my attempts to compile to the newest versions of the software which mumax depends upon.

I hope this all makes sense. I do not understand why gnuplot is not appropriately integrating with mumax as it should be doing.

Best,

Cody

Mykola Dvornik

unread,
Jun 15, 2020, 4:08:16 PM6/15/20
to mum...@googlegroups.com
mumax3 is primarily a command line tool. By default, it does not open any web GUI to avoid dangling sessions. 
Nevertheless, mumax3 always serves GUI on the address provided in its console output.

The easiest way to describe a model in mumax3 is to use mumax script language and save it to the file with '.mx3' extension (you can find examples here). One can then associate files with '.mx3' extension with the mumax3 binary and then execute any model by simply double clicking on the corresponding '.mx3' file.

To easily start a GUI, one can create a shortcut to mumax3 binary on Desktop and then edit its properties to append ' -i' flag to the mumax3 binary, i.e., 'C:\path\to\mumax3 -i'.


--
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 on the web visit https://groups.google.com/d/msgid/mumax2/5fd21e2a-ac7d-4b0d-a0ac-8536e8f6b70do%40googlegroups.com.


--
 Mykola 

Mykola Dvornik

unread,
Jun 15, 2020, 4:17:38 PM6/15/20
to mum...@googlegroups.com
gnuplot is a completely independent open-source project. Its authors might at any point change its command line interface, API, ABI, etc. I am not sure if that's the reason gnuplot 5.2 does not work well with mumax3.10, but certainly something to keep in mind. Most of mumax3 development is done on Linux Long Time Support distributions. Those do not update packages to the very recent versions, making it hard to spot incompatibility issues earlier.

--
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.


--
 Mykola 

CA Trevillian

unread,
Jun 15, 2020, 4:22:06 PM6/15/20
to mumax2
Thank you Mykola! This is valuable information.

However, even with your recommendations, the mumax3 binary will not leave the console open upon executing it.
I feel I am missing something here, as the previous beta I had partial success with included a *-script.exe binary, which is what opened the console.

Is the binary you provided link for CUDA 10.2 not meant to be double-clicked on its own?
How can I start it up as I had seen in the *-script.exe binary?
Or is this not recommended, and I should just associate *.mx3 with the binary as you recommend?

I will attempt to remove all previous versions of CUDA and gnuplot and again attempt the installation process you recommended.
I am grateful for your valuable information and time in answering my many questions.

One final question then, and I hope I will be able to get this all running:
What is the version of gnuplot which you find works with the binary you linked to?

I am deeply thankful again for your replies & assistance.
To unsubscribe from this group and stop receiving emails from it, send an email to mum...@googlegroups.com.


--
 Mykola 

h4...@eng.ucsd.edu

unread,
Jun 15, 2020, 4:25:07 PM6/15/20
to mumax2
https://sourceforge.net/projects/gnuplot/files/gnuplot/4.4.4/ 
Download gp444win32.zip, then add the folder to your PATH in system variables. It still work well under 64 system. As far as I know, I don't think CUDA v11 is compatible with mumax3 and if you have executables downloaded from the github and install CUDA v10 correctly, you don't necessary need to put all *.dll file in the same folder as the mumax3.exe. As Mykola state before, the mumax3.exe doesn't need to be compiled before running. The best way is to follow his recommendations.

To be honest, I don't understand what do you mean by compiling purpose, isn't it supposes to be precompiled *.exe files? Are you trying to compile the file by yourself?

Bests,
Haowen

Mykola Dvornik

unread,
Jun 15, 2020, 4:26:17 PM6/15/20
to mum...@googlegroups.com
No worries, Cody.

It is a very good idea to start from scratch.

The last known gnuplot version that worked for me on Fedora 29 Linux was 5.0.

Cheers,

-Mykola

To unsubscribe from this group and stop receiving emails from it, send an email to mumax2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mumax2/90db9c96-68e0-45f6-9787-8331ad86fbcbo%40googlegroups.com.


--
 Mykola 

CA Trevillian

unread,
Jun 16, 2020, 11:45:03 AM6/16/20
to mumax2
Hey Mykola!

I was able to get it all up and running.

I learned a lot during the process (& I actually think I was successful with my compilation from source, but I was unaware of needing to use the flag " -i", though before I adjusted things, calling "mumax3 -i" from cmd.exe got the self-compiled program to run! [but since I deleted everything from before it was very sad/mad about running, haha!]).

To be honest, this was my first time really interacting with a command-line based program, but you and Haowen helped me amazingly!

I found that the API & mumax website accessed through Ghent was more complete for my needs.

The only thing I had thought was that during the interactive mode that the gnuplot was dynamically updated while the simulation would "run()", as one would see in OOMMF, but I can see now how it might be a bit difficult to do something like that.

I am excited to start some awesome development in mumax now, so thank you so very much!
This will help amazingly for my research work, and I will have fun trying to add various features to my own set-up as I progress in my skill level.

I am curious also where I might find an API on the mumax-convert?

Best,

Cody

Joshua Lauzier

unread,
Jun 16, 2020, 2:20:45 PM6/16/20
to mumax2
Hello Cody,

I just wanted to mention that i am successfully using gnuplot version 5.0, patchlevel 7 (gnuplot says last modified 8-16-2017), on a windows 10 machine. I am using the pre-compiled binary Mykola provided. (Note, however, the older version is probably fine. a 64bit machine will run 32 bit without issue). It's been awhile, but if i recall i did have to add it to the PATH variable, otherwise no other tweaks necessary.

You should be able to get gnuplot to update dynamically if you write the appropriate variables to the .txt file. For instance, in the hysteresis loop example on the mumax3 examples page, if you plot 5 and 2, it will give an MvsH loop (in the txt file, by default column 5 is M values, column 2 are H values). You do not need to do this with state variables. If you save snapshots at some predefined timestep, you can generate a similar plot at various intervals.


Best,
Josh L.
Reply all
Reply to author
Forward
0 new messages