Hi Kay, did you try:
$ strings coarray_collectives_18 | grep GNU GCC: (GNU) 11.2.1 20211203 (Red Hat 11.2.1-7) GCC: (GNU) 12.0.1 20220214 (experimental) GNU Fortran2008 12.0.1 20220214 (experimental) -mtune=generic -march=x86-64 -g -fcoarray=lib -fintrinsic-modules-path /home/vehre/Projekte/gcc/gfortran/lib/gcc/x86_64-pc-linux-gnu/12.0.1/finclude -fpre-include=/usr/include/finclude/math-vector-fortran.h GNU C11 12.0.1 20220214 (experimental) -mshstk -mtune=generic -march=x86-64 -g -O2 -O0 -std=gnu11 -fcf-protection=full -fcx-fortran-rules -ffunction-sections -fdata-sections __GNU_EH_FRAME_HDR or strings coarray_collectives_18 | grep GCC ... ? Both give me some output (albeit more than I desire) for an executable compiled with gfortran. But presumably, I had activated debug. I don't know, if optimized builds will have it, too. Regards, Andre On Wed, 1 Jun 2022 11:41:41 +0200 Kay Diederichs <kay.diederi...@uni-konstanz.de> wrote: > Hi Arjen, > > thanks for your answer. I do know about these functions, and use them in my > own programs if appropriate. However, programs distributed to others for > production use should not output this because it confuses users (as does > "Note: The following floating-point exceptions are signalling: > IEEE_INVALID_FLAG" which I need to switch off with -ffpe-summary=none). > > So I really am looking for strings or other type of info in the binary. > > Best wishes, > Kay > > On 6/1/22 11:30, Arjen Markus wrote: > > Are you perhaps looking for the compiler_version() and compiler_options() > > functions? I use them like this, they were defined in Fortran 2008 if I am > > not mistaken: > > > > > > WRITE( lurep, '(a)' ) 'Report of simulation' > > WRITE( lurep, '(a)' ) '--------------------' > > WRITE( lurep, '(a)' ) 'Compiler version: ', > > compiler_version() WRITE( lurep, '(a)' ) 'Compiler options: ', > > compiler_options() > > > > Regards, > > > > Arjen > > > > Op wo 1 jun. 2022 om 10:42 schreef Kay Diederichs > > <kay.diederi...@uni-konstanz.de <mailto:kay.diederi...@uni-konstanz.de>>: > > > > Hi, > > > > is there any gfortran option and/or version information available > > from/in a binary? Maybe accessible with objdump or strings? > > > > For ifort, we use the -sox option ("This option tells the compiler to > > save the compilation options and version number in the executable file. > > ..."). This enables e.g. strings /path/to/binary | grep Intel > > > > Or is there a gfortran option that makes this accessible in a binary? > > > > Thanks, > > Kay > > > > > -- Andre Vehreschild * Email: vehre ad gmx dot de