Skip to content
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

Issue compiling in fastchem_vulcan #14

Open
mkplummer opened this issue Oct 15, 2024 · 2 comments
Open

Issue compiling in fastchem_vulcan #14

mkplummer opened this issue Oct 15, 2024 · 2 comments

Comments

@mkplummer
Copy link

Good afternoon!

I am working to get started with your code. I downloaded the whole file and when I go to the fastchem_vulcan folder and execute "make", I get the following error:

cd model_main && C:/Users/Michael.Plummer/AppData/Local/Microsoft/WinGet/Packages/ezwinports.make_Microsoft.Winget.Source_8wekyb3d8bbwe/bin/make.exe model_main_
make[1]: Entering directory 'C:/Users/Michael.Plummer/USAFA_Research/Vulcan/VULCAN-master/fastchem_vulcan/model_main'
"compiling: main --> model_main.cpp"
process_begin: CreateProcess(NULL, g++ -c -Wall -std=gnu++11 -pedantic -O3 -march=native -MMD model_main.cpp -o ../obj/.o, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [makefile:20: ../obj/
.o] Error 2
make[1]: Leaving directory 'C:/Users/Michael.Plummer/USAFA_Research/Vulcan/VULCAN-master/fastchem_vulcan/model_main'
make: *** [makefile:8: model_main_] Error 2

Any help would be greatly appreciated!

Thanks,
Michael

@shami-EEG
Copy link
Collaborator

Hi Micheal,

Looks like the issue might be the g++ compiler is missing.
It you still cannot resolve it, please contact fastchem's developer Daniel Kitzmann ([email protected])

@SinjiBaka
Copy link

SinjiBaka commented Dec 26, 2024

Good afternoon!

Like @mkplummer, I tried to use the code on Windows 11 and encountered exactly the same problem.
I want to share the solution here.

  1. In order to compile the "fastchem" code using make command, you need to download the MinGW development kit for Windows from official cite: https://www.mingw-w64.org/downloads/. After that you need to install the package and add the "bin" folder to the environment variables in Path. This way you will be able to use make command and successfully build code.
  2. Another error occurs when running the script "vulcan.py". It occurs when trying to run "fastchem" from a script using a subprocess library.
    The thing is that by default it uses Linux commands that Windows cannot recognize. To fix this, you need to replace two lines of code in the file "build_atm.py":
  1. line 138
    replace "subprocess.check_call(["./fastchem input/config.input"], shell=True, cwd='fastchem_vulcan/')" with
    "subprocess.check_call('fastchem.exe input\\config.input', shell=True, cwd='fastchem_vulcan\\')"
  2. line 164
    replace "subprocess.call(["rm vulcan_EQ.dat"], shell=True, cwd='fastchem_vulcan/output/')" with
    "subprocess.call('del vulcan_EQ.dat', shell=True, cwd='fastchem_vulcan\\output\\')"

After these manipulations everything should work fine for you...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants