Skip to content

Commit

Permalink
print cwd in cholmod_di_demo
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Nov 25, 2023
1 parent 72bffc6 commit 7f96eac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CHOLMOD/Demo/cholmod_di_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ static void my_handler (int status, const char *file, int line,
}
}

#include <unistd.h>

int main (int argc, char **argv)
{
double
Expand Down Expand Up @@ -85,12 +87,20 @@ int main (int argc, char **argv)
// get the file containing the input matrix
//--------------------------------------------------------------------------

char cwd [PATH_MAX] ;
if (getcwd (cwd, PATH_MAX) != NULL)
{
fprintf (stderr, "cwd: %s\n", cwd) ;
printf ("cwd: %s\n", cwd) ;
}

ff = NULL ;
prefer_zomplex = 0 ;
if (argc > 1)
{
if ((f = fopen (argv [1], "r")) == NULL)
{

my_handler (CHOLMOD_INVALID, __FILE__, __LINE__,
"unable to open file") ;
}
Expand Down

0 comments on commit 7f96eac

Please sign in to comment.