- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
I'm using the getcwd function on Ubuntu Linux and the return string contains a newline statement if the current directory name is longer than 80 characters:
program myWD use IFPORT implicit none character(len=1024) :: cwd integer :: error error = getcwd(cwd) print*, trim(cwd)//':' end program myWD
will give
/nethome/storage/raid4/m.diehl/DAMASK/testing/Spectral_parsingArguments/referen ce: /nethome/storage/raid4/m.diehl/DAMASK/testing/Spectral_parsingArguments/refere:
if I call the program from the folder 'reference' and 'refere', respectively. Tested with ifort 13.0.1 and 12.1.2.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry, formatting didn't work:
I'm using the getcwd function on Ubuntu Linux and the return string contains a newline statement if the current directory name is longer than 80 characters:
[fortran]program myWD
use IFPORT
implicit none
character(len=1024) :: cwd
integer ::error
error = getcwd(cwd)
print*, trim(cwd)//':'
end program myWD
[/fortran]
will give
[bash]
/nethome/storage/raid4/m.diehl/DAMASK/testing/Spectral_parsingArguments/referen
ce:
/nethome/storage/raid4/m.diehl/DAMASK/testing/Spectral_parsingArguments/refere:
[/bash]
if I call the program from the folder 'reference' and 'refere', respectively. Tested with ifort 13.0.1 and 12.1.2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've investigated and figured out that it's just a formatting problem and every line will break after 80 characters. The underlying reason was, that my directory detection never works but with the help of
http://software.intel.com/en-us/forums/topic/274704
it now does. For gfortran, I can simply use the directory + '/.' and check for file existance

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page