|
[Sponsors] |
Building from Source on Windows using Cygwin64 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 10, 2014, 09:43 |
Building from Source on Windows using Cygwin64
|
#1 |
New Member
Lean ("Eric") Fang
Join Date: Jul 2013
Location: USTC, Hefei, P.R.C.
Posts: 15
Rep Power: 13 |
Hello everyone,
For some reason, I can not run the binary SU2 in parallel on my Windows computer. the ms-mpi never worked properly and SU2_PRT always crashed before the mesh partitioning being started. I also have access to intel-mpi and it has worked flawlessly, but the binary SU2 does not work with intel-mpi. Anyway, I figured that building from source using intel-mpi is the way to go. After some research I get Cygwin64 installed along with every necessary components to compile and build. The problem is that the installation configuration and settings need to be adjusted to accommodate my Windows OS, and for a Windows user since childhood like me, this seems quite tricky. After playing with Cygwin for a while, I managed to build the single-threaded SU2 without any optional feature, and yet I consistently get errors when trying to build SU2 with Metis, TecIO, or MPI. Here below is what I got when trying different configurations. 1.Default settings $ ./configure Build Configuration Summary: Source code location: /cygdrive/d/codes/su2-master Install location: /usr/local Version: 3.2.4 Compiler: g++ Preprocessor flags: Compiler flags: -g -O2 Linker flags: CGNS support: no MPI support: no Metis support: yes TecIO support: yes Mutation++ support: no Jsoncpp support: no LAPACK support: no External includes: -DHAVE_METIS -I$(top_srcdir)/externals/metis/include -DHAVE_TECIO -I$(top_srcdir)/externals/tecio/include External libs: $(top_builddir)/externals/metis/libmetis.a $(top_builddir)/externals/tecio/libtecio.a Build SU2_CFD: yes Build SU2_PRT: yes Build SU2_DOT: yes Build SU2_MSH: yes Build SU2_DEF: yes Build SU2_SOL: yes Build SU2_GEO: yes $ make check Making check in externals make[1]: Entering directory '/cygdrive/d/codes/su2-master/externals' Making check in tecio make[2]: Entering directory '/cygdrive/d/codes/su2-master/externals/tecio' CXX tecsrc/libtecio_a-arrlist.o tecsrc/arrlist.cpp: In function ‘Boolean_t ArrayListIsValid(ArrayList_pa)’: tecsrc/arrlist.cpp:390:45: error: ‘VALID_REF’ was not declared in this scope Boolean_t IsValid = (VALID_REF(ArrayList) && ^ Makefile:493: recipe for target 'tecsrc/libtecio_a-arrlist.o' failed make[2]: *** [tecsrc/libtecio_a-arrlist.o] Error 1 make[2]: Leaving directory '/cygdrive/d/codes/su2-master/externals/tecio' Makefile:287: recipe for target 'check-recursive' failed make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory '/cygdrive/d/codes/su2-master/externals' Makefile:339: recipe for target 'check-recursive' failed make: *** [check-recursive] Error 1 2.No tecio $ ./configure --disable-tecio Build Configuration Summary: Source code location: /cygdrive/d/codes/su2-master Install location: /usr/local Version: 3.2.4 Compiler: g++ Preprocessor flags: Compiler flags: -g -O2 Linker flags: CGNS support: no MPI support: no Metis support: yes TecIO support: no Mutation++ support: no Jsoncpp support: no LAPACK support: no External includes: -DHAVE_METIS -I$(top_srcdir)/externals/metis/include External libs: $(top_builddir)/externals/metis/libmetis.a Build SU2_CFD: yes Build SU2_PRT: yes Build SU2_DOT: yes Build SU2_MSH: yes Build SU2_DEF: yes Build SU2_SOL: yes Build SU2_GEO: yes $ make check Making check in externals make[1]: Entering directory '/cygdrive/d/codes/su2-master/externals' Making check in metis make[2]: Entering directory '/cygdrive/d/codes/su2-master/externals/metis' CC GKlib/libmetis_a-b64.o In file included from GKlib/GKlib.h:23:0, from GKlib/b64.c:20: GKlib/gk_arch.h:30:22: fatal error: execinfo.h: No such file or directory #include <execinfo.h> ^ compilation terminated. Makefile:669: recipe for target 'GKlib/libmetis_a-b64.o' failed make[2]: *** [GKlib/libmetis_a-b64.o] Error 1 make[2]: Leaving directory '/cygdrive/d/codes/su2-master/externals/metis' Makefile:287: recipe for target 'check-recursive' failed make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory '/cygdrive/d/codes/su2-master/externals' Makefile:339: recipe for target 'check-recursive' failed make: *** [check-recursive] Error 1 3.No metis, no tecio, with MPI $ ./configure --disable-metis --disable-tecio --prefix=c:/su2 --with-MPI="c:/pro gram files (x86)/intel/impi_5.0.1/intel64/bin/mpicxx.bat" Build Configuration Summary: Source code location: /cygdrive/d/codes/su2-master Install location: c:/su2 Version: 3.2.4 Compiler: c:/program files (x86)/intel/impi_5.0.1/intel64/bin/mpicxx.bat Preprocessor flags: Compiler flags: -DHAVE_MPI -g -O2 Linker flags: CGNS support: no MPI support: yes Metis support: no TecIO support: no Mutation++ support: no Jsoncpp support: no LAPACK support: no External includes: External libs: Build SU2_CFD: yes Build SU2_PRT: yes Build SU2_DOT: yes Build SU2_MSH: yes Build SU2_DEF: yes Build SU2_SOL: yes Build SU2_GEO: yes $ make check Making check in externals make[1]: Entering directory '/cygdrive/d/codes/su2-master/externals' make[2]: Entering directory '/cygdrive/d/codes/su2-master/externals' make[2]: Nothing to be done for 'check-am'. make[2]: Leaving directory '/cygdrive/d/codes/su2-master/externals' make[1]: Leaving directory '/cygdrive/d/codes/su2-master/externals' Making check in Common/lib make[1]: Entering directory '/cygdrive/d/codes/su2-master/Common/lib' /bin/sh: -c: line 2: syntax error near unexpected token `(' /bin/sh: -c: line 2: `c:/program files (x86)/intel/impi_5.0.1/intel64/bin/mpicxx.bat -DPACKAGE_NAME=\"SU2\" -DPACKAGE_TARNAME=\"SU2\" -DPACKAGE_VERSION=\"3.2.4\" -DPACKAGE_STRING=\"SU2\ 3.2.4\" -DPACKAGE_BUGREPORT=\"susquared-dev@lists.stanford.edu\" -DPACKAGE_URL=\"http://su2.stanford.edu\" -DPACKAGE=\"SU2\" -DVERSION=\"3.2.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_SHORT_INT=2 -DSIZEOF_INT=4 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_LONG_INT=8 -DSIZEOF_FLOAT=4 -DSIZEOF_DOUBLE=8 -DSIZEOF_VOID_P=8 -I. -DHAVE_MPI -g -O2 -c -o ../src/libSU2_a-dual_grid_structure.o `test -f '../src/dual_grid_structure.cpp' || echo './'`../src/dual_grid_structure.cpp' Makefile:441: recipe for target '../src/libSU2_a-dual_grid_structure.o' failed make[1]: *** [../src/libSU2_a-dual_grid_structure.o] Error 1 make[1]: Leaving directory '/cygdrive/d/codes/su2-master/Common/lib' Makefile:339: recipe for target 'check-recursive' failed make: *** [check-recursive] Error 1 Any input will be appreciated! Eric Last edited by ericthefatguy; December 14, 2014 at 05:36. Reason: Updates |
|
December 10, 2014, 10:32 |
|
#2 |
New Member
Khiem Pham
Join Date: Nov 2013
Posts: 23
Rep Power: 13 |
||
May 12, 2015, 19:23 |
|
#3 |
Senior Member
Zach Davis
Join Date: Jan 2010
Location: Los Angeles, CA
Posts: 101
Rep Power: 16 |
Hi Eric,
I imagine you will have a lot of difficulty compiling SU2 using Cygwin as you have already discovered. This is primarily due to the fact that Cygwin hasn't ported over the full standard C library which SU2 has a number of dependencies on. Instead, Cygwin has their own implementation of the standard C library called Newlib. Unfortunately, Newlib doesn't have a 1-to-1 equivalent for everything included in the standard C library. As a result, when compiling SU2--especially beginning with some of the external libraries such as metis, tecio, and MPI which rely heavily on the standard C libraries and headers--the compiler is unable to locate specific library or header files because equivalents don't exist in Cygwin's Newlib implementation. Compiling software under Cygwin in general is therefore somewhat tenuous. You're much better off either creating a UNIX based virtual environment within which you can work from your more familiar Windows surroundings, or install a UNIX-based OS on a separate partition or external drive and dual boot as needed. Unfortunately, I don't have a better solution for you, but I thought explaining what the underlying problem is might prove beneficial to you, or others who have considered Cygwin as a potential option to running SU2. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compressor Simulation using rhoPimpleDyMFoam | Jetfire | OpenFOAM Running, Solving & CFD | 107 | December 9, 2014 14:38 |
mapFields Error with snappyHexMesh Source Added Layers | sherif35 | OpenFOAM Pre-Processing | 0 | September 29, 2014 18:01 |
Help for the small implementation in turbulence model | shipman | OpenFOAM Programming & Development | 25 | March 19, 2014 11:08 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 13:41 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |