You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
set GO111MODULE=auto
set GOARCH=amd64
set GOBIN=C:\Users\PII\go\bin
set GOCACHE=C:\Users\PII\AppData\Local\go-build
set GOENV=C:\Users\PII\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\PII\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\PII\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Users\PII\go\go1.16
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\PII\go\go1.16\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.16
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ULRICH~1\AppData\Local\Temp\go-build3970485863=/tmp/go-build -gno-record-gcc-switches
go env Output
$ go env
What did you do?
I wanted to test out the boundaries of in memory hashmaps for fast rule based parameters. I used python to generate a 200MB map[string][]float32 which I wanted to compile. Durring the compile the error message:
Use the following python code to generate any kind of numbers
import datetime
import time
if name == 'main':
numOfHotels = 100000
numOfDays = 365
basedate = datetime.datetime.utcnow().date()
print(int(time.mktime(basedate.timetuple())))
a = list()
for i in range(numOfDays):
margin = i + i / 1000
a.append(f"{margin}")
margin = "[]float32{"+",".join(a)+"}"
with open(f"C:\\Users\\Ulrich Arndt\\go\\src\\github.com\\d2k\\marginTests\\src\\util\\marginMap\\marginMap.go","w") as f:
f.write('''
package marginMap
type HM map[string][]float32
var HotelMargins = HM{
''')
for i in range(numOfHotels):
hotel = f' "hotel{(i+1):07d}": {margin} ,\n'
f.write(hotel)
if i % 1000 == 0:
print(i)
f.write("}\n")
txt = '''
type M struct {
BaseDate int64
NumberOfDays int32
HotelMargins HM
}
var Margins = M{
'''
f.write(txt)
f.write(f" {int(time.mktime(basedate.timetuple()))},\n")
f.write(f" {numOfDays},\n")
f.write(f" HotelMargins,\n")
f.write("}\n")
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?set GO111MODULE=auto
set GOARCH=amd64
set GOBIN=C:\Users\PII\go\bin
set GOCACHE=C:\Users\PII\AppData\Local\go-build
set GOENV=C:\Users\PII\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\PII\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\PII\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Users\PII\go\go1.16
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\PII\go\go1.16\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.16
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ULRICH~1\AppData\Local\Temp\go-build3970485863=/tmp/go-build -gno-record-gcc-switches
go env
OutputWhat did you do?
I wanted to test out the boundaries of in memory hashmaps for fast rule based parameters. I used python to generate a 200MB map[string][]float32 which I wanted to compile. Durring the compile the error message:
go build getMargin.go
github.com/d2k/marginTests/src/util/marginMap
util\marginMap\marginMap.go:100015:5: internal compiler error: bvbulkalloc too big: nbit=100001 count=2100028 nword=3126 size=6564687528
Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
came back
Use the following python code to generate any kind of numbers
import datetime
import time
if name == 'main':
package marginMap
type HM map[string][]float32
var HotelMargins = HM{
''')
for i in range(numOfHotels):
hotel = f' "hotel{(i+1):07d}": {margin} ,\n'
f.write(hotel)
if i % 1000 == 0:
print(i)
f.write("}\n")
type M struct {
BaseDate int64
NumberOfDays int32
HotelMargins HM
}
var Margins = M{
'''
f.write(txt)
f.write(f" {int(time.mktime(basedate.timetuple()))},\n")
f.write(f" {numOfDays},\n")
f.write(f" HotelMargins,\n")
f.write("}\n")
The main go code is:
package main
import (
"github.com/d2k/marginTests/src/util/marginMap"
)
func main() {
}
What did you expect to see?
I compliled exe file with would print the right value
What did you see instead?
see above - comipler error
marginTests.zip
The text was updated successfully, but these errors were encountered: