00001
00002
00003
00004
00005
00006
00007
00008 #include <unistd.h>
00009 #include <sys/types.h>
00010 #include <sys/uio.h>
00011 #include <fcntl.h>
00012 #include "adio.h"
00013 #include <globus_ftp_client.h>
00014
00015
00016
00017 int num_gridftp_handles=0;
00018 #ifndef ADIO_GRIDFTP_HANDLES_MAX
00019 #define ADIO_GRIDFTP_HANDLES_MAX 200
00020 #endif
00021
00022 globus_ftp_client_handle_t gridftp_fh[ADIO_GRIDFTP_HANDLES_MAX];
00023 globus_ftp_client_operationattr_t oattr[ADIO_GRIDFTP_HANDLES_MAX];
00024
00025 void globus_err_handler(const char *routine, const char *caller,
00026 globus_result_t result)
00027 {
00028 int myrank,nprocs;
00029 globus_object_t *err;
00030
00031 MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
00032 MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
00033 err = globus_error_get(result);
00034 FPRINTF(stderr, "[%d/%d] %s error \"%s\", called from %s\n",
00035 myrank,nprocs,routine,globus_object_printable_to_string(err),caller);
00036 }