Error: Assignment to contiguous pointer from non-contiguous target

362 views
Skip to first unread message

Knut

unread,
Apr 15, 2021, 5:36:55 AM4/15/21
to fabm-...@googlegroups.com
Dear Jorn,

our PhD student got this nice compilation error with gfortran 8.3:

GOTM/code/extern/fabm/src/fabm.F90:1312:17:

         pdat => dat(_PREARG_LOCATION_DIMENSIONS_ i)
                1
Error: Assignment to contiguous pointer from non-contiguous target at (1)
make[2]: *** [extern/fabm/CMakeFiles/fabm.dir/build.make:154:
extern/fabm/CMakeFiles/fabm.dir/src/fabm.F90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:565:
extern/fabm/CMakeFiles/fabm.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Any idea how to tell this version of gfortran to not worry about the
contiguity of the subarray in dat?


Thanks and Cheers, Knut

Jorn Bruggeman

unread,
Apr 15, 2021, 8:24:39 AM4/15/21
to fabm-...@googlegroups.com
Hi Knut,

Yes that's a known issue in gfortran 8.x (a bug in their implementation of CONTIGUOUS). The solution is to compile with -DFABM_USE_CONTIGUOUS=OFF. For reference, such compiler-specific issues and solutions are tracked here:

https://github.com/fabm-model/fabm/wiki/Building-and-installing#supported-compilers

Cheers,

Jorn
--
You received this message because you are subscribed to the Google Groups "FABM-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabm-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fabm-devel/89156eae-e86e-922a-d011-0d4a5f173cfb%40gmx.net.

Karsten Bolding

unread,
Apr 15, 2021, 9:02:49 AM4/15/21
to fabm-...@googlegroups.com
it should be noted on the wiki that Intel - as of end of 2020 - provides OneAPI free for all users on Linux, Windows and Mac - and maybe the Ming thing goes away as none of us never uses it



--

Jorn Bruggeman

unread,
Apr 15, 2021, 9:14:12 AM4/15/21
to fabm-...@googlegroups.com

And here’s the link to the newly-free Intel Fortran compiler:

 

https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html#fortranclassic

 

This is the stand-alone version of the classic Intel Fortran compiler (“ifort”). They also provide a beta version of their next-generation compiler on the same page, but that does not yet support enough of the modern Fortran standards to compile FABM, last time I checked.  You can also install these compilers as part of Intel’s OneAPI suite, but that requires many gigabytes.

 

Cheers,

 

Jorn

Knut

unread,
Apr 15, 2021, 9:21:32 AM4/15/21
to fabm-...@googlegroups.com

Dear Jorn and Karsten,

thanks for the information. I did not check the license, but are there still constrains for the "free" use of ifort? only for private use or now also open for research (which might be considered to be different from educational use)?

Cheers, Knut

Jorn Bruggeman

unread,
Apr 15, 2021, 9:30:03 AM4/15/21
to fabm-...@googlegroups.com

Hi Knut,

 

From https://software.intel.com/content/www/us/en/develop/articles/oneapi-commercial-faq.html:

 

“all of the oneAPI Toolkits are available for free download and use for commercial and non-commercial purposes.  The oneAPI Toolkits obtained for free are supported via community forums and are public”

 

You ca still purchase Priority Support if desired, but that’s not essential for use of the compiler: https://software.intel.com/content/www/us/en/develop/tools/oneapi/commercial-base-hpc.html

 

Cheers,

 

Jorn

Knut

unread,
Apr 20, 2021, 5:00:52 AM4/20/21
to fabm-...@googlegroups.com
Dear Jorn,

thanks for collecting (and implementing) the compiler-specific
workarounds. Probably you already know this site, but just in case it
still might be useful for other issues:
https://wiki.ucar.edu/display/ccsm/Fortran+Compiler+Bug+List

Cheers, Knut

Jorn Bruggeman

unread,
Apr 20, 2021, 5:23:34 AM4/20/21
to fabm-...@googlegroups.com
Thanks Knut

Yes I've reviewed that list at times and it has been useful. Unfortunately, it is not exhaustive, with Cray and PGI in particular still suffering from additional bugs in their Fortran 2003/2008 implementations, at least until very recently. FABM includes quite a few workarounds for those compilers. I've also reported the bugs to Cray/PGI, and some have been fixed since. The gfortran 8.x "contiguous" issue is not listed either, though a similar problem for older gfortran versions is. Still, it is the most detailed list of Fortran compiler bugs I've found.

Cheers,

Jorn

-----Original Message-----
From: fabm-...@googlegroups.com <fabm-...@googlegroups.com> On Behalf Of Knut
Sent: 20 April 2021 10:01
To: fabm-...@googlegroups.com
Subject: Re: [fabm-devel:1344] Error: Assignment to contiguous pointer from non-contiguous target

Dear Jorn,

To view this discussion on the web visit https://groups.google.com/d/msgid/fabm-devel/b505775f-554d-1f2e-7de8-3671e4ec0c43%40gmx.net.

Reply all
Reply to author
Forward
0 new messages