-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile a Windows Executable for the Coastal Dune Model #96
Comments
@micitz @mcflugen has a fork and branch of the CDM repository where he builds the model with CMake (if you haven't used it, CMake is a wonderful tool that allows cross-platform builds) using conda to handle dependencies. I haven't tried it on Windows, but I think this would be a good place to start. Let me know how it goes; I'm not a Windows expert, but if you run into problems, I can try to help. |
Thanks for the help! I've gotten to the I've tried some solutions including using minGW, GnuWin, and chocolatey but none of them have been successful they all cause the No targets specified and no makefile found error (for |
@micitz Note that the cmake build process is slightly different on Windows than what @mcflugen set up for Linux/macOS. Here's a simple example of a project that builds on Windows that I looked at recently. |
@micitz Another issue is that neither |
@micitz See the above pull request. I've tried to update the code so it will build on Windows. We should also set up continuous integration on the repository even if it just tests the builds but not the code itself. |
@micitz I've built a conda package for the Coastal Dune Model that is available for Linux, Mac, and Windows. I'll update the installation instructions in the README but it should be pretty straightforward. First, from an Anaconda prompt, create a conda environment to run cdm in, $ conda create -n cdm
$ conda activate cdm Second, install the Coastal Dune Model from the conda-forge channel, $ conda install coastal-dune-model -c conda-forge This will install a new command, coastal-dune-model that you can run. I don't have a default.par file so I wasn't able to test it out. If you could point me to one, that would be great and I'll see if I can get at least a simple test together to make sure that it runs correctly on all platforms. |
Thank you so much for putting this together. I was able to install it on my PC in the lab without an issue. I don’t have a params file that is specific for this version (as far as testing out the new features that aren’t present in the old CDM versions). I tried running it with params file from the CDM 2.0 summer school version (https://github.com/csdms-contrib/Coastal-Dune-Model) but there are new parameters that were added after this version that need to be put in the params file for it to work. The good news is that it is running up until it tries to read in the newer parameters. I am going to update the file and can send it your way once I am finished with it.
|
@micitz It's great to hear you were able to get it installed and (mostly) working! 🎉 Thanks in advance for sending the updated input file! It will be good to have at least some testing in place and to have an example input file for new users of the CDM-3. |
Thanks. I tried this version of CDM 3.0. However, an error occurs ' |
Hello,
I am trying to make an executable for CDM to run on my Windows machine in the lab (Windows 10). The program is written in C++ and compiles fine as a Unix executable on my macbook, however I need to incorporate it into a larger model framework that requires Windows. A previous version of this model (link) has previously been compiled into a windows executable using Visual Studio so I know it has been done before but I can’t figure out how to do it (also I have no experience using Visual Studio). The github repository with the model source code is in the following link: (link). The model also requires the FFT headers found in this library: (link).
I had been trying to compile the model using Cygwin and mingw but kept running into an error regarding system headers that require linux:
#include <sys/utsname.h>
and#include <unistd.h>
found in themain.cc
file in the github repository.If you know how to get this compiled into an .exe to run on windows or know a place that can help with that, that would be much appreciated!
Thanks,
Michael
The text was updated successfully, but these errors were encountered: