BlueM.Sim compilation: Difference between revisions

From BlueM
Jump to navigation Jump to search
m (hat „BlueM Kompilierung“ nach „BlueM.Sim Kompilierung“ verschoben)
(mention Intel Fortran Compiler Extension for Visual Studio)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Compiler==
{{BlueM.Sim nav}}
Der Quellcode von BlueM ist standardmäßig auf den [http://www.intel.com/cd/software/products/asmo-na/eng/compilers/278834.htm Intel Fortran Compiler] ausgelegt. Der Code enthält momentan einige Intel-spezifische Funktionen.
<div style="float:right; margin:0 0 10px 10px;">__TOC__</div>


==Intel Fortran==
==Compilation==
[[Bild:RECLinBytes.jpg|thumb|Use Bytes as RECL]]
BlueM.Sim is written in FORTRAN. Additional components such as [[BlueM.DLLAdapter]] and [[BlueM.Wave]] are written in C# and VB.NET, while [[BlueM.LaPipe]] is written in C++.
Compiler-Einstellungen (''Flags''), die zur erfolgreichen Kompilierung erforderlich sind.  
* <code>/assume:byterecl</code>
: Damit Intel Fortran bei unformatierten Dateien (wie den Zeitreihen im BIN-Format) die Record-Länge als bytes und nicht als 4-byte Einheiten (longwords) interpretiert, muss folgender Flag gesetzt werden: "'''Use Bytes as RECL unit for unformatted files: Yes'''" (siehe Bild)
<br clear="all"/>


==Eclipse==
Recommended software setup for compiling BlueM.Sim:
[[Bild:Eclipse.gif|thumb|Eclipse screenshot]]
* [https://visualstudio.microsoft.com/ Microsoft Visual Studio 2019 or 2022] (Community Edition is sufficient)
Die [http://www.eclipse.org Eclipse] Entwicklungsumgebung ist nützlich, um die Dokumentstruktur (sprich: Liste von Funktionen) von Fortran Quelldateien anzusehen. Ausserdem bietet Eclipse noch weitergehende Syntaxfehlererkennung und Anbindung an Subversion. Kompilierung in Eclipse erfordert ein Makefile. Bisher ist es aber noch nicht gelungen, BlueM erfolgreich in Eclipse zu kompilieren. Hier eine vorläufige (inkomplette) Anleitung:
** Select at least the "Desktop Development with C++" component
* Intel Fortran Compiler:
** [https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html Intel oneAPI Base Toolkit], select at a minimum "Intel Distribution for GDB". This provides the Fortran debugger support for Visual Studio.
** [https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit-download.html Intel oneAPI HPC Toolkit], select at a minimum "Intel Fortran Compiler".
:Or, use the new Intel Fortran Compiler Extension for Visual Studio: https://marketplace.visualstudio.com/items?itemName=intel-corporation.fortranonline


<u>Installation:</u>
Further reading:
* Eclipse SDK 3.2.1: http://www.eclipse.org/downloads/
* [https://www.intel.com/content/www/us/en/developer/articles/guide/installing-microsoft-visual-studio-2019-for-use-with-intel-compilers.html Installing Microsoft Visual Studio* for Use with Intel® Compilers]
* Eclipse C/C++ Development Toolkit (CDT): http://www.eclipse.org/cdt/ (''In Eclipse über Menü '''Help - Software Updates''' installieren'')
* [https://www.intel.com/content/www/us/en/developer/articles/training/intel-fortran-compiler-in-ms-visual-studio.html How to Select oneAPI Intel® Fortran Compiler and Compiler Version in Microsoft* Visual Studio]
* Photran Feature 3.1 Beta: http://www.eclipse.org/photran/ (''Inhalt der ZIP-Datei einfach in entsprechende Ordner im Eclipse Installationsverzeichnis kopieren'')
* Cygwin mit gdb (GNU Debugger): http://www.cygwin.com/ (''gdb bei der Installation unter '''Devel''' auswählen'')
* make für Windows: http://www.steve.org.uk/Software/make/ (''make muss auf den PATH'')
* g95 compiler: http://www.g95.org/ (''g95 muss auf den PATH'')


<u>Eclipse Einstellungen:</u>
==Compiler settings==
* Project Properties: Binary Parser: '''PE Windows Parser''' (''für Syntaxfehlererkennung'')
[[Bild:RECLinBytes.jpg|thumb|Use Bytes as RECL]]
* Debug As...: C/C++ Local Application: Debugger: '''Cygwin gdb Debugger''' und Pfad zu gdb.exe angeben
Required compiler settings (''Flags''):
* <code>/assume:byterecl</code>
: This causes Intel Fortran to interpret the record length of unformatted files (e.g. time series in [[BIN-Format]]) in bytes instead of in 4 byte units (longwords). This flag is set by setting ''Use Bytes as RECL unit for unformatted files:'' to '''Yes''' (see image).
The compiler settings are stored in the project file <code>BlueM.Sim.vfproj</code> and normally do not have to be adjusted.


Es ist (theoretisch) auch möglich, den Intel Fortran Compiler/Debugger in Eclipse einzubinden.
==Build configurations==
The following build configurations for BlueM.Sim are defined in the project file:
* '''Debug''': Debug version, no optimizations
* '''Release''': Release version with optimizations


[[Kategorie:BlueM Code]]
[[Kategorie:BlueM.Sim Development]]

Latest revision as of 05:46, 2 March 2024

BlueM_icon.png BlueM.Sim | Downloads | Application | Theory | Development

Compilation

BlueM.Sim is written in FORTRAN. Additional components such as BlueM.DLLAdapter and BlueM.Wave are written in C# and VB.NET, while BlueM.LaPipe is written in C++.

Recommended software setup for compiling BlueM.Sim:

Or, use the new Intel Fortran Compiler Extension for Visual Studio: https://marketplace.visualstudio.com/items?itemName=intel-corporation.fortranonline

Further reading:

Compiler settings

Use Bytes as RECL

Required compiler settings (Flags):

  • /assume:byterecl
This causes Intel Fortran to interpret the record length of unformatted files (e.g. time series in BIN-Format) in bytes instead of in 4 byte units (longwords). This flag is set by setting Use Bytes as RECL unit for unformatted files: to Yes (see image).

The compiler settings are stored in the project file BlueM.Sim.vfproj and normally do not have to be adjusted.

Build configurations

The following build configurations for BlueM.Sim are defined in the project file:

  • Debug: Debug version, no optimizations
  • Release: Release version with optimizations