Hello,
I'm working on CS 6.0.0 ans I would like to add options/flags to mpicc command just like -g or -O3 (I know they're already there, it's just an example).
My goal is to do something like : mpicc test.c -ltensorflow ...
Is there a way to add it in a 'clean' way ?
I tried to modify cflags_default and cxxflags_defaut as a 'crash test' in ..config/cs_auto_flags.sh but it's not super effective...
Thank you all.
Best regards,
CB
Compilation option for mpicc
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Compilation option for mpicc
Hello,
If you want to do this in a full installation, use the LDGFLAGS and LIBS variables at configure time.
For example ../../configure --prefix=<my_prefix> CC=mpicc CXX=mpicxx LIBS=-ltensorflow.
If you want to do this only for a given test case, you can use the cs_user_scripts.py (in DATA) user script hooks to define domain.compile_cflags, domain.compile_cxxflags, and domain.compile_libs to add options for this specific case.
Best regards,
Yvan
If you want to do this in a full installation, use the LDGFLAGS and LIBS variables at configure time.
For example ../../configure --prefix=<my_prefix> CC=mpicc CXX=mpicxx LIBS=-ltensorflow.
If you want to do this only for a given test case, you can use the cs_user_scripts.py (in DATA) user script hooks to define domain.compile_cflags, domain.compile_cxxflags, and domain.compile_libs to add options for this specific case.
Best regards,
Yvan