- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
In our program, we have a large static array for precomputed coefficients of series for gamma function approximation (also known as Boys functions).
integer, public, parameter :: npf = 450
integer, public, parameter :: ngrd = 7
integer, public, parameter :: ntx_al = 7
real(kind=8), public, parameter :: fgrid(0:ntx_al,0:npf,0:ngrd) = reshape([ &
0.1000000000000002D+01, -0.1944677204778938D-01, 0.3403592489727661D-03, &
...
0.0000000000000000D+00 ], shape=[ntx_al+1, npf+1, ngrd+1])
Both, ifx and ifort (IFX 2023.02) failed to compile the whole file (see the attachment) with the error: `catastrophic error: Statement too long; token limit is 41000.` The whole size of the array is 225 kB in memory.
What is the proper way to initialize such large arrays in compile time?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The limiting factor is not the size of the array. It's the number of continuation lines, the statement length.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page