Windows compilers calculated on Palabos Case Guide

Windows compile computing Palabos

Palabos user documentation
Palabos home
only version 2.0 there is also a settings file code :: block cbp file, the new version 2.1, there is no user manual is version 1.0, if you want to use windows, download the 2.0 version used, version 2.1 I have not seen
Palabos legacy 2.0

The original document

The C++ Integrated Development Environment (IDE) Code::Blocks is free, and you can download binaries for various flavors of Windows and Linux, and for Mac OS X (see codeblocks). A configuration file is delivered with the Palabos releases which can be used to compile Palabos with Code::Blocks. This approach was successfully tested under Windows and Linux, and neither Python nor make are needed for the compilation process.
Open the project file $(PALABOS)/codeblocks/Palabos.cbp under code::blocks, build and run the project. By default, the example program examples/showCases/cavity2d.cpp is compiled. To compile another example or your own program, remove the file cavity2d.cpp from the list of source files, and replace it by another one. The GIF images and other output files from the program are written in the directory $(PALABOS)/codeblocks/tmp/.
Code::Blocks is a cross-compiler environment, and you can in principle use it with just any C++ compiler. In particular, you can use it with the free GCC compiler. This compiler does not even need to be installed separately under Windows if you download the version of Code::Blocks which is directly packaged with the GCC port MinGW.
Note that the Palabos code does not compile with Visual C++, and we don’t know why; any suggestion is appreciated. In the meantime, you should use another compiler, such as GCC, the Intel compiler, or the Portland Group compiler.
As mentioned above, the Palabos download provides a project file for the free IDE Code::Blocks, through which you can easily use any of these compilers (we have only tested GCC/MinGW, though). If you have no C++ compiler installed on your system (other than Visual C++), remember to download the version of Code::Blocks which is packaged with the GCC port MinGW, after which you can directly compile Palabos.
Just as under Linux, you need to install ImageMagick if you want Palabos to be able to produce GIF images. If this fails, Palabos will write images in the PPM format, which is not recognized by most of the standard image viewers under Windows. In this case, you have the possibility to install the free image editor Gimp, which can view PPM images and convert them to another format.
It should also be reminded that the pathnames in the Palabos examples are written using the Unix convention, with slashes between directory names, while Windows uses backslashes. Under Windows, it is therefore recommended to change lines like
global::directories().setOutputDir("./tmp/");
to something like
global::directories().setOutputDir(".\\tmp\\");
although the programs appear to behave reasonably well even when you don’t do this.

Document Translation

c ++ Integrated Development Environment (IDE) code :: blocks is free, you can download the binaries for Windows and Linux as well as Mac OS X and other formats (see the code :: blocks). Profile released with Palabos version, you can use code :: blocks to compile Palabos. This method has been successfully tested under Windows and Linux, Python or build process does not need to make.
Open the project file $ (PALABOS) /codeblocks/palabos.cbp, construction and operation of the project code :: blocks. By default, compiling the sample program examples / showCases / cavity2d.cpp. To compile another example or your own program, please delete cavity2d.cpp file from the source file list, and replace it with another file. GIF images, and other output files from programs written in $ (PALABOS) / codeblocks / tmp / directory.
code :: blocks is a cross-compiler environment, in principle, can be used with any c ++ compiler. In particular, you can use it in the free GCC compiler. If you download the version code :: blocks directly with MinGW GCC port packaged, then the compiler does not even need a separate installation under Windows.
Note, Palabos code can not use Visual c ++ compiler, we do not know why; welcome any suggestions. At the same time, you should use other compilers, such as GCC, Intel compiler or Portland Group compilers.
As mentioned above, Palabos download, provides a project file for the code :: blocks, through this file, you can easily use any of these compilers (although we only tested the GCC / MinGW). If you do not c ++ compiler (except Visual c ++) on your system, please remember to download MinGW version of GCC port packaged code :: blocks, and then you can simply compile Palabos.
As in Linux, if you want to be able to generate Palabos GIF image, you need to install ImageMagick. If it fails, it will write the image Palabos PPM format, the standard image viewer in most Windows does not recognize this format. In this case, you can install the free image editor Gimp, which can be viewed PPM images and convert them to another format.
It should also be noted that the path name Palabos example is written using the Unix convention, there is a slash between the directory name, but Windows uses a backslash. Therefore, under Windows, the proposed change a line similar to
the world: directory () .setOutputDir ( "/ tmp / .");
To a similar
worldwide: directory () .setOutputDir ( ". \ \ \ Tmp \ \ \ \") ;
even if you do not, the program was also pretty good.

explain

code :: blocks Download
please select download version with mingw compile, I downloaded codeblocks-17.12mingw-setup.exe
installed, open the $ (PALABOS) /codeblocks/palabos.cbp file, all you have configured the configuration .
The beginning of the file is cavity2D.cpp, direct debugging, if the display
ERROR:. You need to specify a debugger program in the debuggers's settings
Refer
Solution: https: //blog.csdn.net/baibaigao/article/details/80990266
when generating the official version, which is when the release, only one of them works in the catalog showcases, multi-project document here, not an executable file error.
When debugging, that is, when debug, do not care about this, to choose the files you want to debug, debug directly on the line.
Here Insert Picture DescriptionNew projects to add, delete old items, you can debug other cases
Here Insert Picture Description

Published 15 original articles · won praise 5 · Views 3670

Guess you like

Origin blog.csdn.net/qq_28632981/article/details/103784521