From: Alexander Schmidt Date: Wed, 4 Dec 2013 12:54:50 +0000 (+0100) Subject: Revert "Let outdir be created from rank 0." X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/2a77bf6d539b1750d194de21ed287a958609693a?ds=inline;hp=f6dad6a4230bed002b51de0ec8ff34410bac27ec Revert "Let outdir be created from rank 0." This reverts commit f6dad6a4230bed002b51de0ec8ff34410bac27ec. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0521c1f..761a585 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(latlib) cmake_minimum_required(VERSION 2.8) -find_package(Boost 1.49 COMPONENTS filesystem iostreams REQUIRED) +find_package(Boost 1.49 COMPONENTS iostreams REQUIRED) include_directories(${Boost_INCLUDE_DIRS}) add_library(lat_configcache configcache.cpp) @@ -19,7 +19,6 @@ target_link_libraries(lat_hypercache lat_configcache lat_writeout) add_library(lat_neigh neigh.cpp) add_library(lat_writeout writeout.cpp) -target_link_libraries(lat_writeout ${Boost_LIBRARIES}) add_library(lat_paraq paraq.cpp) diff --git a/writeout.cpp b/writeout.cpp index e10a9d4..af67fb5 100644 --- a/writeout.cpp +++ b/writeout.cpp @@ -11,8 +11,6 @@ #include #include -#include - using namespace std; string writeout::tstamp(const long& timestamp) @@ -55,14 +53,7 @@ writeout::writeout(const string& wdir, const string& _signature, sprintf(cRank, "%d", rank); fulldir = wdir + "/" + tstamp(timestamp) + "_" + signature + ".tmp"; - if (rank==0) - mkdir(fulldir.c_str(), 0775); - else { - while ( ! ( boost::filesystem::exists(fulldir) && boost::filesystem::is_directory(fulldir) ) ) { - cerr << "WRITOUT: Waiting for rank 0 to create out directory." << endl << flush; - sleep(1); - } - } + mkdir(fulldir.c_str(), 0775); logf.open( (fulldir + "/rank" + cRank + ".log").c_str() );