In an effort to use IDL in a C++ Windows environment we are trying to port Princeton mpIDL so that it will build with Visual Studio .NET 2003 and execute under Win2K and WinXP. The code and examples work well under Linux, Princeton mpIDL's original target.
We are able to get the code to build but it crashes upon reaching IDL_MAIN, the first IDL statement encountered. On the other hand, as far as I can tell from the External Development Guide, IDL_MAIN is only discussed under UNIX/VMS and under Registering Routines.
Are there any insights? Princeton mpIDL's main appears below. IDL_MAIN is encountered first when the node ID is zero (myid == 0).
Thanks,
Peter.
int main(int argc, char* argv[])
{
int myid, numprocs,stat;
int flag;
char prog[100];
int iDummy = 0;
char **sDummy = NULL;
MPI_Init(&iDummy, &sDummy);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
MPI_Initialized(&flag);
if (myid==0)
{
printf("\n");
printf("Parallel IDL Copyright (c) 2002 PPPL\n");
printf("Initialized %i processes\n",numprocs);
printf("\n");
stat=IDL_Main(IDL_INIT_QUIET, argc, argv);
if (! stat)
{
printf("IDL Main unsuccessful\n");
MPI_Finalize();
return stat;
}
IDL_Cleanup (IDL_TRUE);
}
else
{
stat=IDL_Win32Init(0, NULL, NULL, NULL);
if (! stat)
{
printf("IDL Init unsuccessful\n");
MPI_Finalize();
return stat;
}
IDL_ToutPush(waste_basket);
MPI_Bcast(&prog, 100, MPI_CHAR, 0, MPI_COMM_WORLD);
stat=IDL_ExecuteStr(prog);
}
MPI_Finalize();
IDL_Cleanup (IDL_TRUE);
return 0;
}
|