diff --git a/source/display.banner.F90 b/source/display.banner.F90 index 7922ac4bf4..b6db125391 100644 --- a/source/display.banner.F90 +++ b/source/display.banner.F90 @@ -37,15 +37,19 @@ subroutine Display_Banner_Show !!} use, intrinsic :: ISO_Fortran_Env, only : output_unit use :: Display , only : displayVerbosity, verbosityLevelSilent - use :: System_Output , only : stdOutIsATTY #ifdef USEMPI use :: MPI_Utilities , only : mpiSelf +#else + use :: System_Output , only : stdOutIsATTY #endif implicit none #ifdef USEMPI if (mpiSelf%rank() == 0) then #endif if (displayVerbosity() > verbosityLevelSilent) then + ! Display the logo only if not compiled using MPI. MPI intercepts `stdout` making it impossible for us to know if we are + ! outputting to a `TTY` or not +#ifndef USEMPI if (stdOutIsATTY()) then ! Display our ASCII art logo. This was created using the `px2ansi` tool (https://github.com/Nellousan/px2ansi) from ! https://github.com/galacticusorg/galacticus/blob/master/doc/New_Logo_Galaxy_192_Transparent.png after reducing to @@ -84,6 +88,7 @@ subroutine Display_Banner_Show write (output_unit,*) "                                                                " write (output_unit,*) "" end if +#endif write (output_unit,*) ' ## ' write (output_unit,*) ' #### # # ' write (output_unit,*) ' # # # # ' diff --git a/source/output.HDF5.open.F90 b/source/output.HDF5.open.F90 index 8ff871b03a..ab67500f6d 100644 --- a/source/output.HDF5.open.F90 +++ b/source/output.HDF5.open.F90 @@ -49,7 +49,7 @@ subroutine Output_HDF5_Open_File(parameters) use :: HDF5_Access , only : hdf5Access use :: IO_HDF5 , only : IO_HDF5_Set_Defaults use :: ISO_Varying_String, only : var_str , char , operator(//) , extract , & - & len , operator(==) + & len , operator(==) , adjustl , trim use :: Input_Parameters , only : inputParameters , inputParameter #ifdef USEMPI use :: MPI_Utilities , only : mpiSelf @@ -67,6 +67,7 @@ subroutine Output_HDF5_Open_File(parameters) integer(hsize_t ) :: chunkSize integer :: sieveBufferSize integer(size_t ) :: cacheElementsCount, cacheSizeBytes + type (varying_string ) :: outputFileName_ , outputScratchFileName_ #ifdef USEMPI type (varying_string ) :: fileNamePrefix #endif @@ -75,13 +76,15 @@ subroutine Output_HDF5_Open_File(parameters) !![ outputFileName + outputFileName_ var_str('galacticus.hdf5') The name of the file to which \glc\ results will be written. parameters outputScratchFileName - outputFileName + outputScratchFileName_ + outputFileName_ The name of the file to which \glc\ results will be written temporarily during runs. parameters @@ -120,6 +123,9 @@ subroutine Output_HDF5_Open_File(parameters) !!] hdf5CacheSizeBytes=cacheSizeBytes + ! Remove leadimg and trailing spaces. + outputFileName =trim(adjustl(outputFileName_ )) + outputScratchFileName=trim(adjustl(outputScratchFileName_)) ! Modify the file name on a per-process basis if running under MPI. #ifdef USEMPI if (extract(outputFileName ,len(outputFileName )-4,len(outputFileName )) == ".hdf5") then