- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hi!
I'm trying to compile the petsc-library (scientific library for solving linear/nonlinear equation systems) for a machine with Intel Itanium processor. The library is entirely written in C and provides an interface for calling the routines from fortran programs. While all works well, when compiling with the Intel Compilers for IA32 systems, all fortran programs compiled with the compilers for IA64 fail with a segmentation violation error, when running on the itanium system. The problem seems to be the fortran interface (because the c/c++ programs using the library work well). In this interface some fortran pointers are translated into c-pointers.
this is done by a command (Vec)(*(long *)(v)), where v is a fortran pointer. Vec should be a C pointer.
The question now is: Is there something different I need to do when using such a conversion on 64 Bit machines? I'm using the Intel Fortran and C/C++ Compiler on a machine running with Intel Itanium 2 processor with a windows 2003 server operating system.
Greetings
Felix
I'm trying to compile the petsc-library (scientific library for solving linear/nonlinear equation systems) for a machine with Intel Itanium processor. The library is entirely written in C and provides an interface for calling the routines from fortran programs. While all works well, when compiling with the Intel Compilers for IA32 systems, all fortran programs compiled with the compilers for IA64 fail with a segmentation violation error, when running on the itanium system. The problem seems to be the fortran interface (because the c/c++ programs using the library work well). In this interface some fortran pointers are translated into c-pointers.
this is done by a command (Vec)(*(long *)(v)), where v is a fortran pointer. Vec should be a C pointer.
The question now is: Is there something different I need to do when using such a conversion on 64 Bit machines? I'm using the Intel Fortran and C/C++ Compiler on a machine running with Intel Itanium 2 processor with a windows 2003 server operating system.
Greetings
Felix
- Marcas:
- Intel® Fortran Compiler
Link copiado
2 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
It's difficult to say without seeing the code. Do note that the default INTEGER type in Fortran is still 32 bits. If the C code makes assumptions that pointers and ints are of the same size, this could cause problems.
I'd suggest using the debugger to see if you can spot what is going wrong when the error occurs,
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
If your C pointers are more than 32bits, your Windows C compiler may require a long long data type. IPF C for linux has a 64-bit long, while Windows has 32-bit long. While Cray pointers in Intel Fortran work as default 32-bit integers on IA-32, the IPF usage I have seen requires a 64-bit integer, such as INTEGER*8. From your description, I guess you are using Cray pointers, but I'm not familiar with the application.
Responder
Opções do tópico
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora