Segfault in writing WHIRL file phase

Hello!

I tried compiling my program and got this message:

Signal: Segmentation fault in Writing WHIRL file phase.

<input>(0): Error: Signal Segmentation fault in phase Writing WHIRL file -- processing aborted

*** Internal stack backtrace:

	/usr/local/cuda/open64/lib//gfec [0x768a02]

	/usr/local/cuda/open64/lib//gfec [0x7694b0]

	/usr/local/cuda/open64/lib//gfec(ErrMsgLine+0x8f) [0x768b9f]

	/usr/local/cuda/open64/lib//gfec [0x769d48]

	/lib/libc.so.6 [0x2ac0d2bc1100]

	/lib/libc.so.6(cfree+0x3b) [0x2ac0d2c06bcb]

	/usr/local/cuda/open64/lib//gfec(_ZdlPv+0x29) [0x768249]

	/usr/local/cuda/open64/lib//gfec [0x4b864a]

	/lib/libc.so.6(exit+0xe0) [0x2ac0d2bc4110]

	/usr/local/cuda/open64/lib//gfec(main+0xfe) [0x4da4ee]

	/lib/libc.so.6(__libc_start_main+0xf4) [0x2ac0d2bad1c4]

	/usr/local/cuda/open64/lib//gfec [0x45a90a]

nvopencc INTERNAL ERROR: /usr/local/cuda/open64/lib//gfec died due to signal 4

This happened on three linux machines running CUDA 2.1.

I found out about a hypothesized limit on the length of function names or the number of parameters. Can anyone tell me anything specific about this limit or hint at the real cause of this error? Would it help to downgrade to 2.0?

Thanks,

Volker

Posting source would be helpful.

The complete file is 3700 lines, so I shortened it to one function call. The error is still the same.

#include <stdio.h>

#include <math.h>

#include <cuda.h>

__global__ void fesft(double *pti, double *pdp, double *pclc, double *pwv, 

	double *psw,double *pqlwc, double *pqiwc, double *pduco2, double *pduo3, 

	double *paeq1, double *paeq2, double *paeq3, double *paeq4, double *paeq5,

	double *papre, double *psmu0, double *palso, double *palth, double *pskyview, 

	double *pfcor, double psig, double psct, 

	int ki1sd, int ki1ed, int ki2sd, int ki2ed, int ki3sd, int ki3ed, 

	int ki1sc, int ki1ec, int ki2sc, int ki2ec, int ki3sc, int ki3ec, 

	bool lsolar, bool lcrf, bool lradtopo, int idebug, 

	double *pflt, double *pfls, double *pflt_s, double *pfls_s, double *pflsdir,

	double *pfltd, double *pfltu, double *pflsd, double *pflsu, double *pflsp, 

	double *pflpar, double *pflsu_par, double *pflsd_par, double *pflsp_par, 

	int jindex, int jpsol, int jpther, int jpspec, int jpgas, int jpabsc, 

	int istartpar, int iendpar, double pi, double g, int *coai, int *cobi, 

	double *apodac, double *apodsc, double *coali, double *cobti, double *solant, 

	double *planck, double *zketypa, double *ztetypa, double zteref, double *ncgas, 

	double *nfast, double *zaea, double *zaes, double *zaeg, double *zaef, 

	double *zlwe, double *zlwemn, double *zlwemx, double *zlww, double *zlwg,

	double *ziwe, double *ziwemn, double *ziwemx, double *ziww, double *ziwg,

	double *zrsc,

	double *zflux, double *zflux_c, double *zfluxi, double *zfluxu, double *zfluxu_c, double *zfluxui, double *zfluxd, 

	double *zfluxd_c, double *zfluxdi, double *zfgas, double *zfgasu, double *zfgasd, double *pbbr, double *pflpt, double *palp, 

	double *pqsmu0, double *palogt, double *palogp, double *papra, double *pduh2oc, double *pduh2of, double *pdulwc, 

	double *pduiwc, double *prholwc, double *prhoiwc, double *zduetpc, double *zduetpf, double *ztm, double *zwv, 

	double *zcpo, double *zcpn, double *zcmo, double *zcmn, double *podac, double *podaf, double *podsc, double *podsf, double *pbsfc, 

	double *pbsff, double *pusfc, double *pusff, double *pca1, double *pcb1, double *pcc1, double *pcd1, double *pca2, double *pcb2, 

	double *pcc2, double *pcd2, double *pflfd, double *pflfu, double *pflfp, double *pflcd, double *pflcu, double *pflcp, double *pa1c, 

	double *pa1f, double *pa2c, double *pa2f, double *pa3c, double *pa4f, double *pa4c, double *pa5f, double *pa5c, double *pa3f, double *ztu1, 

	double *ztu2, double *ztu3, double *ztu4, double *ztu5, double *ztu6, double *ztu7, double *ztu8, double *ztu9, double *zlwoda, 

	double *zlwods, double *zlwb0, double *zlwb, double *ziwoda, double *ziwods, double *ziwb0, double *ziwb, double *zaeoda, 

	double *zaeods, double *zaeb0, double *zaeb, double *zraods, double *zketyp, double *ztetyp)

{

	//Do something

}

Since the error is still there I suppose that there actually is a limit on the length of a function call, though what that limit is I have no idea.

Volker

uhhhh… yeah, I think you get 256 bytes’ worth of parameters per function call…

Make a structure of pointers and assign everything to that, then just pass the one pointer to your kernel.