Clustsim Failure in 3dttest++, any tips for small volume correction?

I am using the -Clustsim option in 3dttest++ to try and do a small volume correction for a bilateral dlPFC mask. Input files are from a seed-based resting functional connectivity analysis. I’ve successfully implemented the correction using e.g. a whole brain mask, but with the smaller mask am running into problems in which 3dClustSim “fails” for some seed regions and/or group comparisons. If I re-run the identical analysis, different seeds and/or group comparisons fail. However, for some seeds/comparisons on each run through it works just fine, suggesting the mask is being read in to the program okay.

In the terminal window I’m getting errors like this - that one of the .sdat files isn’t long enough:
Example 1:
++ loading -setB datasets
562019.52562** FATAL ERROR: data file ‘./CS.AD-Risk.N146b.Amg+Ce_Bilateral_D1E1_Oct2020_reorient.0trxb.NwcmdfX0.4.aw.s6.mni.0181.sdat’ isn’t long enough
** Program compile date = Jan 7 2021
645*+ WARNING: 3dttest++ -setB :: 234 vectors are constant
++ t-test randomsign/permute:0** FATAL ERROR: ===== 3dClustSim command failed :-((( =====

Example 2:
** FATAL ERROR: data file ‘./CS.Risk-Control.N146b.2mm_newCe_D1E1_Bilateral.0trxb.NwcmdfX0.4.aw.s6.mni.0186.sdat’ isn’t long enough
** Program compile date = Jan 7 2021
18** FATAL ERROR: ===== 3dClustSim command failed :-((( =====

Are there any options known to improve Clustsim performance with smaller masks? Any insight into what this error means would also be helpful - the .sdat files are not easily read (binary files?) so comparing one that is long enough versus one that is not has not been informative.

Thanks!

These “isn’t long enough” messages are caused by the .sdat files written during the 3dttest++ randomization runs being truncated somehow. Not empty and not non-existent, because those are different messages.

But how that file truncation happened, I don’t understand. The only thing I can think of is that the disk storage is full, but that seems very unlikely, and you would almost certainly have a whole host of other messages in that situation. Although the program has many error messages built in, most of them have never been actually seen in practice – including these “isn’t long enough” messages.

Do you have the .sdat files saved? How big are they? How many voxels in your mask? The files should be exactly 2*number of mask voxels long – the ‘s’ means ‘short’ and these files are ‘short integers’ = 16 bit = 2 byte values.