Loading examples/c/ADM_ping.c 0 → 100644 +49 −0 Original line number Diff line number Diff line /****************************************************************************** * Copyright 2021-2022, Barcelona Supercomputing Center (BSC), Spain * * This software was partially supported by the EuroHPC-funded project ADMIRE * (Project ID: 956748, https://www.admire-eurohpc.eu). * * This file is part of scord. * * scord is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * scord is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with scord. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: GPL-3.0-or-later *****************************************************************************/ #include <stdlib.h> #include <stdio.h> #include <admire.h> #include <assert.h> int main(int argc, char* argv[]) { if(argc != 2) { fprintf(stderr, "ERROR: no location provided\n"); fprintf(stderr, "Usage: ADM_ping <SERVER_ADDRESS>\n"); exit(EXIT_FAILURE); } ADM_server_t server = ADM_server_create("tcp", argv[1]); ADM_return_t ret = ADM_ping(server); if(ret != ADM_SUCCESS) { fprintf(stdout, "ADM_ping() remote procedure not completed " "successfully\n"); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } examples/c/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ list(APPEND examples_c ADM_register_job ADM_cancel_transfer ADM_connect_data_operation ADM_define_data_operation list(APPEND examples_c ADM_ping ADM_register_job ADM_cancel_transfer ADM_connect_data_operation ADM_define_data_operation ADM_deploy_adhoc_storage ADM_finalize_data_operation ADM_get_pending_transfers ADM_get_qos_constraints ADM_get_statistics ADM_get_transfer_priority ADM_link_transfer_to_data_operation ADM_register_adhoc_storage ADM_remove_adhoc_storage ADM_remove_job ADM_set_dataset_information Loading Loading
examples/c/ADM_ping.c 0 → 100644 +49 −0 Original line number Diff line number Diff line /****************************************************************************** * Copyright 2021-2022, Barcelona Supercomputing Center (BSC), Spain * * This software was partially supported by the EuroHPC-funded project ADMIRE * (Project ID: 956748, https://www.admire-eurohpc.eu). * * This file is part of scord. * * scord is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * scord is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with scord. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: GPL-3.0-or-later *****************************************************************************/ #include <stdlib.h> #include <stdio.h> #include <admire.h> #include <assert.h> int main(int argc, char* argv[]) { if(argc != 2) { fprintf(stderr, "ERROR: no location provided\n"); fprintf(stderr, "Usage: ADM_ping <SERVER_ADDRESS>\n"); exit(EXIT_FAILURE); } ADM_server_t server = ADM_server_create("tcp", argv[1]); ADM_return_t ret = ADM_ping(server); if(ret != ADM_SUCCESS) { fprintf(stdout, "ADM_ping() remote procedure not completed " "successfully\n"); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); }
examples/c/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ list(APPEND examples_c ADM_register_job ADM_cancel_transfer ADM_connect_data_operation ADM_define_data_operation list(APPEND examples_c ADM_ping ADM_register_job ADM_cancel_transfer ADM_connect_data_operation ADM_define_data_operation ADM_deploy_adhoc_storage ADM_finalize_data_operation ADM_get_pending_transfers ADM_get_qos_constraints ADM_get_statistics ADM_get_transfer_priority ADM_link_transfer_to_data_operation ADM_register_adhoc_storage ADM_remove_adhoc_storage ADM_remove_job ADM_set_dataset_information Loading