brodeau / aerobulk

AeroBulk is a modern-FORTRAN-based package/library that gathers state-of-the-art aerodynamic bulk formulae algorithms used to compute turbulent air-sea fluxes of momentum, heat and freshwater.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues running src/tests/aerobulk_toy.f90

josuemtzmo opened this issue · comments

Hello,
Thank you so much for the library, I've managed to compile library using my make.macro:

# Makefile for AeroBulk with the GNU Fortran Compiler version 9 on Ubuntu
# =======================================================================

# Fortran compiler :
FC  = gfortran
CXX = g++
VERSION = 11.2.0_3

# Libraries of Fortran compiler
DIR_FORT_LIB = /opt/homebrew/Cellar/gcc/$(VERSION)
LNK_FORT_LIB = -lgfortran

# Fortran compilation flags :

# Production
FF = -O3 -fdefault-real-8 -ffree-line-length-200 -J./mod -I./mod
# These are needed for the C/C++ interface
#FF += -std=f2008 -lstdc++
FF += -std=gnu -lstdc++

# Debugging:
#DEBUG_FF = -g -w -fbounds-check
#FF = -O3 -fdefault-real-8 -ffree-line-length-200 $(DEBUG_FF) -module mod/


# g++ compilation flags
CXXFLAGS += -std=c++11 -O3 -fPIC

# Directory to install binaries :
INSTALL_DIR = /usr/local

# Root directory for Netcdf:
NETCDF_DIR = /opt/homebrew/Cellar/netcdf/4.8.1

# Linking argument: usually "-lnetcdff", "-lnetcdf" or "-lnetcdf -lnetcdff" :
L_NCDF = -lnetcdff

However, when I run ./bin/aerobulk_toy.x, I get the following error:

At line 64 of file src/tests/aerobulk_toy.f90 (unit = 6, file = 'stdout')
Fortran runtime error: Cannot change RECL parameter in OPEN statement

Error termination. Backtrace:
#0  0x1006c5147
#1  0x1006c5dbf
#2  0x1006c6743
#3  0x10078ac97
#4  0x10078ba8f
#5  0x10022cfab
#6  0x100255bbf

Do you know how to solve this issue? I'm trying to run it in a MacBook Pro M1 and the version of gcc is 11.2.0

Hi!
Oh, just comment out the guilty line! src/tests/aerobulk_toy.f90
Or use Intel compiler.
Cheers, /laurent

This line controls the width of the standard output in your terminal, if you comment it as I suggest it will work fine but look ugly in the terminal (some lines are going to be broken)...

The line to comment is:
OPEN(6, FORM='formatted', RECL=512)
which tells to write lines of 512 characters max in the standard output (your terminal)...

Thank you so much, that works!!! Thanks again for the awesome library!!