PetscErrorCode PetscGoogleDriveUpload(MPI_Comm comm,const char access_token[],const char filename[])Not collective, only the first process in the MPI_Comm uploads the file
comm | - MPI communicator | |
access_token | - obtained with PetscGoogleDriveRefresh(), pass NULL to have PETSc generate one | |
filename | - file to upload; if you upload multiple times it will have different names each time on Google Drive |
-google_refresh_token XXX |
Without PETSc option -google_refresh_token XXX given PetscGoogleDriveUpload(comm,NULL,filename); for first use will prompt user to authorize access to Google Drive with their browser
With PETSc option -google_refresh_token XXX given PetscGoogleDriveRefresh(comm,NULL,access_token,sizeof(access_token)); PetscGoogleDriveUpload(comm,access_token,filename);
With refresh token entered in some way by the user PetscGoogleDriveRefresh(comm,refresh_token,access_token,sizeof(access_token)); PetscGoogleDriveUpload(comm,access_token,filename);
PetscGoogleDriveAuthorize(comm,access_token,refresh_token,sizeof(access_token)); PetscGoogleDriveUpload(comm,access_token,filename);