It has the following behavior, which is consistent with what was said about OS
X. If there is no xvec.bin/xvec.bin.info, and you run this code, it saves to
Xvec.bin as desired. However, if xvec.bin/xvec.bin.info are present, it
overwrites them, using the lower case filename.
#include <petscvec.h>
int main(int argc,char **argv)
{
PetscInt n=100;
char X_filename[PETSC_MAX_PATH_LEN]="Xvec.bin";
Vec X;
PetscViewer viewer;
PetscScalar a=2.0;
PetscInitialize(&argc,&argv,NULL,NULL);
VecCreate(PETSC_COMM_WORLD,&X);
VecSetSizes(X,PETSC_DECIDE,n);
VecSetFromOptions(X);
VecSet(X, a);
PetscViewerBinaryOpen(PETSC_COMM_WORLD, X_filename,FILE_MODE_WRITE,&viewer);
VecView(X, viewer);
PetscViewerDestroy(&viewer);
VecDestroy(&X);
PetscFinalize();
return 0;
}
-gideon
> On Feb 16, 2015, at 6:27 PM, Barry Smith <[email protected]> wrote:
>
>
> Send a tiny case that demonstrates this, we can then reproduce it and debug
> it.
>
>
>> On Feb 16, 2015, at 4:54 PM, Gideon Simpson <[email protected]> wrote:
>>
>> Does petsc not distinguish lower/upper case letters in file names? I was
>> trying to write a vector to the file “Fvec.bin”, but it comes out as
>> “fvec.bin”.
>>
>> -gideon
>>
>