Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Error using -parallel parameter

herrera__jorge
Beginner
1,354 Views

Hello.

 

I'm actually install Ubuntu 18.04 with the intel parallel 2019 update 3. When I compiled my code just with the -c option, it works fine but when i'm trying to do the same but now with the -parallel option i get those messages: 

Console2.o: In function `MAIN__':
Console2.f90:(.text+0x5c): undefined reference to `__kmpc_begin'
Console2.f90:(.text+0x1f8): undefined reference to `__kmpc_ok_to_fork'
Console2.f90:(.text+0x21d): undefined reference to `__kmpc_fork_call'
Console2.f90:(.text+0x5e6): undefined reference to `__kmpc_ok_to_fork'
Console2.f90:(.text+0x6ba): undefined reference to `__kmpc_fork_call'
Console2.f90:(.text+0x93d): undefined reference to `__kmpc_ok_to_fork'
Console2.f90:(.text+0xa0a): undefined reference to `__kmpc_fork_call'
Console2.f90:(.text+0x1810): undefined reference to `__kmpc_end'
Console2.f90:(.text+0x18d1): undefined reference to `__kmpc_for_static_init_4'
Console2.f90:(.text+0x22f4): undefined reference to `__kmpc_for_static_fini'
Console2.f90:(.text+0x23ba): undefined reference to `__kmpc_for_static_init_8'
Console2.f90:(.text+0x25d1): undefined reference to `__kmpc_for_static_fini'
Console2.f90:(.text+0x2692): undefined reference to `__kmpc_for_static_init_4'
Console2.f90:(.text+0x2969): undefined reference to `__kmpc_for_static_fini'

To compile I'm doing this:

./ifort Console2.f90 -nologo -O3 -parallel -qopt-matmul -real-size 64 -c Console2.f90

And the error above appears when i'm trying to change the object code to an executable.

Do any have a idea?

0 Kudos
1 Solution
Juergen_R_R
Valued Contributor I
1,354 Views

The third step is the linking step. As I said use the -parallel flag there, too:

3.  ifort -parallel Console2.o

 

View solution in original post

0 Kudos
6 Replies
Juergen_R_R
Valued Contributor I
1,354 Views

That has been discussed in a different context, I think you need to add -parallel also to your link command, cf.

https://software.intel.com/en-us/forums/intel-c-compiler/topic/289668

0 Kudos
herrera__jorge
Beginner
1,354 Views

Could you tell me how please because if I'm doing it right, that's not the solution.

 

Thanks !

0 Kudos
Juergen_R_R
Valued Contributor I
1,354 Views

It would be more beneficial if you showed us the code and your compile and link commands.

 

0 Kudos
herrera__jorge
Beginner
1,354 Views

These are the steps that I'm using

1.- source /home/lalo/intel/parallel_studio_xe_2019.3.062/compilers_and_libraries_2019/linux/bin/compilervars.sh ia32

2.- ifort Console2.f90 -nologo -O3 -parallel -qopt-matmul -real-size 64 -c Console2.f90

3.- ifort Consolo2.o

In the third step is when I received the errors

But if i did the same without the parallel option it works !

2.- ifort Console2.f90 -nologo -O3 -qopt-matmul -real-size 64 -c Console2.f90

3.- ifort Consolo2.o

The code that I'm using i test it in Windows with the same version of intel parallels with Visual Studio and is working, but i'm doing a research and i need to do it in linux

0 Kudos
Juergen_R_R
Valued Contributor I
1,355 Views

The third step is the linking step. As I said use the -parallel flag there, too:

3.  ifort -parallel Console2.o

 

0 Kudos
herrera__jorge
Beginner
1,354 Views

Hello !

I wasn't understanding you ! Now it is working !!

I'm so thankful !

 

0 Kudos
Reply